From 0ef3bc446189dde3e47fd78f4161d660ebbf8e41 Mon Sep 17 00:00:00 2001 From: Justin Bassett Date: Mon, 26 Jun 2023 09:05:17 -0400 Subject: [PATCH] First attempt at a new release model. (#3597) * First attempt at a new release model. * Fix bad syntax * Bump year and month with another job * Use the plugin's version in apps. * Make sure to generate the pre release weekly. * Review Comments. --- .../actions/create-release-notes/action.yml | 3 - .../actions/create-release-number/action.yml | 23 +-- .github/workflows/monthly.yaml | 21 +++ .github/workflows/{beta.yml => onPush.yml} | 43 ++--- .github/workflows/pr.yml | 6 +- .github/workflows/release.yml | 161 +----------------- .github/workflows/weekly.yaml | 39 +---- .gitignore | 8 + README.md | 8 +- app/build.gradle.kts | 2 +- automotive/build.gradle.kts | 2 +- build.gradle.kts | 7 + common/build.gradle.kts | 2 +- settings.gradle.kts | 9 + wear/build.gradle.kts | 2 +- 15 files changed, 95 insertions(+), 241 deletions(-) create mode 100644 .github/workflows/monthly.yaml rename .github/workflows/{beta.yml => onPush.yml} (86%) diff --git a/.github/actions/create-release-notes/action.yml b/.github/actions/create-release-notes/action.yml index 4294eaaf3af..4c44cdf12a0 100644 --- a/.github/actions/create-release-notes/action.yml +++ b/.github/actions/create-release-notes/action.yml @@ -21,6 +21,3 @@ runs: echo "Beta Changelog" git log --format="* %s" HEAD^..HEAD git log --format="* %s" HEAD^..HEAD > ./app/build/outputs/changelogBeta - - mkdir -p app/src/main/play/release-notes/en-US/ - echo "Full release change log: https://github.com/home-assistant/android/releases/latest" > app/src/main/play/release-notes/en-US/default.txt diff --git a/.github/actions/create-release-number/action.yml b/.github/actions/create-release-number/action.yml index 43e216e9a1e..d9d16cf618f 100644 --- a/.github/actions/create-release-number/action.yml +++ b/.github/actions/create-release-number/action.yml @@ -1,17 +1,12 @@ name: 'Create Release Numbers' description: 'Creates the current release number based on checked out code' -inputs: - beta: - description: 'If this is a beta build' - required: true - default: false outputs: - version: - description: 'The current app version' - value: ${{ steps.version-generator.outputs.version }} version-code: description: 'The numeric app version' value: ${{ steps.version-generator.outputs.version-code }} + version: + description: 'The app version' + value: ${{ steps.version-generator.outputs.version }} runs: using: 'composite' steps: @@ -19,18 +14,14 @@ runs: id: version-generator shell: bash run: | + ./gradlew versionFile COMMITS=`git rev-list --count HEAD` TAGS=`git tag | grep -v beta | wc -l` VC=$((((COMMITS+TAGS) * 3) << 1)) - HASH=`git rev-parse --short HEAD` - if [ "${{inputs.beta}}" = "true" ]; then - VERSION=beta-$VC-$HASH - else - VERSION=`git describe --tags` - fi echo Number Commits $COMMITS echo Number Tags $TAGS - echo Version $VERSION echo Version Code $VC - echo "version=$VERSION" >> $GITHUB_OUTPUT echo "version-code=$VC" >> $GITHUB_OUTPUT + VERSION=`cat version.txt` + echo Version $VERSION + echo "version=$VERSION" >> $GITHUB_OUTPUT diff --git a/.github/workflows/monthly.yaml b/.github/workflows/monthly.yaml new file mode 100644 index 00000000000..4745491a2db --- /dev/null +++ b/.github/workflows/monthly.yaml @@ -0,0 +1,21 @@ +name: Bump our Calendar Version + +on: + workflow_dispatch: + schedule: + - cron: '30 3 1 * *' +jobs: + tag: + name: Tag Monthly Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Get Current Time + uses: josStorer/get-current-time@v2.1.1 + id: current-time + + - name: Bump Calendar Version + uses: rickstaa/action-create-tag@v1.6.2 + with: + tag: ${{ steps.current-time.outputs.month }}.${{ steps.current-time.outputs.month }}.0 diff --git a/.github/workflows/beta.yml b/.github/workflows/onPush.yml similarity index 86% rename from .github/workflows/beta.yml rename to .github/workflows/onPush.yml index 1e2f9fa40a9..1648544dd69 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/onPush.yml @@ -1,8 +1,11 @@ -name: Beta Deploy +name: On Push on: push: - branches: [ master ] + branches: + - master + tags: + - "[0-9]+.[0-9]+.[0-9]+" jobs: app_build: @@ -31,8 +34,6 @@ jobs: - uses: ./.github/actions/create-release-number name: Create Release Number id: rel_number - with: - beta: true - uses: ./.github/actions/inflate-secrets name: Inflate Secrets @@ -56,11 +57,16 @@ jobs: KEYSTORE_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }} KEYSTORE_ALIAS: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }} KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} run: ./gradlew assembleRelease + - name: Archive Build + uses: actions/upload-artifact@v3 + with: + path: ./**/*.apk + - name: Create Github Pre-Release + if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v0.1.15 with: tag_name: ${{ steps.rel_number.outputs.version }} @@ -73,26 +79,16 @@ jobs: ./wear/build/outputs/apk/release/wear-release.apk ./automotive/build/outputs/apk/full/release/automotive-full-release.apk ./automotive/build/outputs/apk/minimal/release/automotive-minimal-release.apk + ./version.txt - name: Deploy to Firebase env: KEYSTORE_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }} KEYSTORE_ALIAS: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }} KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} run: ./gradlew appDistributionUploadFullRelease - - name: Create a Sentry.io release - uses: getsentry/action-release@v1 - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} - SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} - with: - version: io.homeassistant.companion.android@${{ steps.rel_number.outputs.version }} - environment: Beta - play_publish: name: Play Publish runs-on: ubuntu-latest @@ -121,8 +117,6 @@ jobs: - uses: ./.github/actions/create-release-number name: Create Release Number id: rel_number - with: - beta: true - uses: ./.github/actions/inflate-secrets name: Inflate Secrets @@ -146,7 +140,6 @@ jobs: KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }} KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }} KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} run: ./gradlew bundleRelease @@ -155,8 +148,18 @@ jobs: KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }} KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }} KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} run: | ./gradlew :wear:publishReleaseBundle :app:publishReleaseBundle ./gradlew :automotive:publishReleaseBundle || echo "Failed to publish Automotive!" + + - name: Promote Internal to Beta + if: startsWith(github.event.ref, 'refs/tags/') + env: + KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }} + KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }} + KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} + VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} + run: | + ./gradlew :wear:promoteReleaseBundle :app:promoteReleaseBundle + ./gradlew :automotive:promoteReleaseBundle || echo "Failed to promote Automotive!" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 22c42e48b8d..977556bd81c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -92,6 +92,10 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- + - uses: ./.github/actions/create-release-number + name: Create Release Number + id: rel_number + - name: Mock google-services.json run: | cp .github/mock-google-services.json app/google-services.json @@ -113,7 +117,7 @@ jobs: else echo -e "\n✔️ No changes in database schema directory after build" fi - + - name: Archive Debug Build uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8222830779f..729b6a4b15c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,113 +5,8 @@ on: types: [ released ] jobs: - app_build: - name: Github, Firebase, Amazon, and Sentry Releases - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up JDK 17 - uses: actions/setup-java@v3.11.0 - with: - distribution: 'temurin' - java-version: '17' - - - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - uses: ./.github/actions/create-release-number - name: Create Release Number - id: rel_number - with: - beta: false - - - uses: ./.github/actions/inflate-secrets - name: Inflate Secrets - with: - keystore: ${{ secrets.ORIGINAL_KEYSTORE_FILE }} - google-services: ${{ secrets.GOOGLESERVICES }} - firebase-creds: ${{ secrets.FIREBASECREDS }} - playstore-creds: ${{ secrets.PLAYSTORECREDS }} - - - uses: ./.github/actions/create-release-notes - name: Create Release Notes - - - name: Swap release notes - run: | - rm ./app/build/outputs/changelogBeta - cp ./app/build/outputs/changelogGithub ./app/build/outputs/changelogBeta - - - uses: ./.github/actions/download-translations - name: Download Translations - with: - lokalise-project: ${{ secrets.LOKALISE_PROJECT }} - lokalise-token: ${{ secrets.LOKALISE_TOKEN }} - - - name: Build Release - env: - KEYSTORE_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }} - KEYSTORE_ALIAS: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }} - KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} - VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} - run: ./gradlew assembleRelease - - - name: Create Version File - shell: bash - env: - VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} - run: | - echo $VERSION_CODE > ./app/build/outputs/version_code.txt - - - name: Release - uses: softprops/action-gh-release@v1 - with: - files: | - ./app/build/outputs/apk/full/release/app-full-release.apk - ./app/build/outputs/apk/minimal/release/app-minimal-release.apk - ./wear/build/outputs/apk/release/wear-release.apk - ./automotive/build/outputs/apk/full/release/automotive-full-release.apk - ./automotive/build/outputs/apk/minimal/release/automotive-minimal-release.apk - ./app/build/outputs/version_code.txt - - - name: Deploy to Firebase - env: - KEYSTORE_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }} - KEYSTORE_ALIAS: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }} - KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} - VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} - run: ./gradlew appDistributionUploadFullRelease - - - name: Deploy to Amazon - uses: ALJAZEERAPLUS/amazon-appstore-action@v1.1.1 - with: - client-id: ${{ secrets.AMAZON_APPSTORE_CLIENT_ID }} - client-secret: ${{ secrets.AMAZON_APPSTORE_CLIENT_SECRET }} - app-id: ${{ secrets.AMAZON_APPSTORE_APP_ID }} - apk-file: ./app/build/outputs/apk/minimal/release/app-minimal-release.apk - - - name: Create a Sentry.io release - uses: getsentry/action-release@v1 - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: ${{ secrets.SENTRY_ORG }} - SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} - with: - version: io.homeassistant.companion.android@${{ steps.rel_number.outputs.version }} - environment: Production - - play_publish: - name: Play Publish + play_promote_production: + name: Play Publish Production runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -133,62 +28,11 @@ jobs: restore-keys: | ${{ runner.os }}-gradle- - - uses: ./.github/actions/create-release-number - name: Create Release Number - id: rel_number - with: - beta: false - - - uses: ./.github/actions/inflate-secrets - name: Inflate Secrets - with: - keystore: ${{ secrets.UPLOAD_KEYSTORE_FILE }} - google-services: ${{ secrets.GOOGLESERVICES }} - firebase-creds: ${{ secrets.FIREBASECREDS }} - playstore-creds: ${{ secrets.PLAYSTORECREDS }} - - - uses: ./.github/actions/create-release-notes - name: Create Release Notes - - - uses: ./.github/actions/download-translations - name: Download Translations - with: - lokalise-project: ${{ secrets.LOKALISE_PROJECT }} - lokalise-token: ${{ secrets.LOKALISE_TOKEN }} - - - name: Build Release - env: - KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }} - KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }} - KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} - VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} - run: ./gradlew bundleRelease - - - name: Deploy to Playstore Internal - env: - KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }} - KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }} - KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} - VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} - run: ./gradlew :wear:publishReleaseBundle :app:publishReleaseBundle - - - name: Promote to Internal to Beta - env: - KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }} - KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }} - KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} - VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} - run: ./gradlew promoteArtifact --from-track internal --promote-track beta - - name: Promote to Beta to Production env: KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }} KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }} KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} run: ./gradlew promoteArtifact --from-track beta --promote-track production @@ -197,6 +41,5 @@ jobs: KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }} KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }} KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} run: ./gradlew publishListing diff --git a/.github/workflows/weekly.yaml b/.github/workflows/weekly.yaml index ad426f39ac7..0734c5ca0b1 100644 --- a/.github/workflows/weekly.yaml +++ b/.github/workflows/weekly.yaml @@ -1,12 +1,12 @@ -name: Weekly Playstore Beta +name: Tag Weekly Release on: workflow_dispatch: schedule: - cron: '0 4 * * 0' jobs: - play_promote: - name: Playstore Promote + tag: + name: Tag Weekly Release runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -19,34 +19,5 @@ jobs: distribution: 'temurin' java-version: '17' - - uses: actions/cache@v3 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - - uses: ./.github/actions/create-release-number - name: Create Release Number - id: rel_number - with: - beta: true - - - uses: ./.github/actions/inflate-secrets - name: Inflate Secrets - with: - keystore: ${{ secrets.UPLOAD_KEYSTORE_FILE }} - google-services: ${{ secrets.GOOGLESERVICES }} - firebase-creds: ${{ secrets.FIREBASECREDS }} - playstore-creds: ${{ secrets.PLAYSTORECREDS }} - - - name: Build Release - env: - KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }} - KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }} - KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} - VERSION: ${{ steps.rel_number.outputs.version }} - VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} - run: ./gradlew promoteArtifact --from-track internal --promote-track beta + - name: Tag Weekly Release + run: ./gradlew :reckonTagPush -Preckon.stage=final diff --git a/.gitignore b/.gitignore index 8fe3256d044..055cf2d24b5 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,11 @@ google-services.json .gradle/ build/ *.keystore + +version.txt + +# Make sure our translation downloads don't make our repo dirty when building. +strings.zip +common/src/main/res/*/strings.xml +common/src/main/res/xml/locales_config.xml +!common/src/main/res/values/strings.xml diff --git a/README.md b/README.md index 34838a1414c..c512c5d030b 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ The project currently uses [lokalise](https://lokalise.com/public/145814835dd655 ## Generating a release to production -* Create a new release with the name and tag in the `{MAJOR}.{MINOR}.{PATCH}` format -* Steal the release notes from the latest beta build -* This will cause a tag to be added to the project and the `Production Deploy` Workflow will handle the rest -* Note: Only the first 500 characters of the release notes get set in the Google Play release +* Go to the latest Pre-Release and edit it +* Delete the body of the release, select the last full release tag and auto generate the release notes +* Uncheck the Pre-Release box and click update release +* This should cause the `Play Publish Production` Workflow to execute and should handle the rest diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 14ecc640162..300feb22cbf 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -27,7 +27,7 @@ android { minSdk = 21 targetSdk = 33 - versionName = System.getenv("VERSION") ?: "LOCAL" + versionName = project.version.toString() versionCode = System.getenv("VERSION_CODE")?.toIntOrNull() ?: 1 manifestPlaceholders["sentryRelease"] = "$applicationId@$versionName" diff --git a/automotive/build.gradle.kts b/automotive/build.gradle.kts index 8d473da356f..a95e01ab0b0 100644 --- a/automotive/build.gradle.kts +++ b/automotive/build.gradle.kts @@ -26,7 +26,7 @@ android { minSdk = 29 targetSdk = 33 - versionName = System.getenv("VERSION") ?: "LOCAL" + versionName = project.version.toString() // We add 2 because the app, wear (+1) and automotive versions need to have different version codes. versionCode = (System.getenv("VERSION_CODE")?.toIntOrNull() ?: 1) + 3 diff --git a/build.gradle.kts b/build.gradle.kts index d6cb06d8021..2bf140f2713 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -44,3 +44,10 @@ tasks.register("clean").configure { ktlint { android.set(true) } + +tasks.register("versionFile").configure { + group = "publishing" + doLast { + File(projectDir, "version.txt").writeText(project.version.toString()) + } +} diff --git a/common/build.gradle.kts b/common/build.gradle.kts index b6117c4cc21..1095704c424 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -9,7 +9,7 @@ plugins { val homeAssistantAndroidPushUrl: String by project val homeAssistantAndroidRateLimitUrl: String by project -val versionName = System.getenv("VERSION") ?: "LOCAL" +val versionName = project.version.toString() val versionCode = System.getenv("VERSION_CODE")?.toIntOrNull() ?: 1 android { diff --git a/settings.gradle.kts b/settings.gradle.kts index 3473b758b98..56ecc7acf01 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -6,6 +6,7 @@ rootProject.name = "home-assistant-android" plugins { id("com.gradle.enterprise").version("3.7") + id("org.ajoberstar.reckon.settings").version("0.18.0") } // It should be easier to read an environment variable here once github.com/gradle/configuration-cache/issues/211 is resolved. @@ -23,6 +24,14 @@ gradleEnterprise { } } +extensions.configure { + setDefaultInferredScope("patch") + stages("beta", "final") + setScopeCalc { java.util.Optional.of(org.ajoberstar.reckon.core.Scope.PATCH) } + setStageCalc(calcStageFromProp()) + setTagWriter { it.toString() } +} + dependencyResolutionManagement { repositories { mavenCentral() diff --git a/wear/build.gradle.kts b/wear/build.gradle.kts index 6036ec8867b..af08776cad3 100644 --- a/wear/build.gradle.kts +++ b/wear/build.gradle.kts @@ -18,7 +18,7 @@ android { minSdk = 26 targetSdk = 32 - versionName = System.getenv("VERSION") ?: "LOCAL" + versionName = project.version.toString() // We add 1 because the app and wear versions need to have different version codes. versionCode = (System.getenv("VERSION_CODE")?.toIntOrNull() ?: 1) + 1