From e443565430e6fa2d0e2fb11462e49234ee914271 Mon Sep 17 00:00:00 2001 From: James Sears Date: Sun, 8 Dec 2024 18:13:34 +0200 Subject: [PATCH] changelogs/8.txt --- .github/workflows/androidTest.yml | 278 ------------------ .github/workflows/codecov-app.androidTest.yml | 129 ++++++++ ...decov.yml => codecov-data.androidTest.yml} | 36 +-- .../{test-codecov.yml => codecov-test.yml} | 6 +- .../codecov-ui-dialog-bag.androidTest.yml | 129 ++++++++ .github/workflows/codecov-ui.androidTest.yml | 129 ++++++++ .github/workflows/static-analysis.yml | 44 +++ README.md | 6 +- app/build.gradle.kts | 4 +- bin/envvars.sh.gpg | Bin 1342 -> 1437 bytes build.gradle.kts | 13 + codecov.yml | 6 +- .../metadata/android/en-US/changelogs/8.txt | 3 + gradle/libs.versions.toml | 22 +- gradle/wrapper/gradle-wrapper.properties | 4 +- .../dice/composable/BagCardDiceComposable.kt | 11 + .../src/main/res/values/strings.xml | 5 +- .../ui/tab/bag/composable/TabBagComposable.kt | 4 +- 18 files changed, 493 insertions(+), 336 deletions(-) delete mode 100644 .github/workflows/androidTest.yml create mode 100644 .github/workflows/codecov-app.androidTest.yml rename .github/workflows/{androidTest-codecov.yml => codecov-data.androidTest.yml} (77%) rename .github/workflows/{test-codecov.yml => codecov-test.yml} (97%) create mode 100644 .github/workflows/codecov-ui-dialog-bag.androidTest.yml create mode 100644 .github/workflows/codecov-ui.androidTest.yml create mode 100644 fastlane/metadata/android/en-US/changelogs/8.txt diff --git a/.github/workflows/androidTest.yml b/.github/workflows/androidTest.yml deleted file mode 100644 index fa9c9de1..00000000 --- a/.github/workflows/androidTest.yml +++ /dev/null @@ -1,278 +0,0 @@ -name: androidTest - -on: - push: - # This should disable running the workflow on tags, according to the - # on.. GitHub Actions docs. - branches: - - "*" - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - CACHE_VERSION: 1 - -jobs: - app: - name: app - runs-on: ubuntu-latest - timeout-minutes: 45 - strategy: - fail-fast: true - matrix: - api-level: [ 31 ] - - steps: - - name: clone - uses: actions/checkout@v4 - with: - fetch-depth: 1 - submodules: true - - - name: Enable KVM - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 17 - - run: ./ci_clear_gradle_cache.sh - - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }} - - - name: Get AVD info - uses: ./.github/actions/get-avd-info - id: avd-info - with: - api-level: ${{ matrix.api-level }} - - - uses: actions/cache@v4 - id: avd-cache - with: - path: | - ~/.android/avd/* - ~/.android/adb* - key: ${{ runner.os }}-avd-${{ env.CACHE_VERSION }}-${{ steps.avd-info.outputs.arch }}-${{ steps.avd-info.outputs.target }}-${{ matrix.api-level }} - - - name: Create AVD snapshot - if: steps.avd-cache.outputs.cache-hit != 'true' - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - arch: ${{ steps.avd-info.outputs.arch }} - target: ${{ steps.avd-info.outputs.target }} - disable-animations: false - force-avd-creation: false - ram-size: 4096M - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - script: echo "Generated AVD snapshot." - - - name: local.properties - env: - LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} - run: | - echo "${LOCAL_PROPERTIES}" | base64 -d > local.properties - - - name: google-services.json - env: - GOOGLE_PLAY_JSON_DEVELOPMENT: ${{ secrets.GOOGLE_PLAY_JSON_DEVELOPMENT }} - run: echo "${GOOGLE_PLAY_JSON_DEVELOPMENT}" | base64 -d > app/google-services.json - - - name: connectedFdroidDebugAndroidTest - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - arch: ${{ steps.avd-info.outputs.arch }} - target: ${{ steps.avd-info.outputs.target }} - disable-animations: true - force-avd-creation: false - ram-size: 4096M - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - script: | - adb logcat -c - adb logcat > logcat.txt & - ./gradlew app:uninstallAll app:connectedFdroidDebugAndroidTest - - module-data: - name: module-data - runs-on: ubuntu-latest - timeout-minutes: 45 - strategy: - fail-fast: true - matrix: - api-level: [ 31 ] - - steps: - - name: clone - uses: actions/checkout@v4 - with: - fetch-depth: 1 - submodules: true - - - name: Enable KVM - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 17 - - run: ./ci_clear_gradle_cache.sh - - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }} - - - name: Get AVD info - uses: ./.github/actions/get-avd-info - id: avd-info - with: - api-level: ${{ matrix.api-level }} - - - uses: actions/cache@v4 - id: avd-cache - with: - path: | - ~/.android/avd/* - ~/.android/adb* - key: ${{ runner.os }}-avd-${{ env.CACHE_VERSION }}-${{ steps.avd-info.outputs.arch }}-${{ steps.avd-info.outputs.target }}-${{ matrix.api-level }} - - - name: Create AVD snapshot - if: steps.avd-cache.outputs.cache-hit != 'true' - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - arch: ${{ steps.avd-info.outputs.arch }} - target: ${{ steps.avd-info.outputs.target }} - disable-animations: false - force-avd-creation: false - ram-size: 4096M - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - script: echo "Generated AVD snapshot." - - - name: local.properties - env: - LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} - run: | - echo "${LOCAL_PROPERTIES}" | base64 -d > local.properties - - - name: google-services.json - env: - GOOGLE_PLAY_JSON_DEVELOPMENT: ${{ secrets.GOOGLE_PLAY_JSON_DEVELOPMENT }} - run: echo "${GOOGLE_PLAY_JSON_DEVELOPMENT}" | base64 -d > app/google-services.json - - - name: connectedFdroidDebugAndroidTest - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - arch: ${{ steps.avd-info.outputs.arch }} - target: ${{ steps.avd-info.outputs.target }} - disable-animations: true - force-avd-creation: false - ram-size: 4096M - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - script: | - adb logcat -c - adb logcat > logcat.txt & - ./gradlew app:uninstallAll module:data:connectedFdroidDebugAndroidTest - - module-ui-dialog-bag: - name: module-ui-dialog-bag - runs-on: ubuntu-latest - timeout-minutes: 45 - strategy: - fail-fast: true - matrix: - api-level: [ 31 ] - - steps: - - name: clone - uses: actions/checkout@v4 - with: - fetch-depth: 1 - submodules: true - - - name: Enable KVM - run: | - echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules - sudo udevadm control --reload-rules - sudo udevadm trigger --name-match=kvm - - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: 17 - - run: ./ci_clear_gradle_cache.sh - - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }} - - - name: Get AVD info - uses: ./.github/actions/get-avd-info - id: avd-info - with: - api-level: ${{ matrix.api-level }} - - - uses: actions/cache@v4 - id: avd-cache - with: - path: | - ~/.android/avd/* - ~/.android/adb* - key: ${{ runner.os }}-avd-${{ env.CACHE_VERSION }}-${{ steps.avd-info.outputs.arch }}-${{ steps.avd-info.outputs.target }}-${{ matrix.api-level }} - - - name: Create AVD snapshot - if: steps.avd-cache.outputs.cache-hit != 'true' - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - arch: ${{ steps.avd-info.outputs.arch }} - target: ${{ steps.avd-info.outputs.target }} - disable-animations: false - force-avd-creation: false - ram-size: 4096M - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - script: echo "Generated AVD snapshot." - - - name: local.properties - env: - LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} - run: | - echo "${LOCAL_PROPERTIES}" | base64 -d > local.properties - - - name: google-services.json - env: - GOOGLE_PLAY_JSON_DEVELOPMENT: ${{ secrets.GOOGLE_PLAY_JSON_DEVELOPMENT }} - run: echo "${GOOGLE_PLAY_JSON_DEVELOPMENT}" | base64 -d > app/google-services.json - - - name: connectedFdroidDebugAndroidTest - uses: reactivecircus/android-emulator-runner@v2 - with: - api-level: ${{ matrix.api-level }} - arch: ${{ steps.avd-info.outputs.arch }} - target: ${{ steps.avd-info.outputs.target }} - disable-animations: true - force-avd-creation: false - ram-size: 4096M - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none - script: | - adb logcat -c - adb logcat > logcat.txt & - ./gradlew app:uninstallAll module:ui-dialog-bag:connectedFdroidDebugAndroidTest - diff --git a/.github/workflows/codecov-app.androidTest.yml b/.github/workflows/codecov-app.androidTest.yml new file mode 100644 index 00000000..21e582ba --- /dev/null +++ b/.github/workflows/codecov-app.androidTest.yml @@ -0,0 +1,129 @@ +name: codecov-app.androidTest + +on: + push: + branches: + - "*" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + CACHE_VERSION: 1 + +jobs: + fdroid: + name: fdroid + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: true + matrix: + api-level: [ 31 ] + + steps: + - name: clone + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + - run: ./ci_clear_gradle_cache.sh + - uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }} + + - name: Get AVD info + uses: ./.github/actions/get-avd-info + id: avd-info + with: + api-level: ${{ matrix.api-level }} + + - uses: actions/cache@v4 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: ${{ runner.os }}-avd-${{ env.CACHE_VERSION }}-${{ steps.avd-info.outputs.arch }}-${{ steps.avd-info.outputs.target }}-${{ matrix.api-level }} + + - name: Create AVD snapshot + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + arch: ${{ steps.avd-info.outputs.arch }} + target: ${{ steps.avd-info.outputs.target }} + disable-animations: false + force-avd-creation: false + ram-size: 4096M + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + script: echo "Generated AVD snapshot." + + - name: local.properties + env: + LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} + run: | + echo "${LOCAL_PROPERTIES}" | base64 -d > local.properties + + - name: google-services.json + env: + GOOGLE_PLAY_JSON_DEVELOPMENT: ${{ secrets.GOOGLE_PLAY_JSON_DEVELOPMENT }} + run: echo "${GOOGLE_PLAY_JSON_DEVELOPMENT}" | base64 -d > app/google-services.json + + - name: jacocoFdroidAndroidTestReport + if: matrix.api-level == 31 + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + arch: ${{ steps.avd-info.outputs.arch }} + target: ${{ steps.avd-info.outputs.target }} + disable-animations: true + force-avd-creation: false + ram-size: 4096M + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + script: | + adb logcat -c + adb logcat > logcat.txt & + ./gradlew :app:jacocoFdroidAndroidTestReport --stacktrace + + - name: codecov - app.androidTest + if: matrix.api-level == 31 + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + files: ./app/build/reports/jacoco/androidTest.xml + flags: app.androidTest + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: artifact logcat + if: always() + uses: actions/upload-artifact@v4 + with: + name: fdroid-logcat-${{ matrix.api-level }} + path: logcat.txt + + - name: artifact reports + if: always() + uses: actions/upload-artifact@v4 + with: + name: fdroid-${{ matrix.api-level }} + path: | + **/build/reports/* + **/build/outputs/*/connected/* diff --git a/.github/workflows/androidTest-codecov.yml b/.github/workflows/codecov-data.androidTest.yml similarity index 77% rename from .github/workflows/androidTest-codecov.yml rename to .github/workflows/codecov-data.androidTest.yml index 648fc6c5..8bc0e267 100644 --- a/.github/workflows/androidTest-codecov.yml +++ b/.github/workflows/codecov-data.androidTest.yml @@ -1,9 +1,7 @@ -name: androidTest-codecov +name: codecov-data.androidTest on: push: - # This should disable running the workflow on tags, according to the - # on.. GitHub Actions docs. branches: - "*" @@ -18,7 +16,7 @@ jobs: fdroid: name: fdroid runs-on: ubuntu-latest - timeout-minutes: 45 + timeout-minutes: 30 strategy: fail-fast: true matrix: @@ -88,7 +86,7 @@ jobs: run: echo "${GOOGLE_PLAY_JSON_DEVELOPMENT}" | base64 -d > app/google-services.json - name: jacocoFdroidAndroidTestReport - if: matrix.api-level == 34 + if: matrix.api-level == 31 uses: reactivecircus/android-emulator-runner@v2 with: api-level: ${{ matrix.api-level }} @@ -101,21 +99,10 @@ jobs: script: | adb logcat -c adb logcat > logcat.txt & - ./gradlew app:uninstallAll jacocoFdroidAndroidTestReport - - - name: codecov - app.androidTest - if: matrix.api-level == 34 - uses: codecov/codecov-action@v5 - with: - fail_ci_if_error: true - files: ./app/build/reports/jacoco/androidTest.xml - flags: app.androidTest - verbose: true - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + ./gradlew :module:data:jacocoFdroidAndroidTestReport --stacktrace - name: codecov - data.androidTest - if: matrix.api-level == 34 + if: matrix.api-level == 31 uses: codecov/codecov-action@v5 with: fail_ci_if_error: true @@ -125,17 +112,6 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: codecov - ui-data-dialog.androidTest - if: matrix.api-level == 34 - uses: codecov/codecov-action@v5 - with: - fail_ci_if_error: true - files: ./module/ui-data-dialog/build/reports/jacoco/androidTest.xml - flags: ui-data-dialog.androidTest - verbose: true - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: artifact logcat if: always() uses: actions/upload-artifact@v4 @@ -143,7 +119,7 @@ jobs: name: fdroid-logcat-${{ matrix.api-level }} path: logcat.txt - - name: artifact + - name: artifact reports if: always() uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/test-codecov.yml b/.github/workflows/codecov-test.yml similarity index 97% rename from .github/workflows/test-codecov.yml rename to .github/workflows/codecov-test.yml index a95e95df..98ff5498 100755 --- a/.github/workflows/test-codecov.yml +++ b/.github/workflows/codecov-test.yml @@ -1,4 +1,4 @@ -name: test-codecov +name: codecov-test on: push: @@ -13,8 +13,8 @@ env: CACHE_VERSION: 1 jobs: - test-codecov: - name: test-codecov + fdroid: + name: fdroid runs-on: ubuntu-latest steps: - name: clone diff --git a/.github/workflows/codecov-ui-dialog-bag.androidTest.yml b/.github/workflows/codecov-ui-dialog-bag.androidTest.yml new file mode 100644 index 00000000..ffbc8f68 --- /dev/null +++ b/.github/workflows/codecov-ui-dialog-bag.androidTest.yml @@ -0,0 +1,129 @@ +name: codecov-ui-dialog-bag.androidTest + +on: + push: + branches: + - "*" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + CACHE_VERSION: 1 + +jobs: + fdroid: + name: fdroid + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: true + matrix: + api-level: [ 31 ] + + steps: + - name: clone + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + - run: ./ci_clear_gradle_cache.sh + - uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }} + + - name: Get AVD info + uses: ./.github/actions/get-avd-info + id: avd-info + with: + api-level: ${{ matrix.api-level }} + + - uses: actions/cache@v4 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: ${{ runner.os }}-avd-${{ env.CACHE_VERSION }}-${{ steps.avd-info.outputs.arch }}-${{ steps.avd-info.outputs.target }}-${{ matrix.api-level }} + + - name: Create AVD snapshot + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + arch: ${{ steps.avd-info.outputs.arch }} + target: ${{ steps.avd-info.outputs.target }} + disable-animations: false + force-avd-creation: false + ram-size: 4096M + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + script: echo "Generated AVD snapshot." + + - name: local.properties + env: + LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} + run: | + echo "${LOCAL_PROPERTIES}" | base64 -d > local.properties + + - name: google-services.json + env: + GOOGLE_PLAY_JSON_DEVELOPMENT: ${{ secrets.GOOGLE_PLAY_JSON_DEVELOPMENT }} + run: echo "${GOOGLE_PLAY_JSON_DEVELOPMENT}" | base64 -d > app/google-services.json + + - name: jacocoFdroidAndroidTestReport + if: matrix.api-level == 31 + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + arch: ${{ steps.avd-info.outputs.arch }} + target: ${{ steps.avd-info.outputs.target }} + disable-animations: true + force-avd-creation: false + ram-size: 4096M + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + script: | + adb logcat -c + adb logcat > logcat.txt & + ./gradlew :module:ui-dialog-bag:jacocoFdroidAndroidTestReport --stacktrace + + - name: codecov - ui.androidTest + if: matrix.api-level == 31 + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + files: ./module/ui-dialog-bag/build/reports/jacoco/androidTest.xml + flags: ui-dialog-bag.androidTest + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: artifact logcat + if: always() + uses: actions/upload-artifact@v4 + with: + name: fdroid-logcat-${{ matrix.api-level }} + path: logcat.txt + + - name: artifact reports + if: always() + uses: actions/upload-artifact@v4 + with: + name: fdroid-${{ matrix.api-level }} + path: | + **/build/reports/* + **/build/outputs/*/connected/* diff --git a/.github/workflows/codecov-ui.androidTest.yml b/.github/workflows/codecov-ui.androidTest.yml new file mode 100644 index 00000000..7a352c3e --- /dev/null +++ b/.github/workflows/codecov-ui.androidTest.yml @@ -0,0 +1,129 @@ +name: codecov-ui.androidTest + +on: + push: + branches: + - "*" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + CACHE_VERSION: 1 + +jobs: + fdroid: + name: fdroid + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: true + matrix: + api-level: [ 31 ] + + steps: + - name: clone + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 17 + - run: ./ci_clear_gradle_cache.sh + - uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ env.CACHE_VERSION }}-${{ hashFiles('**/**.gradle.kts', '**/gradle/wrapper/gradle-wrapper.properties', '**/libs.versions.toml') }} + + - name: Get AVD info + uses: ./.github/actions/get-avd-info + id: avd-info + with: + api-level: ${{ matrix.api-level }} + + - uses: actions/cache@v4 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: ${{ runner.os }}-avd-${{ env.CACHE_VERSION }}-${{ steps.avd-info.outputs.arch }}-${{ steps.avd-info.outputs.target }}-${{ matrix.api-level }} + + - name: Create AVD snapshot + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + arch: ${{ steps.avd-info.outputs.arch }} + target: ${{ steps.avd-info.outputs.target }} + disable-animations: false + force-avd-creation: false + ram-size: 4096M + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + script: echo "Generated AVD snapshot." + + - name: local.properties + env: + LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }} + run: | + echo "${LOCAL_PROPERTIES}" | base64 -d > local.properties + + - name: google-services.json + env: + GOOGLE_PLAY_JSON_DEVELOPMENT: ${{ secrets.GOOGLE_PLAY_JSON_DEVELOPMENT }} + run: echo "${GOOGLE_PLAY_JSON_DEVELOPMENT}" | base64 -d > app/google-services.json + + - name: jacocoFdroidAndroidTestReport + if: matrix.api-level == 31 + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + arch: ${{ steps.avd-info.outputs.arch }} + target: ${{ steps.avd-info.outputs.target }} + disable-animations: true + force-avd-creation: false + ram-size: 4096M + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + script: | + adb logcat -c + adb logcat > logcat.txt & + ./gradlew :module:ui:jacocoFdroidAndroidTestReport --stacktrace + + - name: codecov - ui.androidTest + if: matrix.api-level == 31 + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + files: ./module/ui/build/reports/jacoco/androidTest.xml + flags: ui.androidTest + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + - name: artifact logcat + if: always() + uses: actions/upload-artifact@v4 + with: + name: fdroid-logcat-${{ matrix.api-level }} + path: logcat.txt + + - name: artifact reports + if: always() + uses: actions/upload-artifact@v4 + with: + name: fdroid-${{ matrix.api-level }} + path: | + **/build/reports/* + **/build/outputs/*/connected/* diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 6bfe79ec..92d7a21f 100755 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -136,3 +136,47 @@ jobs: run: | set -x ./gradlew lintFdroidDebug + + SonarQube: + name: SonarQube + needs: [ detekt, ktlint ] + runs-on: ubuntu-latest + steps: + - name: clone + uses: actions/checkout@v4 + with: + fetch-depth: 1 + submodules: true + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'zulu' + + - name: Cache SonarQube packages + uses: actions/cache@v4 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + + - name: Cache Gradle packages + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} + restore-keys: ${{ runner.os }}-gradle + + - name: compile + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + ./gradlew compileFdroidDebugSources + + - name: sonar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: ./gradlew sonar --info --stacktrace diff --git a/README.md b/README.md index d04fc929..64d6b8a1 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,6 @@ ## main -| test-codecov | androidTest-codecov | static-analysis | sonar | codecov | -|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------| -| [![test-codecov](https://github.com/jameshnsears/Chance/actions/workflows/test-codecov.yml/badge.svg)](https://github.com/jameshnsears/Chance/actions/workflows/test-codecov.yml) | [![androidTest-codecov](https://github.com/jameshnsears/Chance/actions/workflows/androidTest-codecov.yml/badge.svg)](https://github.com/jameshnsears/Chance/actions/workflows/androidTest-codecov.yml) | [![static-analysis](https://github.com/jameshnsears/Chance/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/jameshnsears/Chance/actions/workflows/static-analysis.yml) | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=jameshnsears-github_chance&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=jameshnsears-github_chance) | [![codecov](https://codecov.io/gh/jameshnsears/Chance/graph/badge.svg?token=6S238TK3QV)](https://codecov.io/gh/jameshnsears/Chance) | +| codecov-test | codecov-app.androidTest | static-analysis | SonarQube Cloud | Codecov | +|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------| +| [![codecov-test](https://github.com/jameshnsears/Chance/actions/workflows/codecov-test.yml/badge.svg)](https://github.com/jameshnsears/Chance/actions/workflows/codecov-test.yml) | [![codecov-app.androidTest](https://github.com/jameshnsears/Chance/actions/workflows/codecov-app.androidTest.yml/badge.svg)](https://github.com/jameshnsears/Chance/actions/workflows/codecov-app.androidTest.yml) | [![static-analysis](https://github.com/jameshnsears/Chance/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/jameshnsears/Chance/actions/workflows/static-analysis.yml) | [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=jameshnsears-github_chance&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=jameshnsears-github_chance) | [![codecov](https://codecov.io/gh/jameshnsears/Chance/graph/badge.svg?token=6S238TK3QV)](https://codecov.io/gh/jameshnsears/Chance) | diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 6d17fcf3..0f9ebdc4 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -15,9 +15,9 @@ android { targetSdk = 35 // changelog | min sdk | max sdk - versionCode = 72435 + versionCode = 82435 - versionName = "1.3.0" + versionName = "1.4.0" extra["versionName"] = versionName diff --git a/bin/envvars.sh.gpg b/bin/envvars.sh.gpg index d951a36b57c464ad7ae3b2e6c51e278176e8eb9f..3fe6f955c80084b5062759ab281a67095e917209 100644 GIT binary patch literal 1437 zcmV;O1!DSz0t^E~*;<}4Ku~o75B(E!`>&FNY!df+bQonmF|?EfhZEi}aukM}mJyy~ zM=>}}sKzfL*{Oqg;Ha+U89=- z@8fdKzTH5dvrc{5V;~yZUqXfq0gKI3`}$}F>R?I$Lz3`mfN`ADL+yhN;L}{b{-K)z zy{BM|jCn%p9V?1TDv&zj3t8F1=aR$s7wV^!TN39%wQU!aD!pV$*m~&29a8u-c%eEW zWQ*Ym#4*DfH#@mz7mp!BpjtVJQJTr?X-gxR4gCKN_n6_;lg-GiD1H))1aKFmbYxC5 zXwe1eS;bX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gradle.kts index a65d3f95..de847e65 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,6 +11,19 @@ plugins { alias(libs.plugins.org.jlleitschuh.gradle.ktlint) alias(libs.plugins.android.test) apply false alias(libs.plugins.baselineprofile) apply false + alias(libs.plugins.org.sonarqube) +} + +sonarqube { + properties { + property("sonar.projectKey", "jameshnsears-github_chance") + property("sonar.organization", "jameshnsears-github") + property("sonar.host.url", "https://sonarcloud.io") + property("sonar.branch.name", "main") + property("sonar.sources", "**/src/main/kotlin") + property("sonar.exclusions", "**/src/main/java") + property("sonar.kotlin.binaries", "**/build/tmp/kotlin-classes/fdroidDebug") + } } spotless { diff --git a/codecov.yml b/codecov.yml index a7a5c310..51881537 100644 --- a/codecov.yml +++ b/codecov.yml @@ -3,6 +3,9 @@ ignore: - "**/*Preview.kt" flags: + app.androidTest: + carryforward: false + data.androidTest: carryforward: false data.test: @@ -17,6 +20,3 @@ flags: carryforward: false ui-dialog-bag.test: carryforward: false - - app.androidTest: - carryforward: false diff --git a/fastlane/metadata/android/en-US/changelogs/8.txt b/fastlane/metadata/android/en-US/changelogs/8.txt new file mode 100644 index 00000000..105656cc --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/8.txt @@ -0,0 +1,3 @@ +• Improve Clone instructions +• Improve CI - Codecov + SonarQube Cloud +• Bump dependencies & IDE: Android Studio Ladybug | 2024.2.1 Patch 3 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d1ba0336..32afb6f7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,7 +5,7 @@ baselineprofile = "1.3.3" benchmark-macro-junit4 = "1.3.3" coil-svg = "2.7.0" colorpicker-compose = "1.1.2" -com-android-application = "8.7.2" +com-android-application = "8.7.3" com-android-library = "8.6.1" com-diffplug-spotless = "6.25.0" com-google-gms-google-services = "4.4.2" @@ -13,27 +13,28 @@ compose-bom = "2024.11.00" core-ktx = "1.15.0" core-splashscreen = "1.0.1" datastore-core = "1.1.1" -espresso-core = "3.5.0" # stay on 3.5.0 due to androidx.compose.ui:ui-test-junit4:1.6.8 compatability -firebase-bom = "33.5.1" +espresso-core = "3.5.0" # stay on 3.5.0 due to: androidx.compose.ui:ui-test-junit4:1.6.8 compatability +firebase-bom = "33.7.0" firebase-crashalytics-plugin = "3.0.2" io-gitlab-arturbosch-detekt = "1.23.7" -jackson-module-kotlin = "2.18.1" -json-kotlin-schema = "0.51" +jackson-module-kotlin = "2.18.2" +json-kotlin-schema = "0.52" jsonschema-generator = "4.37.0" junit = "1.2.1" junit-bom = "5.11.3" -kotlin-test = "2.0.21" +kotlin-test = "2.1.0" kotlinx-coroutines-test = "1.9.0" leakcanary-android = "2.14" lifecycle-runtime-compose = "2.8.7" lifecycle-viewmodel-compose = "2.8.7" mockk = "1.13.13" org-jetbrains-kotlin-android = "2.0.20" -org-jlleitschuh-gradle-ktlint = "12.1.1" +org-jlleitschuh-gradle-ktlint = "12.1.2" +org-sonarqube = "5.1.0.4882" # stay on 5.1.0.4882 due to: Sonarqube-gradle-plugin:6.0.1.5171 - org.bouncycastle.asn1.edec.EdECObjectIdentifiers profileinstaller = "1.4.1" -protobuf-java = "4.28.3" -protobuf-java-util = "4.28.3" -protobuf-kotlin = "4.28.3" +protobuf-java = "4.29.1" +protobuf-java-util = "4.29.1" +protobuf-kotlin = "4.29.1" slf4j-simple = "2.0.16" timber = "5.0.1" uiautomator = "2.3.0" @@ -92,3 +93,4 @@ io-gitlab-arturbosch-detekt = { id = "io.gitlab.arturbosch.detekt", version.ref org-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "org-jetbrains-kotlin-android" } org-jetbrains-kotlin-plugin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "org-jetbrains-kotlin-android" } org-jlleitschuh-gradle-ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "org-jlleitschuh-gradle-ktlint" } +org-sonarqube = { id = "org.sonarqube", version.ref = "org-sonarqube" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e993bd74..2105ab5d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Nov 13 12:08:57 EET 2024 +#Sat Dec 07 17:01:59 EET 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/module/ui-dialog-bag/src/main/kotlin/com/github/jameshnsears/chance/ui/dialog/bag/card/dice/composable/BagCardDiceComposable.kt b/module/ui-dialog-bag/src/main/kotlin/com/github/jameshnsears/chance/ui/dialog/bag/card/dice/composable/BagCardDiceComposable.kt index c7f313e1..e5cee442 100644 --- a/module/ui-dialog-bag/src/main/kotlin/com/github/jameshnsears/chance/ui/dialog/bag/card/dice/composable/BagCardDiceComposable.kt +++ b/module/ui-dialog-bag/src/main/kotlin/com/github/jameshnsears/chance/ui/dialog/bag/card/dice/composable/BagCardDiceComposable.kt @@ -219,6 +219,17 @@ fun DiceTitle(cardDiceViewModel: CardDiceViewModel) { text = stringResource(R.string.dialog_bag_dice_title_info), ) } + + Row( + modifier = Modifier + .padding(top = 8.dp, bottom = 8.dp) + .fillMaxWidth(), + verticalAlignment = Alignment.CenterVertically, + ) { + Text( + text = stringResource(R.string.dialog_bag_dice_title_clone), + ) + } } @Composable diff --git a/module/ui-dialog-bag/src/main/res/values/strings.xml b/module/ui-dialog-bag/src/main/res/values/strings.xml index 28430f32..ff6d662e 100644 --- a/module/ui-dialog-bag/src/main/res/values/strings.xml +++ b/module/ui-dialog-bag/src/main/res/values/strings.xml @@ -19,12 +19,13 @@ SVG fileā€¦ Drop SVG Apply SVG to all sides - SVG file can be a maximum of 250Kb in size + SVG file can be a maximum size of 250Kb Invalid SVG Dice Title Title must be unique and a maximum of 25 characters + Change the title to enable Clone feature Sides Changing the number of sides will undo associated rolls @@ -47,4 +48,4 @@ Side # Side Description Dice - \ No newline at end of file + diff --git a/module/ui/src/main/kotlin/com/github/jameshnsears/chance/ui/tab/bag/composable/TabBagComposable.kt b/module/ui/src/main/kotlin/com/github/jameshnsears/chance/ui/tab/bag/composable/TabBagComposable.kt index b5596c9b..5858bce8 100644 --- a/module/ui/src/main/kotlin/com/github/jameshnsears/chance/ui/tab/bag/composable/TabBagComposable.kt +++ b/module/ui/src/main/kotlin/com/github/jameshnsears/chance/ui/tab/bag/composable/TabBagComposable.kt @@ -42,7 +42,6 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp -import androidx.core.content.ContextCompat.startActivity import androidx.lifecycle.compose.LocalLifecycleOwner import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.github.jameshnsears.chance.ui.BuildConfig @@ -370,6 +369,5 @@ fun Version( } fun openUrlInBrowser(context: Context, url: String) { - val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) - startActivity(context, intent, null) + context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url))) }