-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
72 lines (59 loc) · 1.75 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
apply plugin: 'java'
apply plugin: 'eclipse'
repositories {
mavenCentral()
}
dependencies {
compile 'com.fasterxml.jackson.core:jackson-databind:2.3.3'
compile 'com.netflix.rxjava:rxjava-string:0.18.3'
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'de.undercouch:gradle-download-task:1.0'
}
}
apply plugin: 'download-task'
import de.undercouch.gradle.tasks.download.Download
task getSrcs
// see.
// http://hg.openjdk.java.net/jdk6/jdk6/hotspot/tags
// http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/tags
// http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/tags
task downloadjava6(type: Download) {
src "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/archive/tip.zip"
dest new File(buildDir, "jdk6tip.zip")
}
task downloadjava7(type: Download) {
src "http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/archive/tip.zip"
dest new File(buildDir, "jdk7tip.zip")
}
task downloadjava8(type: Download) {
src "http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/archive/tip.zip"
dest new File(buildDir, "jdk8tip.zip")
}
["java6", "java7", "java8"].each { ver ->
def dep = tasks["download$ver"]
task "extract$ver"(dependsOn: dep, type: Copy) {
from zipTree(dep.dest)
def n = dep.dest.name
into new File("$projectDir/$ver", n.substring(0, n.lastIndexOf('.')))
}
getSrcs.dependsOn "extract$ver"
}
task analyzeOptions(type: JavaExec) {
main = "jvmoptions.OptionAnalyzer"
classpath = sourceSets.main.runtimeClasspath
}
analyzeOptions.shouldRunAfter getSrcs
defaultTasks 'getSrcs', 'analyzeOptions'
sourceCompatibility = targetCompatibility = 1.8
eclipse {
classpath {
containers = [
'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8'
]
}
}