summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurimas Liutikas <aurimas@google.com>2019-10-30 10:49:29 -0700
committerAurimas Liutikas <aurimas@google.com>2019-10-30 10:49:29 -0700
commite08a0e9ea5e2d57760e7195f8caa4e8a54ca09e5 (patch)
treeef51f3b45746e110bb85445051c0cff8be490d8b
parentcc35cdd3b4d228a5664800cae7f03f993f8a98ba (diff)
downloaddoclava-e08a0e9ea5e2d57760e7195f8caa4e8a54ca09e5.tar.gz
Remove Java 8 requirement.
Prepare to update to a newer version of JDK. Java 9+ does not include tools.jar on the classpath anymore and it needs to be explicitly added as a jar dependency. Test: None Change-Id: Iba97936b17c4e12ecb96eb2f090d1e77686520b2
-rw-r--r--build.gradle9
1 files changed, 1 insertions, 8 deletions
diff --git a/build.gradle b/build.gradle
index 3096e0e..e56ffa2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -22,13 +22,6 @@ apply plugin: 'maven'
group = 'com.android'
version = '1.0.6'
-def currentJvmVersion = org.gradle.api.JavaVersion.current()
-if (currentJvmVersion.getMajorVersion() != "8") {
- throw new Exception("Unsupported java version '" + currentJvmVersion.toString() + "'. Please install java 8.\n" +
-"\n" +
-"If you have already installed java 8, you can instruct Gradle to use it by setting the environment variable JAVA_HOME equal to its file path.")
-}
-
/*
* With the build server you are given two env variables:
* 1. The OUT_DIR is a temporary directory you can use to put things during the build.
@@ -85,7 +78,7 @@ dependencies {
testCompile 'junit:junit:4.12'
// tools.jar required for com.sun.javadoc
- compile files(((URLClassLoader) ToolProvider.getSystemToolClassLoader()).getURLs())
+ compile files(System.getProperty('java.home') + "/libs/tools.jar")
}
sourceSets {