一些可能有用的Android代码 - Android Makers 2022版

Android Makers 2022

buildSrc Deprecated

对编译速度有影响,所以过气了。换用Version Catalogs。

Single-variant Libraries

1
2
3
4
5
androidComponents {
beforeVariants(selector().withBuildType("debug")) { builder ->
builder.enable = false
}
}

Disable Android Features

1
2
3
4
5
6
# Build features that are disabled by default in all projects
android.default.buildFeatures.aidl=false
android.default.buildFeatures.buildconfig=false
android.default.buildFeatures.renderscript=false
android.default.buildFeatures.resvalues=false
android.default.buildFeatures.shaders=false

TaskUpToDateValidator.kt

TaskUpToDateValidator.kt

modules-graph-assert

https://github.com/jraska/modules-graph-assert

文件保存