-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
99 lines (82 loc) · 2.08 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/
*
* TODO: Reformat this file.
* TODO: Sign Jar file
* TODO: Add obfusication
*/
import org.ajoberstar.gradle.git.tasks.*
apply plugin: 'idea'
apply plugin: 'java'
version = '1.0'
sourceCompatibility = 1.7
targetCompatibility = 1.7
// https://stackoverflow.com/a/27132701/8524651
buildscript {
repositories { mavenCentral() }
dependencies {
classpath 'org.ajoberstar:gradle-git:0.2.3'
}
}
// Only needed once to update the Dependency.
// TODO: Refactor to git submodule (?)
task cloneNetACT(type: GitClone) {
def destination = file("NetACT")
uri = "https://github.com/Hatzen/NetACT"
destinationPath = destination
bare = false
enabled = !destination.exists() //to clone only once
}
//Get dependencies from Maven central repository
repositories {
mavenCentral()
}
dependencies {
compile project(':NetACT')
}
// TODO: Clear folder before creating
javadoc {
destinationDir = file("${rootDir}/doc/javadoc/")
source = sourceSets.main.allJava
classpath = configurations.compile
}
jar {
dependsOn 'cloneNetACT'
tasks.findByName('jar').mustRunAfter 'cloneNetACT'
manifest {
attributes 'Implementation-Title': 'EasyPeasyVPN',
'Implementation-Version': version,
'Main-Class': 'de.hartz.vpn.Main'
}
}
task runJar2(dependsOn:jar) {
doLast{
javaexec {
main="-jar";
args = [
"C:/Users/nwuser/FitNesse/fitnesse-standalone.jar"
]
}
}
}
task runJar(type: JavaExec) {
dependsOn 'jar'
main = "-jar";
args jar.archivePath
}
task runNetACTest {
dependsOn 'cloneNetACT'
dependsOn 'jar'
tasks.findByName('jar').mustRunAfter 'cloneNetACT'
doLast{
javaexec {
main="-jar";
args = [
"C:/Users/nwuser/FitNesse/fitnesse-standalone.jar"
]
}
}
}