Commit 3524cf2 1 parent d9363fd commit 3524cf2 Copy full SHA for 3524cf2
File tree 1 file changed +9
-10
lines changed
1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -196,8 +196,10 @@ kotlin {
196
196
197
197
val java9 by sourceSets.creating {
198
198
java.srcDir(" src/jvmMain/java9" )
199
- compileClasspath = objects.fileCollection()
200
- .from(configurations.named(" jvmCompileClasspath" ))
199
+ }
200
+
201
+ configurations.named(" java9CompileClasspath" ) {
202
+ extendsFrom(configurations[" jvmCompileClasspath" ])
201
203
}
202
204
203
205
testing {
@@ -220,14 +222,11 @@ testing {
220
222
221
223
tasks {
222
224
val compileJava9Java by getting(JavaCompile ::class ) {
223
- val compileKotlinJvm = named<KotlinCompile >(" compileKotlinJvm" )
224
- .flatMap { it.destinationDirectory }.map { it.asFile.absolutePath }
225
- inputs.dir(compileKotlinJvm)
226
- options.compilerArgumentProviders.plusAssign(
227
- CommandLineArgumentProvider {
228
- listOf (" --patch-module" , " okio=${compileKotlinJvm.get()} " )
229
- },
230
- )
225
+ dependsOn(" compileKotlinJvm" )
226
+ // https://kotlinlang.org/docs/gradle-configure-project.html#configure-with-java-modules-jpms-enabled
227
+ options.compilerArgumentProviders.add(CommandLineArgumentProvider {
228
+ listOf (" --patch-module" , " okio=${sourceSets[" main" ].output.asPath} " )
229
+ })
231
230
options.release = 9
232
231
}
233
232
You can’t perform that action at this time.
0 commit comments