Browse Source

Merge branch 'xx-debug-app-signing' into 'develop'

Add debug singing config

See merge request funkwhale/funkwhale-android!35
housekeeping/remove-warnings
Georg Krause 3 years ago
parent
commit
658b066d5d
  1. 1
      .gitignore
  2. 38
      .gitlab-ci.yml
  3. 25
      app/build.gradle.kts

1
.gitignore vendored

@ -6,3 +6,4 @@ @@ -6,3 +6,4 @@
/build
/captures
.externalNativeBuild
*.keystore

38
.gitlab-ci.yml

@ -4,24 +4,40 @@ stages: @@ -4,24 +4,40 @@ stages:
- build
- deploy
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
build:
.build:
stage: build
script:
before_script:
- export GRADLE_USER_HOME=$(pwd)/.gradle
- chmod +x ./gradlew
- mkdir -p .android && touch .android/repositories.cfg
- ./gradlew assembleDebug
script:
- echo "Overwrite me"
cache:
key: ${CI_PROJECT_ID}
paths:
- .gradle/
artifacts:
paths:
- app/build/outputs/apk/debug/app-debug.apk
build-develop:
extends: .build
script:
- echo -n $SIGNING_KEY_STORE | base64 -d > app/android.keystore
- ./gradlew assembleDebug -Psigning.store=android.keystore -Psigning.store_passphrase=$SIGNING_KEY_PASS -Psigning.key_passphrase=$SIGNING_KEY_PASS
only:
- develop
build-bleeding-edge:
extends: .build
script:
- ./gradlew assembleDebug
except:
- develop
deploy-develop:
stage: deploy
only:

25
app/build.gradle.kts

@ -50,12 +50,21 @@ android { @@ -50,12 +50,21 @@ android {
}
signingConfigs {
create("release") {
if (props.hasProperty("signing.store")) {
storeFile = file(props.getProperty("signing.store"))
storePassword = props.getProperty("signing.store_passphrase")
keyAlias = props.getProperty("signing.alias").toString()
keyPassword = props.getProperty("signing.key_passphrase")
if (project.hasProperty("signing.store")) {
storeFile = file(project.findProperty("signing.store")!!)
storePassword = project.findProperty("signing.store_passphrase")!!.toString()
keyAlias = "ffa"
keyPassword = project.findProperty("signing.key_passphrase")!!.toString()
}
}
getByName("debug") {
if (project.hasProperty("signing.store")) {
storeFile = file(project.findProperty("signing.store")!!)
storePassword = project.findProperty("signing.store_passphrase")!!.toString()
keyAlias = "ffa"
keyPassword = project.findProperty("signing.key_passphrase")!!.toString()
}
}
}
@ -65,6 +74,10 @@ android { @@ -65,6 +74,10 @@ android {
isDebuggable = true
applicationIdSuffix = ".dev"
if (project.hasProperty("signing.store")) {
signingConfig = signingConfigs.getByName("debug")
}
resValue("string", "debug.hostname", props.getProperty("debug.hostname", ""))
resValue("string", "debug.username", props.getProperty("debug.username", ""))
resValue("string", "debug.password", props.getProperty("debug.password", ""))
@ -72,7 +85,7 @@ android { @@ -72,7 +85,7 @@ android {
getByName("release") {
if (props.hasProperty("signing.store")) {
if (project.hasProperty("signing.store")) {
signingConfig = signingConfigs.getByName("release")
}

Loading…
Cancel
Save