fdroid: build: Remove release signingConfigs

Reference:
https://github.com/teal77/trireme/blob/master/android/app/build.gradle
https://nikhiljha.com/posts/flutteronfdroid/
This commit is contained in:
Calcitem 2021-05-05 04:50:07 +08:00
parent 74cf4f5207
commit 44039c5bb8
1 changed files with 8 additions and 35 deletions

View File

@ -24,21 +24,6 @@ if (flutterVersionName == null) {
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
} else {
if (System.getenv('KEY_STORE_PASSWORD')) {
keystoreProperties.setProperty('storePassword', System.getenv('KEY_STORE_PASSWORD'));
keystoreProperties.setProperty('keyPassword', System.getenv('KEY_PASSWORD'));
keystoreProperties.setProperty('keyAlias', System.getenv('ALIAS'));
keystoreProperties.setProperty('storeFile', System.getenv('KEY_PATH'));
} else {
//throw new GradleException("key.properties not found. Copy key.properties.example to key.properties and modify it to suit your needs.")
}
}
android {
compileSdkVersion 30
@ -65,26 +50,6 @@ android {
}
signingConfigs {
release {
storeFile file(System.getenv("KEYSTORE") ?:"keystore.jks")
storePassword System.getenv("KEYSTORE_PASSWORD")
keyAlias System.getenv("KEY_ALIAS")
keyPassword System.getenv("KEY_PASSWORD")
// keyAlias keystoreProperties['keyAlias']
// keyPassword keystoreProperties['keyPassword']
// storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
// storePassword keystoreProperties['storePassword']
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
//applicationIdSuffix ".debug"
//debuggable true
}
release {
signingConfig signingConfigs.release
}
}
flavorDimensions "deploy"
@ -96,6 +61,14 @@ android {
}
}
android.applicationVariants.all { variant ->
if (variant.flavorName == "fdroid") {
variant.outputs.all { output ->
output.outputFileName = "app-fdroid-release.apk"
}
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"