Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ gen/ # Local configuration file (sdk path, etc) local.properties app/keystore/generic.jks # Proguard folder generated by Eclipse proguard/ Loading app-ose/build.gradle.kts +58 −1 Original line number Diff line number Diff line Loading @@ -162,6 +162,39 @@ android { keyAlias = "platform" keyPassword = "platform" } val genericStoreFile = retrieveOptionalKey("GENERIC_STORE_FILE") val genericStorePassword = retrieveOptionalKey("GENERIC_STORE_PASSWORD") val genericKeyAlias = retrieveOptionalKey("GENERIC_KEY_ALIAS") val genericKeyPassword = retrieveOptionalKey("GENERIC_KEY_PASSWORD") val hasGenericSigning = !genericStoreFile.isNullOrBlank() && !genericStorePassword.isNullOrBlank() && !genericKeyAlias.isNullOrBlank() && !genericKeyPassword.isNullOrBlank() if (isGenericBuildRequested() && !hasGenericSigning) { throw GradleException( "Missing generic signing configuration. " + "Please define GENERIC_STORE_FILE, GENERIC_STORE_PASSWORD, " + "GENERIC_KEY_ALIAS and GENERIC_KEY_PASSWORD in local.properties." ) } if ( !genericStoreFile.isNullOrBlank() && !genericStorePassword.isNullOrBlank() && !genericKeyAlias.isNullOrBlank() && !genericKeyPassword.isNullOrBlank() ) { create("generic") { storeFile = rootProject.file(genericStoreFile) storePassword = genericStorePassword keyAlias = genericKeyAlias keyPassword = genericKeyPassword } } } buildTypes { Loading @@ -178,6 +211,12 @@ android { debug { signingConfig = signingConfigs.findByName("platform") } create("generic") { initWith(getByName("release")) signingConfig = signingConfigs.findByName("generic") matchingFallbacks += listOf("release") } } splits { Loading @@ -199,6 +238,24 @@ fun retrieveKey(keyName: String): String { ?: throw GradleException("$keyName property not found in local.properties file") } fun retrieveOptionalKey(keyName: String): String? { val localPropertiesFile = rootProject.file("local.properties") if (!localPropertiesFile.exists()) { return null } val properties = Properties().apply { load(localPropertiesFile.inputStream()) } return properties.getProperty(keyName) } fun isGenericBuildRequested(): Boolean = gradle.startParameter.taskNames.any { taskName -> taskName.contains("generic", ignoreCase = true) } dependencies { // include core subproject (manages its own dependencies itself, however from same version catalog) implementation(project(":core")) Loading Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ gen/ # Local configuration file (sdk path, etc) local.properties app/keystore/generic.jks # Proguard folder generated by Eclipse proguard/ Loading
app-ose/build.gradle.kts +58 −1 Original line number Diff line number Diff line Loading @@ -162,6 +162,39 @@ android { keyAlias = "platform" keyPassword = "platform" } val genericStoreFile = retrieveOptionalKey("GENERIC_STORE_FILE") val genericStorePassword = retrieveOptionalKey("GENERIC_STORE_PASSWORD") val genericKeyAlias = retrieveOptionalKey("GENERIC_KEY_ALIAS") val genericKeyPassword = retrieveOptionalKey("GENERIC_KEY_PASSWORD") val hasGenericSigning = !genericStoreFile.isNullOrBlank() && !genericStorePassword.isNullOrBlank() && !genericKeyAlias.isNullOrBlank() && !genericKeyPassword.isNullOrBlank() if (isGenericBuildRequested() && !hasGenericSigning) { throw GradleException( "Missing generic signing configuration. " + "Please define GENERIC_STORE_FILE, GENERIC_STORE_PASSWORD, " + "GENERIC_KEY_ALIAS and GENERIC_KEY_PASSWORD in local.properties." ) } if ( !genericStoreFile.isNullOrBlank() && !genericStorePassword.isNullOrBlank() && !genericKeyAlias.isNullOrBlank() && !genericKeyPassword.isNullOrBlank() ) { create("generic") { storeFile = rootProject.file(genericStoreFile) storePassword = genericStorePassword keyAlias = genericKeyAlias keyPassword = genericKeyPassword } } } buildTypes { Loading @@ -178,6 +211,12 @@ android { debug { signingConfig = signingConfigs.findByName("platform") } create("generic") { initWith(getByName("release")) signingConfig = signingConfigs.findByName("generic") matchingFallbacks += listOf("release") } } splits { Loading @@ -199,6 +238,24 @@ fun retrieveKey(keyName: String): String { ?: throw GradleException("$keyName property not found in local.properties file") } fun retrieveOptionalKey(keyName: String): String? { val localPropertiesFile = rootProject.file("local.properties") if (!localPropertiesFile.exists()) { return null } val properties = Properties().apply { load(localPropertiesFile.inputStream()) } return properties.getProperty(keyName) } fun isGenericBuildRequested(): Boolean = gradle.startParameter.taskNames.any { taskName -> taskName.contains("generic", ignoreCase = true) } dependencies { // include core subproject (manages its own dependencies itself, however from same version catalog) implementation(project(":core")) Loading