Loading app/build.gradle.kts +42 −1 Original line number Diff line number Diff line import java.io.FileInputStream import java.io.FileOutputStream import java.time.LocalDateTime import java.time.format.DateTimeFormatter import java.util.Properties /* * Copyright © All Contributors. See LICENSE and AUTHORS in the root directory for details. */ Loading Loading @@ -57,8 +63,13 @@ android { flavorDimensions += "distribution" productFlavors { create("ose") { applicationId = "foundation.e.accountmanager" dimension = "distribution" versionNameSuffix = "-ose" versionNameSuffix = "-ose-${LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))}" if (versionName != null) { setProperty("archivesBaseName", "AccountManager-$versionName") } } } Loading Loading @@ -126,6 +137,36 @@ android { } } } val versionPropsFile = rootProject.file("local.properties") val versionProps = Properties() if (versionPropsFile.exists()) { versionProps.load(FileInputStream(versionPropsFile)) } val incVersionCode = versionProps.getProperty("VERSION_CODE") val appVersionCode = if (incVersionCode == null) { // Set initial version code if not present android.defaultConfig.versionCode } else { // Increment version code for subsequent builds incVersionCode.toInt() + 1 } versionProps.setProperty("VERSION_CODE", appVersionCode.toString()) versionProps.store(FileOutputStream(versionPropsFile), null) androidComponents { onVariants { variant -> if (variant.buildType == "debug" && variant.flavorName == "ose") { variant.outputs.forEach { it.versionCode.set(appVersionCode) } } } } } ksp { Loading app/src/main/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -451,7 +451,7 @@ <string name="collection_url">Address (URL)</string> <!-- debugging and DebugInfoActivity --> <string name="authority_debug_provider" translatable="false">at.bitfire.davdroid.debug</string> <string name="authority_debug_provider" translatable="false">foundation.e.accountmanager.debug</string> <string name="debug_info_title">Debug info</string> <string name="debug_info_archive_caption">ZIP archive</string> <string name="debug_info_archive_subtitle">Contains debug info and logs</string> Loading Loading
app/build.gradle.kts +42 −1 Original line number Diff line number Diff line import java.io.FileInputStream import java.io.FileOutputStream import java.time.LocalDateTime import java.time.format.DateTimeFormatter import java.util.Properties /* * Copyright © All Contributors. See LICENSE and AUTHORS in the root directory for details. */ Loading Loading @@ -57,8 +63,13 @@ android { flavorDimensions += "distribution" productFlavors { create("ose") { applicationId = "foundation.e.accountmanager" dimension = "distribution" versionNameSuffix = "-ose" versionNameSuffix = "-ose-${LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))}" if (versionName != null) { setProperty("archivesBaseName", "AccountManager-$versionName") } } } Loading Loading @@ -126,6 +137,36 @@ android { } } } val versionPropsFile = rootProject.file("local.properties") val versionProps = Properties() if (versionPropsFile.exists()) { versionProps.load(FileInputStream(versionPropsFile)) } val incVersionCode = versionProps.getProperty("VERSION_CODE") val appVersionCode = if (incVersionCode == null) { // Set initial version code if not present android.defaultConfig.versionCode } else { // Increment version code for subsequent builds incVersionCode.toInt() + 1 } versionProps.setProperty("VERSION_CODE", appVersionCode.toString()) versionProps.store(FileOutputStream(versionPropsFile), null) androidComponents { onVariants { variant -> if (variant.buildType == "debug" && variant.flavorName == "ose") { variant.outputs.forEach { it.versionCode.set(appVersionCode) } } } } } ksp { Loading
app/src/main/res/values/strings.xml +1 −1 Original line number Diff line number Diff line Loading @@ -451,7 +451,7 @@ <string name="collection_url">Address (URL)</string> <!-- debugging and DebugInfoActivity --> <string name="authority_debug_provider" translatable="false">at.bitfire.davdroid.debug</string> <string name="authority_debug_provider" translatable="false">foundation.e.accountmanager.debug</string> <string name="debug_info_title">Debug info</string> <string name="debug_info_archive_caption">ZIP archive</string> <string name="debug_info_archive_subtitle">Contains debug info and logs</string> Loading