From 42629f2716464dc6a943a142a09eb8fac4ba7b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Nicolas?= Date: Tue, 22 Aug 2017 19:41:38 -0700 Subject: [PATCH] fix issue #203 --- toothpick-compiler/build.gradle | 5 +++-- toothpick-runtime/build.gradle | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/toothpick-compiler/build.gradle b/toothpick-compiler/build.gradle index 3595e0a4..1e35c4ba 100644 --- a/toothpick-compiler/build.gradle +++ b/toothpick-compiler/build.gradle @@ -1,3 +1,5 @@ +import org.gradle.internal.jvm.Jvm + apply plugin: 'java' sourceCompatibility = 1.7 @@ -11,8 +13,7 @@ dependencies { testCompile deps.junit testCompile deps.truth testCompile deps.compiletesting - //from https://github.com/google/compile-testing/issues/28 - testCompile files(System.getenv("JAVA_HOME") + "/lib/tools.jar") + testCompile files(Jvm.current().getToolsJar()) } apply from: rootProject.file('gradle/gradle-mvn-push.gradle') \ No newline at end of file diff --git a/toothpick-runtime/build.gradle b/toothpick-runtime/build.gradle index a000e364..d884608e 100644 --- a/toothpick-runtime/build.gradle +++ b/toothpick-runtime/build.gradle @@ -1,3 +1,5 @@ +import org.gradle.internal.jvm.Jvm + apply plugin: 'java' sourceCompatibility = 1.7 @@ -12,7 +14,7 @@ dependencies { testCompile deps.easymock testCompile deps.powermock testCompile deps.hamcrest - testCompile files(System.getenv("JAVA_HOME") + "/lib/tools.jar") + testCompile files(Jvm.current().getToolsJar()) } compileTestJava {