mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Add build CI
This commit is contained in:
parent
9e935b05a2
commit
6b42077940
19
.gitlab-ci.yml
Normal file
19
.gitlab-ci.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
default:
|
||||||
|
image: "docker.io/abb128/android-build:latest@sha256:8df16e2badb5e42d2f5e3862683c7ff0ebdcc348affe059385e42eebef79302f"
|
||||||
|
|
||||||
|
stages: # List of stages for jobs, and their order of execution
|
||||||
|
- build
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
script:
|
||||||
|
- ./setUpKeysCI.sh
|
||||||
|
- gradle assembleRelease -s
|
||||||
|
- mv build/outputs/apk/release/LatinIME-release.apk ./LatinIME-release-$CI_COMMIT_SHORT_SHA.apk
|
||||||
|
artifacts:
|
||||||
|
name: "LatinIME-release-$CI_COMMIT_SHORT_SHA"
|
||||||
|
paths:
|
||||||
|
- ./*.apk
|
||||||
|
when: manual
|
19
build.gradle
19
build.gradle
@ -33,8 +33,6 @@ android {
|
|||||||
testApplicationId 'org.futo.inputmethod.latin.tests'
|
testApplicationId 'org.futo.inputmethod.latin.tests'
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables.useSupportLibrary = false
|
vectorDrawables.useSupportLibrary = false
|
||||||
|
|
||||||
signingConfig signingConfigs.debug
|
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
@ -43,12 +41,29 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final def keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||||
|
def releaseSigning = signingConfigs.debug
|
||||||
|
if (keystorePropertiesFile.exists()) {
|
||||||
|
final def keystoreProperties = new Properties()
|
||||||
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||||
|
releaseSigning = signingConfigs.create("release") {
|
||||||
|
keyAlias keystoreProperties['keyAlias']
|
||||||
|
keyPassword keystoreProperties['keyPassword']
|
||||||
|
storeFile rootProject.file(keystoreProperties['storeFile'])
|
||||||
|
storePassword keystoreProperties['storePassword']
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
project.logger.lifecycle('keystore.properties not found, APK may not be signed')
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
|
signingConfig signingConfigs.debug
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.flags'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.flags'
|
||||||
|
signingConfig releaseSigning
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
setUpKeysCI.sh
Executable file
6
setUpKeysCI.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
echo ${KEYSTORE_FILE?Need keystore file} | base64 --decode > key.jks
|
||||||
|
echo storePassword=${KEYSTORE_PASSWORD?Need keystore password} > keystore.properties
|
||||||
|
echo keyPassword=${KEY_PASSWORD?Need key password} >> keystore.properties
|
||||||
|
echo keyAlias=${KEYSTORE_ALIAS?Need key alias} >> keystore.properties
|
||||||
|
echo storeFile=key.jks >> keystore.properties
|
Loading…
Reference in New Issue
Block a user