From 37c8a1aa0aa176979cb40fcd4527208ce7ec7daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Fri, 16 Aug 2024 18:04:01 +0200 Subject: [PATCH 1/7] Update ci workflows --- .github/workflows/android-test.yml | 14 +++++++++++++- .github/workflows/changelog.yml | 3 ++- .github/workflows/ci.yml | 30 +++++++++++++++++++++++++----- 3 files changed, 40 insertions(+), 7 deletions(-) diff --git a/.github/workflows/android-test.yml b/.github/workflows/android-test.yml index ed29655..f666cb8 100644 --- a/.github/workflows/android-test.yml +++ b/.github/workflows/android-test.yml @@ -8,6 +8,7 @@ jobs: status: ${{ steps.check-androidTest.outputs.NOT_EMPTY }} min-sdk-version: ${{ steps.get-sdk-version.outputs.MIN_SDK_VERSION }} target-sdk-version: ${{ steps.get-sdk-version.outputs.TARGET_SDK_VERSION }} + app-id: ${{ steps.get-app-id.outputs.APP_ID }} steps: - name: Checkout uses: actions/checkout@v3 @@ -24,6 +25,10 @@ jobs: run: | echo "MIN_SDK_VERSION=$(cat app/build.gradle | grep minSdkVersion | rev | cut -d' ' -f 1 | rev)" >> $GITHUB_OUTPUT echo "TARGET_SDK_VERSION=$(cat app/build.gradle | grep targetSdkVersion | rev | cut -d' ' -f 1 | rev)" >> $GITHUB_OUTPUT + - name: Get app ID + id: get-app-id + run: | + echo "APP_ID=$(cat app/build.gradle | grep applicationId | rev | cut -d' ' -f 1 | rev | tr -d '"')" >> $GITHUB_OUTPUT test: needs: check-if-tests-exist @@ -83,4 +88,11 @@ jobs: force-avd-creation: false emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true - script: ./gradlew :app:connectedCheck --stacktrace + script: | + adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}} || true + adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.test || true + adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.androidTest || true + ./gradlew :app:connectedCheck --stacktrace + adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}} || true + adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.test || true + adb uninstall ${{needs.check-if-tests-exist.outputs.app-id}}.androidTest || true \ No newline at end of file diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index ad4099a..6e50db1 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -2,7 +2,7 @@ name: Changelog Generation on: release: - types: [published, released] + types: [published] workflow_dispatch: jobs: @@ -16,6 +16,7 @@ jobs: - uses: rhysd/changelog-from-release/action@v3 with: file: CHANGELOG.md + pull_request: true github_token: ${{ secrets.GITHUB_TOKEN }} commit_summary_template: 'update changelog for %s changes' args: -l 2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44e06f7..99f0199 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,19 +1,19 @@ -name: Build Test -on: [ push, pull_request ] +name: Continuous Integration +on: [push, pull_request] jobs: - build: + test: runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v3 with: - submodules: 'recursive' + submodules: "recursive" - name: Set up JDK environment uses: actions/setup-java@v3 with: - distribution: 'zulu' + distribution: "zulu" java-version: 17 - name: Make gradlew executable @@ -25,5 +25,25 @@ jobs: - name: Run local unit tests run: bash ./gradlew test --stacktrace + build: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: "recursive" + + - name: Set up JDK environment + uses: actions/setup-java@v3 + with: + distribution: "zulu" + java-version: 17 + + - name: Make gradlew executable + run: chmod +x ./gradlew + + - name: Setup Gradle + uses: gradle/gradle-build-action@v2 + - name: Build the app run: bash ./gradlew build --stacktrace \ No newline at end of file From 1462f7a298107bd23eebe4f117dfa8a9879ffb30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Fri, 16 Aug 2024 18:26:11 +0200 Subject: [PATCH 2/7] Fix JCenter dependency --- app/build.gradle | 2 +- build.gradle | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 1f395d4..a222f27 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -53,7 +53,7 @@ dependencies { implementation 'androidx.legacy:legacy-support-core-utils:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.3.1' implementation 'androidx.cardview:cardview:1.0.0' - implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' + implementation 'com.github.amulyakhare:TextDrawable:558677ea31' implementation 'androidx.security:security-crypto-ktx:1.1.0-alpha06' def work_version = "2.8.1" diff --git a/build.gradle b/build.gradle index 4925a63..434575f 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,6 @@ buildscript { ext.kotlin_version = "1.8.10" repositories { - jcenter() mavenCentral() google() } @@ -19,9 +18,9 @@ buildscript { allprojects { repositories { - jcenter() mavenCentral() google() + maven { url('https://jitpack.io') } } } From 97dba7af8f52715defe96b63d0dae13ce40286da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Fri, 16 Aug 2024 18:27:39 +0200 Subject: [PATCH 3/7] Update target sdk and dependencies --- app/build.gradle | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a222f27..2ddd5c6 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,11 +2,11 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' android { - compileSdkVersion 33 defaultConfig { applicationId "org.secuso.privacyfriendlypasswordgenerator" minSdkVersion 21 - targetSdkVersion 33 + targetSdkVersion 34 + compileSdk 34 versionCode 7 versionName "1.3.0" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' @@ -38,25 +38,25 @@ repositories { dependencies { implementation project(path: ':backup-api') implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation 'androidx.sqlite:sqlite:2.3.1' + implementation 'androidx.sqlite:sqlite:2.4.0' androidTestImplementation('androidx.test.espresso:espresso-core:3.5.1', { exclude group: 'com.android.support', module: 'support-annotations' }) - androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' androidTestImplementation('com.android.support.test.espresso:espresso-contrib:3.0.2') { exclude group: 'com.android.support', module: 'appcompat' exclude group: 'com.android.support', module: 'support-v4' exclude module: 'recyclerview-v7' } - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.9.0' + implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.legacy:legacy-support-core-utils:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.3.1' + implementation 'androidx.recyclerview:recyclerview:1.3.2' implementation 'androidx.cardview:cardview:1.0.0' implementation 'com.github.amulyakhare:TextDrawable:558677ea31' implementation 'androidx.security:security-crypto-ktx:1.1.0-alpha06' - def work_version = "2.8.1" + def work_version = "2.9.1" implementation "androidx.work:work-runtime:$work_version" implementation "androidx.work:work-runtime-ktx:$work_version" androidTestImplementation "androidx.work:work-testing:$work_version" From 2b2ff7952875a79774cb59e8a3f6dedb07430175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Fri, 16 Aug 2024 18:36:06 +0200 Subject: [PATCH 4/7] Change severity of missing translations to warning --- app/build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 2ddd5c6..78c079b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -24,7 +24,8 @@ android { } } lint { - abortOnError false + abortOnError true + warning 'MissingTranslation' } namespace 'org.secuso.privacyfriendlypasswordgenerator' } From ca6364bd97c14ef6d26eefc40ae641613d4adc00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Fri, 16 Aug 2024 18:48:07 +0200 Subject: [PATCH 5/7] Remove WorkManagerInitializer --- app/src/main/AndroidManifest.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 4429813..2dc611e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -24,11 +24,6 @@ tools:node="remove"> - - Date: Fri, 16 Aug 2024 18:50:57 +0200 Subject: [PATCH 6/7] Downgrade appcompat version to fix build errors --- app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 78c079b..2beac2d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -49,7 +49,7 @@ dependencies { exclude group: 'com.android.support', module: 'support-v4' exclude module: 'recyclerview-v7' } - implementation 'androidx.appcompat:appcompat:1.7.0' + implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.legacy:legacy-support-core-utils:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.3.2' From d767394b26dc428b3d00a00346dfb29745c15a79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20L=C3=A4nge?= Date: Fri, 16 Aug 2024 18:55:51 +0200 Subject: [PATCH 7/7] Bump version to v1.3.1 (8) --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2beac2d..fc994b2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { minSdkVersion 21 targetSdkVersion 34 compileSdk 34 - versionCode 7 - versionName "1.3.0" + versionCode 8 + versionName "1.3.1" testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' } buildTypes {