adjust build and add a variant that doesn't allow user-added libraries

This commit is contained in:
Helium314 2024-02-01 22:10:54 +01:00
parent 53022afdab
commit 978d76ed7c
6 changed files with 39 additions and 52 deletions

View file

@ -15,21 +15,27 @@ android {
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
buildTypes {
release {
minifyEnabled true
//shrinkResources true todo: test before enabling, a lot of resources are accessed via getIdentifier and possibly not all have been marked with "keep"
shrinkResources true
debuggable false
jniDebuggable false
renderscriptDebuggable false
}
nouserlib { // same as release, but does not allow the user to provide a library
minifyEnabled true
shrinkResources true
debuggable false
jniDebuggable false
renderscriptDebuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'src/main/proguard.flags'
}
debug {
minifyEnabled true
jniDebuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'src/main/proguard.flags'
applicationIdSuffix ".debug"
}
archivesBaseName = "openboard_" + defaultConfig.versionName
@ -82,7 +88,7 @@ dependencies {
implementation 'androidx.preference:preference:1.2.1' // includes appcompat
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.1"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2"
implementation 'com.github.martin-stone:hsv-alpha-color-picker-android:3.1.0'
implementation 'androidx.autofill:autofill:1.1.0'