diff --git a/app/app/build.gradle b/app/app/build.gradle index 2adb0a81..db0fac98 100644 --- a/app/app/build.gradle +++ b/app/app/build.gradle @@ -6,12 +6,14 @@ plugins { android { compileSdk 32 + def appVersionCode = Integer.valueOf(System.env.BUILD_NUMBER ?: 0) + defaultConfig { applicationId "me.rxresu.app" minSdk 21 targetSdk 32 - versionCode 1 versionName "1.0" + versionCode appVersionCode testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/codemagic.yaml b/codemagic.yaml new file mode 100644 index 00000000..fdb37b5a --- /dev/null +++ b/codemagic.yaml @@ -0,0 +1,51 @@ +workflows: + android-workflow: + name: Android Workflow + working_directory: app + max_build_duration: 60 + instance_type: mac_mini + + environment: + node: latest + groups: + - keystore_credentials + - google_play + - other + vars: + FCI_KEYSTORE_PATH: /tmp/keystore.keystore + + triggering: + events: + - push + - tag + - pull_request + branch_patterns: + - pattern: release + include: true + source: true + + scripts: + - name: Set up local properties + script: echo "sdk.dir=$ANDROID_SDK_ROOT" > "$FCI_BUILD_DIR/local.properties" + + - name: Set up key.properties file for code signing + script: | + echo $FCI_KEYSTORE | base64 --decode > $FCI_KEYSTORE_PATH + cat >> "$FCI_BUILD_DIR/android/key.properties" <