diff --git a/.drone.yml b/.drone.yml index 3d470aa..b44e56a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,28 +18,53 @@ steps: - echo "keyAlias=key0" >> keystore.properties - echo "storeFile=../AndroidKey" >> keystore.properties +- name: generate versionCode + image: busybox + commands: + - touch version.properties + - let timestamp=$(date +%s)/10 + - echo "versionCode=$timestamp" >> version.properties + - name: build image: mingc/android-build-box commands: - ./gradlew test - - ./gradlew assembleDebug + - ./gradlew assembleRelease - ./gradlew bundleRelease -- name: deploy laatest buuild +- name: deploy latest build 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 + - cp ./app/build/outputs/apk/release/app-release.apk /tmp/deploy/lastBuild/app-release_latest.apk + - cp ./app/build/outputs/bundle/release/app-release.aab /tmp/deploy/lastBuild/app-release_latest.aab + +- name: deploy tagged build + image: busybox + volumes: + - name: deploy + path: /tmp/deploy + commands: + - mkdir -p /tmp/deploy/tagged/$DRONE_TAG + - cp ./app/build/outputs/apk/release/app-release.apk /tmp/deploy/tagged/$DRONE_TAG/app-release$DRONE_TAG.apk + - cp ./app/build/outputs/bundle/release/app-release.aab /tmp/deploy/tagged/$DRONE_TAG/app-release_$DRONE_TAG.aab + when: + event: + - tag - name: slack notification image: plugins/slack settings: webhook: from_secret: SlackWebhook + when: + status: + - failure + - success + volumes: - name: deploy diff --git a/.gitignore b/.gitignore index 46cc5db..5f99499 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ .cxx .idea keystore.properties +version.properties diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 7dcb52c..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -Tichu Counter \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml deleted file mode 100644 index 88ea3aa..0000000 --- a/.idea/codeStyles/Project.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - -
- - - - xmlns:android - - ^$ - - - -
-
- - - - xmlns:.* - - ^$ - - - BY_NAME - -
-
- - - - .*:id - - http://schemas.android.com/apk/res/android - - - -
-
- - - - .*:name - - http://schemas.android.com/apk/res/android - - - -
-
- - - - name - - ^$ - - - -
-
- - - - style - - ^$ - - - -
-
- - - - .* - - ^$ - - - BY_NAME - -
-
- - - - .* - - http://schemas.android.com/apk/res/android - - - ANDROID_ATTRIBUTE_ORDER - -
-
- - - - .* - - .* - - - BY_NAME - -
-
-
-
- - -
-
\ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml deleted file mode 100644 index 79ee123..0000000 --- a/.idea/codeStyles/codeStyleConfig.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index fb7f4a8..0000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/dictionaries/fabian.xml b/.idea/dictionaries/fabian.xml deleted file mode 100644 index 0fad81e..0000000 --- a/.idea/dictionaries/fabian.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - checkmark - tichu - tichucounter - zobrist - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100644 index 66ff961..0000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index bbc6cd7..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index e34606c..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 9f83b5d..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore index 42afabf..956c004 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -1 +1,2 @@ -/build \ No newline at end of file +/build +/release \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 2a084ee..ad1d585 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -4,12 +4,17 @@ 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") +def versionPropertiesFile = rootProject.file("version.properties") + // Initialize a new Properties() object called keystoreProperties. def keystoreProperties = new Properties() +def versionProperties = new Properties() + // Load your keystore.properties file into the keystoreProperties object. keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) +versionProperties.load(new FileInputStream(versionPropertiesFile)) android { compileSdkVersion 32 @@ -18,8 +23,8 @@ android { applicationId "me.zobrist.tichucounter" minSdkVersion 16 targetSdkVersion 32 - versionCode 7 - versionName "1.0.0" + versionCode versionProperties["versionCode"].toInteger() + versionName "1.1.0Beta1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/release/app-release.aab b/app/release/app-release.aab deleted file mode 100644 index f803bcf..0000000 Binary files a/app/release/app-release.aab and /dev/null differ