Merge branch 'develop' into release/1.1.0
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
43
.drone.yml
43
.drone.yml
@@ -4,11 +4,44 @@ type: docker
|
||||
name: Android
|
||||
|
||||
steps:
|
||||
- name: prepare signing
|
||||
image: busybox
|
||||
environment:
|
||||
STOREPASSWORD:
|
||||
from_secret: StorePassword
|
||||
KEYPASSWORD:
|
||||
from_secret: KeyPassword
|
||||
commands:
|
||||
- touch keystore.properties
|
||||
- echo "storePassword=$STOREPASSWORD" >> keystore.properties
|
||||
- echo "keyPassword=$KEYPASSWORD" >> keystore.properties
|
||||
- echo "keyAlias=key0" >> keystore.properties
|
||||
- echo "storeFile=../AndroidKey" >> keystore.properties
|
||||
|
||||
- name: build
|
||||
image: mingc/android-build-box
|
||||
commands:
|
||||
- ./gradlew build
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
- ./gradlew test
|
||||
- ./gradlew assembleDebug
|
||||
- ./gradlew bundleRelease
|
||||
|
||||
- name: deploy laatest buuild
|
||||
image: busybox
|
||||
volumes:
|
||||
- name: deploy
|
||||
path: /tmp/deploy
|
||||
commands:
|
||||
- mkdir -p /tmp/deploy/lastBuild
|
||||
- cp ./app/build/outputs/apk/debug/app-debug.apk /tmp/deploy/lastBuild/app-debug.apk
|
||||
- cp ./app/build/outputs/bundle/release/app-release.aab /tmp/deploy/lastBuild/app-release.aab
|
||||
|
||||
- name: slack notification
|
||||
image: plugins/slack
|
||||
settings:
|
||||
webhook:
|
||||
from_secret: SlackWebhook
|
||||
|
||||
volumes:
|
||||
- name: deploy
|
||||
host:
|
||||
path: /mnt/seafile-sync-cli/TichuCounter
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
.idea
|
||||
keystore.properties
|
||||
|
||||
BIN
AndroidKey
Normal file
BIN
AndroidKey
Normal file
Binary file not shown.
@@ -1,6 +1,16 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
// Create a variable called keystorePropertiesFile, and initialize it to your
|
||||
// keystore.properties file, in the rootProject folder.
|
||||
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
|
||||
// Initialize a new Properties() object called keystoreProperties.
|
||||
def keystoreProperties = new Properties()
|
||||
|
||||
// Load your keystore.properties file into the keystoreProperties object.
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
|
||||
android {
|
||||
compileSdkVersion 32
|
||||
|
||||
@@ -13,12 +23,20 @@ android {
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
keyAlias = keystoreProperties["keyAlias"]
|
||||
keyPassword = keystoreProperties["keyPassword"]
|
||||
storeFile = file(keystoreProperties["storeFile"])
|
||||
storePassword = keystoreProperties["storePassword"]
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user