Build: Make DexMethodCount task cacheable, extract print stats to task
This commit is contained in:
@@ -217,12 +217,11 @@ val modularJar by task<Jar> {
|
||||
callGroovy("manifestAttributes", manifest, project, "Main", true)
|
||||
}
|
||||
|
||||
val dexMethodCount by task<DexMethodCount> {
|
||||
dexMethodCount {
|
||||
dependsOn(result)
|
||||
jarFile = result.get().outputs.files.single()
|
||||
ownPackages = listOf("kotlin.reflect")
|
||||
}
|
||||
tasks.getByName("check").dependsOn(dexMethodCount)
|
||||
|
||||
artifacts {
|
||||
listOf(mainJar.name, "runtime", "archives").forEach { configurationName ->
|
||||
|
||||
@@ -106,11 +106,10 @@ artifacts {
|
||||
|
||||
javadocJar()
|
||||
|
||||
task dexMethodCount(type: DexMethodCount) {
|
||||
from jar
|
||||
ownPackages = ['kotlin']
|
||||
DexMethodCountKt.dexMethodCount(project) { task ->
|
||||
task.from(jar)
|
||||
task.ownPackages = ['kotlin']
|
||||
}
|
||||
check.dependsOn(dexMethodCount)
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions {
|
||||
|
||||
Reference in New Issue
Block a user