Skip to content

Commit

Permalink
Merge branch 'weblate/master' into 'master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	app/src/main/res/values-ja/strings.xml
  • Loading branch information
udenr committed Aug 16, 2024
2 parents 23de4a5 + 9a79b6a commit bee720b
Show file tree
Hide file tree
Showing 10 changed files with 118 additions and 62 deletions.
108 changes: 74 additions & 34 deletions .github/workflows/android-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,97 @@ name: Android Emulator Tests
on: [ push, pull_request ]

jobs:
connected-tests:
runs-on: macos-latest
check-if-tests-exist:
runs-on: ubuntu-latest
outputs:
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
with:
submodules: "recursive"
- name: Check if androidTest folder is not empty
run: |
echo "NOT_EMPTY=$([ "$(ls -A app/src/androidTest)" ] && echo 'true' || echo 'false')"
echo "NOT_EMPTY=$([ "$(ls -A app/src/androidTest)" ] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
id: check-androidTest
- name: Get min and target sdk
if: steps.check-androidTest.outputs.NOT_EMPTY == 'true'
id: get-sdk-version
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
if: needs.check-if-tests-exist.outputs.status == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [29]
target: [default]
arch: [x86_64]
api-level: [34, "${{ needs.check-if-tests-exist.outputs.min-sdk-version }}", "${{ needs.check-if-tests-exist.outputs.target-sdk-version }}"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Enable KVM group perms
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
- name: Gradle cache
uses: gradle/gradle-build-action@v3

- name: AVD cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ matrix.api-level }}

- name: Set up JDK environment
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

- name: Gradle cache
uses: gradle/gradle-build-action@v2

# - name: AVD cache
# uses: actions/cache@v3
# id: avd-cache
# with:
# path: |
# ~/.android/avd/*
# ~/.android/adb*
# key: avd-${{ matrix.api-level }}-${{ matrix.target }}-${{ matrix.arch }}

# - name: create AVD and generate snapshot for caching
# if: steps.avd-cache.outputs.cache-hit != 'true'
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: ${{ matrix.api-level }}
# target: ${{ matrix.target }}
# arch: ${{ matrix.arch }}
# force-avd-creation: false
# emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# disable-animations: false
# script: echo "Generated AVD snapshot for caching."
- name: create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.api-level >= 30 && 'google_apis' || 'default' }}
arch: ${{ matrix.api-level < 21 && 'x86' || 'x86_64' }}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."

- name: Run connected tests
uses: ReactiveCircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
profile: Nexus 6
# force-avd-creation: false
# emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
target: ${{ matrix.api-level >= 30 && 'google_apis' || 'default' }}
arch: ${{ matrix.api-level < 21 && 'x86' || 'x86_64' }}
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
3 changes: 2 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Changelog Generation

on:
release:
types: [published, released]
types: [published]
workflow_dispatch:

jobs:
Expand All @@ -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
Expand Down
30 changes: 25 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
23 changes: 12 additions & 11 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 33
defaultConfig {
applicationId "org.secuso.privacyfriendlypasswordgenerator"
minSdkVersion 21
targetSdkVersion 33
versionCode 7
versionName "1.3.0"
targetSdkVersion 34
compileSdk 34
versionCode 8
versionName "1.3.1"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}
buildTypes {
Expand All @@ -24,7 +24,8 @@ android {
}
}
lint {
abortOnError false
abortOnError true
warning 'MissingTranslation'
}
namespace 'org.secuso.privacyfriendlypasswordgenerator'
}
Expand All @@ -38,25 +39,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 '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.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"
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"
Expand Down
5 changes: 0 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
tools:node="remove">
</provider>

<provider
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="${applicationId}.workmanager-init"
tools:node="remove" />

<activity
android:name="org.secuso.privacyfriendlypasswordgenerator.activities.SplashActivity"
android:theme="@style/SplashTheme"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<string name="version_number">Version</string>
<string name="about_author">Authors:</string>
<string name="about_affiliation">In Zusammenarbeit mit</string>
<string name="privacy_friendly">Diese App gehört zur Gruppe der Privacy Friendly Apps entwickelt von der Technischen Universität Darmstadt. Quellcode lizenziert unter GPLv3. Bilder copyright TU Darmstadt und Google Inc.</string>
<string name="privacy_friendly">Diese App gehört zur Gruppe der Privacy Friendly Apps entwickelt vom Karlsruher Institut für Technologie. Quellcode lizenziert unter GPLv3. Bilder copyright KIT und Google Inc.</string>
<string name="more_info">Mehr Informationen unter:</string>
<string name="about_author_contributors">und Mitwirkende.</string>
<!--###HELP###-->
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<string name="about_author">開発:</string>
<string name="about_author_contributors">と貢献者。</string>
<string name="about_affiliation">グループ</string>
<string name="privacy_friendly">このアプリケーションは、ダルムシュタット工科大学 (Technische Universität Darmstadt, Germany) が開発したプライバシーフレンドリーアプリのグループに属しています。ソースコードは GPLv3 の下でライセンスされます。画像の著作権は TU Darmstadt および Google Inc.</string>
<string name="privacy_friendly">このアプリケーションは、ダルムシュタット工科大学 (Karlsruhe Institute of Technology, Germany) が開発したプライバシーフレンドリーアプリのグループに属しています。ソースコードは GPLv3 の下でライセンスされます。画像の著作権は KIT および Google Inc.</string>
<string name="more_info">詳細情報:</string>
<!--###HELP###-->
<string name="help">ヘルプ</string>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<string name="about_author_names" translatable="false">Karola Marky</string>
<string name="about_author_contributors">and contributors.</string>
<string name="about_affiliation">In affiliation with</string>
<string name="privacy_friendly">This application belongs to the group of Privacy Friendly Apps developed by Technische Universität Darmstadt. Sourcecode licensed under GPLv3. Images copyright TU Darmstadt and Google Inc.</string>
<string name="privacy_friendly">This application belongs to the group of Privacy Friendly Apps developed by Karlsruhe Institute of Technology. Sourcecode licensed under GPLv3. Images copyright KIT and Google Inc.</string>
<string name="more_info">More information can be found on:</string>
<string name="github" translatable="false"><a href="https://github.com/SecUSo/privacy-friendly-passwordgenerator">Github-Repo</a></string>
<string name="url" translatable="false"><a href="https://www.secuso.org/pfa">SECUSO-Website</a></string>
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
buildscript {
ext.kotlin_version = "1.8.10"
repositories {
jcenter()
mavenCentral()
google()
}
Expand All @@ -19,9 +18,9 @@ buildscript {

allprojects {
repositories {
jcenter()
mavenCentral()
google()
maven { url('https://jitpack.io') }
}
}

Expand Down

0 comments on commit bee720b

Please sign in to comment.