Skip to content

Commit b7ecd73

Browse files
committed
Avoid task configuration
1 parent 3524cf2 commit b7ecd73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

okio/build.gradle.kts

+3-3
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ testing {
221221
}
222222

223223
tasks {
224-
val compileJava9Java by getting(JavaCompile::class) {
224+
val compileJava9Java = named<JavaCompile>("compileJava9Java") {
225225
dependsOn("compileKotlinJvm")
226226
// https://kotlinlang.org/docs/gradle-configure-project.html#configure-with-java-modules-jpms-enabled
227227
options.compilerArgumentProviders.add(CommandLineArgumentProvider {
@@ -230,7 +230,7 @@ tasks {
230230
options.release = 9
231231
}
232232

233-
val jvmJar by getting(Jar::class) {
233+
named<Jar>("jvmJar") {
234234
from(compileJava9Java) {
235235
into("META-INF/versions/9")
236236
}
@@ -249,7 +249,7 @@ tasks {
249249
}
250250
}
251251

252-
val compileIntegrationTestJava by getting(JavaCompile::class) {
252+
named<JavaCompile>("compileIntegrationTestJava") {
253253
options.release = 9
254254
}
255255

0 commit comments

Comments
 (0)