+compileTestJava {
+ dependsOn compileCloverJava
+ doFirst {
+ if (JAVA_VERSION.equals("1.8")) {
+ sourceCompatibility = 1.8
+ targetCompatibility = 1.8
+ } else if (JAVA_VERSION.equals("11")) {
+ sourceCompatibility = 11
+ targetCompatibility = 11
+
+ options.compilerArgs = [
+ '--module-path', sourceSets.modules.compileClasspath.asPath,
+ '--add-modules', j11modules
+ ]
+ }
+ print ("Setting target compatibility to "+targetCompatibility+"\n")
+ }
+ classpath += configurations.cloverRuntime
+}
+
+
+compileCloverJava {
+
+ doFirst {
+ if (JAVA_VERSION.equals("1.8")) {
+ sourceCompatibility = 1.8
+ targetCompatibility = 1.8
+ } else if (JAVA_VERSION.equals("11")) {
+ sourceCompatibility = 11
+ targetCompatibility = 11
+
+ options.compilerArgs += [
+ '--module-path', sourceSets.modules.compileClasspath.asPath,
+ '--add-modules', j11modules
+ ]
+ }
+ print ("Setting target compatibility to "+targetCompatibility+"\n")
+ }
+ classpath += configurations.cloverRuntime
+}
+