Refactor more tasks to lazy API

This commit is contained in:
Ilya Chernikov
2019-08-14 16:05:43 +02:00
parent 2ed8fa7624
commit 315a9d66a0
16 changed files with 42 additions and 48 deletions
+3 -3
View File
@@ -51,7 +51,7 @@ dependencies {
androidDxSources("google:dx:0@tar.gz")
}
val unzipDxJar by tasks.creating {
val unzipDxJar by tasks.registering {
val outputDir = File(buildDir, name)
val outputFile = File(outputDir, "dx.jar")
@@ -68,7 +68,7 @@ val unzipDxJar by tasks.creating {
}
}
val untarDxSources by tasks.creating {
val untarDxSources by tasks.registering {
val dxSourcesTargetDir = File(buildDir, name)
dependsOn(androidDxSources)
inputs.files(androidDxSources)
@@ -83,7 +83,7 @@ val untarDxSources by tasks.creating {
}
}
val prepareDxSourcesJar by tasks.creating(Jar::class) {
val prepareDxSourcesJar by tasks.registering(Jar::class) {
dependsOn(untarDxSources)
from(untarDxSources)
+1 -1
View File
@@ -92,7 +92,7 @@ val clean by task<Delete> {
delete(buildDir)
}
val extractAndroidJar by tasks.creating {
val extractAndroidJar by tasks.registering {
dependsOn(androidPlatform)
inputs.files(androidPlatform)
val targetFile = File(libsDestDir, "android.jar")
+1 -1
View File
@@ -22,7 +22,7 @@ dependencies {
relocatedProtobuf(project(":protobuf-relocated"))
}
val prepare by tasks.creating {
val prepare by tasks.registering {
inputs.files(relocatedProtobuf) // this also adds a dependency
outputs.file(outputJarPath)
doFirst {