Improve DexMethodCount task

Use lazy api to set the file and avoid configuring Jar tasks
This commit is contained in:
cristiangarcia
2023-06-20 00:55:41 +02:00
committed by Space Team
parent d17c7d4729
commit 650b00e1b2
3 changed files with 29 additions and 34 deletions
+2 -5
View File
@@ -244,15 +244,12 @@ val result by task<Jar> {
javadocJar()
dexMethodCount {
dependsOn(result)
jarFile = result.get().outputs.files.single()
jarFile.fileProvider(result.map { it.outputs.files.singleFile })
ownPackages.set(listOf("kotlin.reflect"))
}
artifacts {
listOf("archives", "runtimeElements").forEach { configurationName ->
add(configurationName, provider { result.get().outputs.files.singleFile }) {
builtBy(result)
}
add(configurationName, result.map { it.outputs.files.singleFile })
}
}