aboutsummaryrefslogtreecommitdiffstats
path: root/build.gradle
diff options
context:
space:
mode:
authorIvan Dubrov <idubrov@guidewire.com>2014-04-24 19:22:17 -0700
committerIvan Dubrov <idubrov@guidewire.com>2014-04-24 19:22:17 -0700
commit070f0932b7f5f901551d42850b1c105a080cc40b (patch)
treecfa0d0be6e34ae108180d071b77c98b8994ebb8c /build.gradle
parentf3d1c500f2cb30e2203df86844b378ea1b6bc53d (diff)
downloaddcevm-070f0932b7f5f901551d42850b1c105a080cc40b.tar.gz
dcevm-070f0932b7f5f901551d42850b1c105a080cc40b.zip
Adding Java 7 patch, support running tests on Java 7
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle22
1 files changed, 9 insertions, 13 deletions
diff --git a/build.gradle b/build.gradle
index 4b7c83fa..0ba68a52 100644
--- a/build.gradle
+++ b/build.gradle
@@ -108,7 +108,7 @@ def setup(prjs, closure) {
}
}
-setup(['agent', 'framework', 'tests-java7', 'tests-java8'], {
+setup(['agent', 'dcevm'], {
apply plugin: 'java'
apply plugin: 'idea'
@@ -125,25 +125,21 @@ project('agent') {
}
}
-project('framework') {
+project('dcevm') {
dependencies {
compile project(':agent')
compile group: 'asm', name: 'asm-all', version: '3.3.+'
compile files(System.getProperty("java.home") + '/../lib/tools.jar')
- }
-}
-project('tests-java8') {
- sourceCompatibility = 1.8
- targetCompatibility = 1.8
-}
-
-setup(['tests-java7', 'tests-java8'], {
- dependencies {
- compile project(':framework')
testCompile group: 'junit', name: 'junit', version: '4.11'
}
+ def m = System.getProperty('java.version') =~ /^1\.([0-9]+)\.*/
+ def major = m[0][1].toInteger()
+ if (major >= 7) {
+ sourceSets.test.java.srcDirs += 'src/test/java8'
+ }
+
test {
executable new File(targetJreFile, 'bin/java')
@@ -160,7 +156,7 @@ setup(['tests-java7', 'tests-java8'], {
}
test.dependsOn project(':hotspot').tasks[kind == 'fastdebug' ? 'installFastdebug' : 'installProduct']
-})
+}
enum Arch {