diff --git a/build-logic/ide/src/main/java/ProjectConfig.kt b/build-logic/ide/src/main/java/ProjectConfig.kt index c09e0fb7f..804bb21ab 100644 --- a/build-logic/ide/src/main/java/ProjectConfig.kt +++ b/build-logic/ide/src/main/java/ProjectConfig.kt @@ -45,12 +45,6 @@ val Project.isFDroidBuild: Boolean return FDroidConfig.isFDroidBuild } -/** - * Whether split APKs should be enabled. - */ -val Project.areSplitApksEnabled: Boolean - get() = !isFDroidBuild - val Project.simpleVersionName: String get() { @@ -99,6 +93,13 @@ val Project.publishingVersion: String get() { var publishing = simpleVersionName + if (isFDroidBuild) { + // when building for F-Droid, the release is already published so we should have + // the maven dependencies already published + // simply return the simple version name here. + return publishing + } + if (CI.isCiBuild && CI.branchName != "main") { publishing += "-${CI.commitHash}-SNAPSHOT" } @@ -110,12 +111,12 @@ val Project.publishingVersion: String * The version name which is used to download the artifacts at runtime. * * The value varies based on the following cases : - * - For CI builds: same as [publishingVersion]. + * - For CI and F-Droid builds: same as [publishingVersion]. * - For local builds: `latest.integration` to make sure that Gradle downloads the latest snapshots. */ val Project.downloadVersion: String get() { - return if (CI.isCiBuild) { + return if (CI.isCiBuild || isFDroidBuild) { publishingVersion } else { // sometimes, when working locally, Gradle fails to download the latest snapshot version diff --git a/build-logic/ide/src/main/java/config.kt b/build-logic/ide/src/main/java/config.kt index 167f80d53..ef317dff3 100644 --- a/build-logic/ide/src/main/java/config.kt +++ b/build-logic/ide/src/main/java/config.kt @@ -32,7 +32,5 @@ const val KEY_BIN = "IDE_SIGNING_KEY_BIN" */ const val AGP_VERSION_MINIMUM = "7.2.0" -const val PROP_IDE_BUILD_FDROID = "ide.build.fdroid" - val Project.signingKey: Provider get() = rootProject.layout.buildDirectory.file("signing/signing-key.jks") \ No newline at end of file