Build: Make DexMethodCount task cacheable, extract print stats to task

This commit is contained in:
Vyacheslav Gerasimov
2020-01-28 20:00:40 +03:00
parent 354fb3c4ba
commit 744c4c545e
3 changed files with 76 additions and 52 deletions
+1 -2
View File
@@ -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 ->
+3 -4
View File
@@ -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 {