File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -189,26 +189,28 @@ kotlin {
189189 }
190190}
191191
192+ val java9 by sourceSets.creating {
193+ java.srcDir(" src/jvmMain/java9" )
194+ compileClasspath = objects.fileCollection()
195+ .from(configurations.named(" jvmCompileClasspath" ))
196+ }
197+
192198tasks {
193- val compileModuleInfo by registering(JavaCompile ::class ) {
194- classpath = objects.fileCollection()
195- .from(configurations.named(" jvmCompileClasspath" ))
199+ val compileJava9Java by getting(JavaCompile ::class ) {
196200 val compileKotlinJvm = named<KotlinCompile >(" compileKotlinJvm" )
197201 dependsOn(compileKotlinJvm)
198202 options.compilerArgumentProviders.plusAssign(
199203 CommandLineArgumentProvider {
200204 listOf (" --patch-module" , " okio=${compileKotlinJvm.get().destinationDirectory.get().asFile.absolutePath} " )
201205 },
202206 )
203- destinationDirectory = layout.buildDirectory.dir(" classes/java/moduleInfo" )
204207 options.release = 9
205- source(layout.projectDirectory.dir(" src/jvmMain/java" ))
206208 }
207209
208210 val jvmJar by getting(Jar ::class ) {
209211 // BundleTaskConvention() crashes unless there's a 'main' source set.
210212 sourceSets.create(SourceSet .MAIN_SOURCE_SET_NAME )
211- from(compileModuleInfo ) {
213+ from(compileJava9Java ) {
212214 into(" META-INF/versions/9" )
213215 }
214216 val bndConvention = BundleTaskConvention (this )
File renamed without changes.
You can’t perform that action at this time.
0 commit comments