t/oxr_android: Move signing config script to bottom of build file

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2243>
This commit is contained in:
Rylie Pavlik 2024-06-07 13:48:23 -05:00 committed by Simon Zeni
parent 028425be9d
commit 432b7a7b91

View file

@ -252,27 +252,6 @@ android {
}
// For signing of release binaries - env var must contain an absolute path
// CI always does this.
def keystorePropertiesFilename = System.getenv("MONADO_KEYSTORE_PROPERTIES")
if (keystorePropertiesFilename) {
def keystorePropertiesFile = file("${keystorePropertiesFilename}")
if (keystorePropertiesFile.exists()) {
println("Signing release artifacts for monado")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android.signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file("${project.repoRoot}/" + keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
android.buildTypes.release.signingConfig android.signingConfigs.release
}
}
aboutLibraries {
// Full license text for license IDs mentioned here
// will be included, even if no detected dependency uses them.
@ -304,3 +283,24 @@ dependencies {
kapt "com.google.dagger:hilt-compiler:$hiltVersion"
}
// For signing of release binaries - env var must contain an absolute path
// CI always does this.
def keystorePropertiesFilename = System.getenv("MONADO_KEYSTORE_PROPERTIES")
if (keystorePropertiesFilename) {
def keystorePropertiesFile = file("${keystorePropertiesFilename}")
if (keystorePropertiesFile.exists()) {
println("Signing release artifacts for monado")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android.signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file("${project.repoRoot}/" + keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
android.buildTypes.release.signingConfig android.signingConfigs.release
}
}