File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -84,18 +84,17 @@ class TracerJavaExtension {
8484 (it as SourceSet ). java. srcDirs = [" ${ project.projectDir} /src/${ SourceSet.MAIN_SOURCE_SET_NAME} /$name " ]
8585 }
8686
87+ // TODO Make 'configureCompiler' a general utility method
88+ def configureCompilerCl = project. extensions. getByType(ExtraPropertiesExtension ). get(" configureCompiler" ) as Closure
8789 project. tasks. named(mainForJavaVersionSourceSet. compileJavaTaskName, JavaCompile ) {
88- // TODO Make 'configureCompiler' a general utility method
89- def cl = project. extensions. getByType(ExtraPropertiesExtension ). get(" configureCompiler" ) as Closure
90- cl. call(it, version. majorVersion. toInteger(). intValue(), version)
90+ configureCompilerCl. call(it, version. majorVersion. toInteger(). intValue(), version)
9191 }
9292
9393 if (sourceSetConfig. applyForTestSources. orElse(true )) {
9494 // configures all test tasks
9595 project. tasks. withType(JavaCompile ). configureEach {
9696 if (it. name. toLowerCase(). contains(" test" )) {
97- it. sourceCompatibility = version
98- it. targetCompatibility = version
97+ configureCompilerCl. call(it, version. majorVersion. toInteger(). intValue(), version)
9998 }
10099 }
101100 }
You can’t perform that action at this time.
0 commit comments