Skip to content

Commit

Permalink
buildDSO
Browse files Browse the repository at this point in the history
  • Loading branch information
BrayanDSO committed Apr 29, 2024
1 parent 59a966b commit 90451e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion AnkiDroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,15 @@ android {
splits.abi.universalApk = universalApkEnabled // Build universal APK for release with `-Duniversal-apk=true`
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
applicationIdSuffix ".dso"

// syntax: assembleRelease -PcustomSuffix="suffix" -PcustomName="New name"
if (project.hasProperty("customSuffix")) {
// the suffix needs a '.' at the start
applicationIdSuffix project.property("customSuffix").replaceFirst(/^\.*/, ".")
resValue "string", "applicationId", "${defaultConfig.applicationId}${applicationIdSuffix}"
} else {
resValue "string", "applicationId", defaultConfig.applicationId
resValue "string", "applicationId", "${defaultConfig.applicationId}${applicationIdSuffix}"
}
if (project.hasProperty("customName")) {
resValue "string", "app_name", project.property("customName")
Expand Down

0 comments on commit 90451e3

Please sign in to comment.