Skip to content

Instantly share code, notes, and snippets.

@borisf
borisf / build.gradle.kts.diff
Last active May 8, 2023 03:17
Android namespace
// Android manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
- package="com.example.app"
>
// Module build.gradle.kts
android {
+ namespace = "com.example.app"
compileSdk = 33
@borisf
borisf / gradle.properties
Last active April 10, 2023 14:51
Set transitive R classes
// gradle.properties
android.nonTransitiveRClass=false
@borisf
borisf / build.gradle.kts.diff
Last active April 10, 2023 14:50
build config
// Module build.gradle.kts
android {
buildFeatures {
+ buildConfig = true
}
}
@borisf
borisf / gradle.properties
Last active April 10, 2023 14:52
build config old
// gradle.properties
+android.defaults.buildfeatures.buildconfig=true
@borisf
borisf / configs.txt.diff
Last active March 20, 2023 16:42
Off by default
// Module build.gradle.kts
android {
buildFeatures {
+ aidl = true
+ renderScript = true
}
}
@borisf
borisf / changes.diff
Last active March 22, 2023 08:40
Transitive R classes
-val foo = R.drawable.android_ext_lib_2
+val foo = com.example.extra_lib_2.R.drawable.android_ext_lib_2
// gradle.properties
-android.nonTransitiveRClass=true
@borisf
borisf / gradle.properties.diff
Last active April 10, 2023 14:50
binary.buildconfig
// gradle.properties
+android.defaults.buildfeatures.buildconfig=true
+android.enableBuildConfigAsBytecode=true
@borisf
borisf / gradle.properties.diff
Last active March 23, 2023 13:20
aidl and renderscript
// Setting AIDL and RenderScript for the entire project at gradle.properties
+android.defaults.buildfeatures.aidl=true
+android.defaults.buildfeatures.renderScript=true