diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index d49d4e20..1f22cf30 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-java@v2 with: distribution: 'zulu' - java-version: 11 + java-version: 17 - name: Run Android Linter run: ./gradlew lint --stacktrace diff --git a/app/build.gradle b/app/build.gradle index 122e1ff4..56fe721a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,12 +21,12 @@ android { } } - compileSdkVersion 33 + compileSdk 33 defaultConfig { applicationId "de.stephanlindauer.criticalmaps" minSdkVersion 16 - targetSdkVersion 31 + targetSdkVersion 33 versionCode 47 versionName "2.8.2" vectorDrawables.useSupportLibrary = true @@ -50,6 +50,7 @@ android { signingConfig signingConfigs.releaseConfig } } + packagingOptions { resources { excludes += ['META-INF/services/javax.annotation.processing.Processor'] @@ -68,6 +69,7 @@ android { lint { warning 'MissingTranslation', 'StringFormatInvalid', 'NewApi', 'InvalidPackage' } + namespace 'de.stephanlindauer.criticalmaps' } @@ -75,10 +77,10 @@ dependencies { implementation 'com.squareup:otto:1.3.8' implementation 'org.osmdroid:osmdroid-android:6.1.8' implementation 'com.squareup.picasso:picasso:2.8' - implementation 'androidx.appcompat:appcompat:1.6.0' - implementation 'androidx.annotation:annotation:1.5.0' - implementation 'com.google.android.material:material:1.9.0-alpha01' - implementation 'androidx.exifinterface:exifinterface:1.3.5' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.annotation:annotation:1.6.0' + implementation 'com.google.android.material:material:1.9.0' + implementation 'androidx.exifinterface:exifinterface:1.3.6' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'com.jakewharton.timber:timber:5.0.1' @@ -90,17 +92,27 @@ dependencies { implementation "com.google.dagger:dagger:$dagger_version" annotationProcessor "com.google.dagger:dagger-compiler:$dagger_version" - debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10' + debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12' errorprone("com.google.errorprone:error_prone_core:2.18.0") testImplementation 'junit:junit:4.13.2' testImplementation 'com.google.truth:truth:1.1.3' - testImplementation 'org.mockito:mockito-core:5.1.1' + testImplementation 'org.mockito:mockito-core:5.4.0' androidTestImplementation 'androidx.test:core:1.5.0' androidTestImplementation 'androidx.test:runner:1.5.2' androidTestImplementation 'androidx.test:rules:1.5.0' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + + // https://youtrack.jetbrains.com/issue/KT-54136/Duplicated-classes-cause-build-failure-if-a-dependency-to-kotlin-stdlib-specified-in-an-android-project#focus=Comments-27-6583109.0-0 + constraints { + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") { + because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib") + } + implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") { + because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib") + } + } } diff --git a/app/src/debug/res/mipmap-hdpi/ic_launcher_48dp.png b/app/src/debug/res/mipmap-hdpi/ic_launcher_48dp.png deleted file mode 100644 index 72180ab1..00000000 Binary files a/app/src/debug/res/mipmap-hdpi/ic_launcher_48dp.png and /dev/null differ diff --git a/app/src/debug/res/mipmap-mdpi/ic_launcher_48dp.png b/app/src/debug/res/mipmap-mdpi/ic_launcher_48dp.png deleted file mode 100644 index 266e7455..00000000 Binary files a/app/src/debug/res/mipmap-mdpi/ic_launcher_48dp.png and /dev/null differ diff --git a/app/src/debug/res/mipmap-xhdpi/ic_launcher_48dp.png b/app/src/debug/res/mipmap-xhdpi/ic_launcher_48dp.png deleted file mode 100644 index 03a5a019..00000000 Binary files a/app/src/debug/res/mipmap-xhdpi/ic_launcher_48dp.png and /dev/null differ diff --git a/app/src/debug/res/mipmap-xxhdpi/ic_launcher_48dp.png b/app/src/debug/res/mipmap-xxhdpi/ic_launcher_48dp.png deleted file mode 100644 index e7e3e5d7..00000000 Binary files a/app/src/debug/res/mipmap-xxhdpi/ic_launcher_48dp.png and /dev/null differ diff --git a/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_48dp.png b/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_48dp.png deleted file mode 100644 index 5e12a844..00000000 Binary files a/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_48dp.png and /dev/null differ diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bdb7bd4b..954e986a 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,5 +1,6 @@ - + @@ -28,10 +29,12 @@ android:name=".App" android:allowBackup="true" android:fullBackupContent="@xml/backup_descriptor" + android:dataExtractionRules="@xml/data_extraction_rules" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" - android:roundIcon="@mipmap/ic_launcher" - android:supportsRtl="true"> + android:roundIcon="@mipmap/ic_launcher_round" + android:supportsRtl="true" + tools:targetApi="s"> + + + + diff --git a/app/src/main/res/drawable-anydpi-v24/ic_notification_open.xml b/app/src/main/res/drawable-anydpi-v24/ic_notification_open.xml new file mode 100644 index 00000000..f3c91248 --- /dev/null +++ b/app/src/main/res/drawable-anydpi-v24/ic_notification_open.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/app/src/main/res/drawable-anydpi-v24/ic_stat_logo.xml b/app/src/main/res/drawable-anydpi-v24/ic_stat_logo.xml new file mode 100644 index 00000000..df32aeb4 --- /dev/null +++ b/app/src/main/res/drawable-anydpi-v24/ic_stat_logo.xml @@ -0,0 +1,23 @@ + + + + + + + diff --git a/app/src/main/res/drawable-hdpi/ic_notification_close.png b/app/src/main/res/drawable-hdpi/ic_notification_close.png index ceb1a1ee..b88920ae 100644 Binary files a/app/src/main/res/drawable-hdpi/ic_notification_close.png and b/app/src/main/res/drawable-hdpi/ic_notification_close.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_notification_open.png b/app/src/main/res/drawable-hdpi/ic_notification_open.png index 745db489..317afabe 100644 Binary files a/app/src/main/res/drawable-hdpi/ic_notification_open.png and b/app/src/main/res/drawable-hdpi/ic_notification_open.png differ diff --git a/app/src/main/res/drawable-hdpi/ic_stat_logo.png b/app/src/main/res/drawable-hdpi/ic_stat_logo.png index dfdbcadc..671cbc8c 100644 Binary files a/app/src/main/res/drawable-hdpi/ic_stat_logo.png and b/app/src/main/res/drawable-hdpi/ic_stat_logo.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_notification_close.png b/app/src/main/res/drawable-mdpi/ic_notification_close.png index af7f8288..bb78c828 100644 Binary files a/app/src/main/res/drawable-mdpi/ic_notification_close.png and b/app/src/main/res/drawable-mdpi/ic_notification_close.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_notification_open.png b/app/src/main/res/drawable-mdpi/ic_notification_open.png index d1c563cc..f7504071 100644 Binary files a/app/src/main/res/drawable-mdpi/ic_notification_open.png and b/app/src/main/res/drawable-mdpi/ic_notification_open.png differ diff --git a/app/src/main/res/drawable-mdpi/ic_stat_logo.png b/app/src/main/res/drawable-mdpi/ic_stat_logo.png index 766b4086..aa984ca9 100644 Binary files a/app/src/main/res/drawable-mdpi/ic_stat_logo.png and b/app/src/main/res/drawable-mdpi/ic_stat_logo.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_notification_close.png b/app/src/main/res/drawable-xhdpi/ic_notification_close.png index b7c7ffd0..a4a7f2c2 100644 Binary files a/app/src/main/res/drawable-xhdpi/ic_notification_close.png and b/app/src/main/res/drawable-xhdpi/ic_notification_close.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_notification_open.png b/app/src/main/res/drawable-xhdpi/ic_notification_open.png index ffab865d..b1305375 100644 Binary files a/app/src/main/res/drawable-xhdpi/ic_notification_open.png and b/app/src/main/res/drawable-xhdpi/ic_notification_open.png differ diff --git a/app/src/main/res/drawable-xhdpi/ic_stat_logo.png b/app/src/main/res/drawable-xhdpi/ic_stat_logo.png index a28c1e34..09f5f5f1 100644 Binary files a/app/src/main/res/drawable-xhdpi/ic_stat_logo.png and b/app/src/main/res/drawable-xhdpi/ic_stat_logo.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_notification_close.png b/app/src/main/res/drawable-xxhdpi/ic_notification_close.png index 6b717e0d..6eababee 100644 Binary files a/app/src/main/res/drawable-xxhdpi/ic_notification_close.png and b/app/src/main/res/drawable-xxhdpi/ic_notification_close.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_notification_open.png b/app/src/main/res/drawable-xxhdpi/ic_notification_open.png index 387ecdfb..b89b3f16 100644 Binary files a/app/src/main/res/drawable-xxhdpi/ic_notification_open.png and b/app/src/main/res/drawable-xxhdpi/ic_notification_open.png differ diff --git a/app/src/main/res/drawable-xxhdpi/ic_stat_logo.png b/app/src/main/res/drawable-xxhdpi/ic_stat_logo.png index ead852cb..c2220263 100644 Binary files a/app/src/main/res/drawable-xxhdpi/ic_stat_logo.png and b/app/src/main/res/drawable-xxhdpi/ic_stat_logo.png differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_notification_close.png b/app/src/main/res/drawable-xxxhdpi/ic_notification_close.png deleted file mode 100644 index 39641921..00000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_notification_close.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_notification_open.png b/app/src/main/res/drawable-xxxhdpi/ic_notification_open.png deleted file mode 100644 index c55220a5..00000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_notification_open.png and /dev/null differ diff --git a/app/src/main/res/drawable-xxxhdpi/ic_stat_logo.png b/app/src/main/res/drawable-xxxhdpi/ic_stat_logo.png deleted file mode 100644 index 90f0133f..00000000 Binary files a/app/src/main/res/drawable-xxxhdpi/ic_stat_logo.png and /dev/null differ diff --git a/app/src/main/res/drawable/ic_launcher_monochrome.xml b/app/src/main/res/drawable/ic_launcher_monochrome.xml new file mode 100644 index 00000000..3855ad87 --- /dev/null +++ b/app/src/main/res/drawable/ic_launcher_monochrome.xml @@ -0,0 +1,12 @@ + + + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml index a8a8fa55..c78bee3b 100644 --- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -2,4 +2,5 @@ + diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 00000000..c78bee3b --- /dev/null +++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png index 67e473de..565cd651 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 00000000..8c667e95 Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png index 313d301e..9e7fee46 100644 Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 00000000..02074446 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png index a26b3202..83dbf682 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 00000000..59830074 Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 015754ef..223e3c77 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..8b051671 Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 409272b9..fd365a6d 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 00000000..1b3a71f0 Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/app/src/main/res/xml/data_extraction_rules.xml b/app/src/main/res/xml/data_extraction_rules.xml new file mode 100644 index 00000000..b6f68507 --- /dev/null +++ b/app/src/main/res/xml/data_extraction_rules.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/build.gradle b/build.gradle index 08addb44..253e0d50 100644 --- a/build.gradle +++ b/build.gradle @@ -1,18 +1,17 @@ buildscript { ext { - dagger_version = "2.44.2" + dagger_version = "2.47" } repositories { google() - // gradle-errorprone-plugin: - maven { url "https://plugins.gradle.org/m2/" } + gradlePluginPortal() // gradle-errorprone-plugin } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.1.0' classpath 'com.github.bjoernq:unmockplugin:0.7.9' - classpath 'net.ltgt.gradle:gradle-errorprone-plugin:2.0.2' + classpath 'net.ltgt.gradle:gradle-errorprone-plugin:3.1.0' } } diff --git a/gradle.properties b/gradle.properties index eaaff564..3cb77d49 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,6 +11,8 @@ # The setting is particularly useful for tweaking memory settings. # Default value: -Xmx10248m -XX:MaxPermSize=256m # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +android.defaults.buildfeatures.buildconfig=true +android.nonTransitiveRClass=false android.useAndroidX=true org.gradle.jvmargs=-Xmx1536M diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 87b8d29f..dcda6fb5 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip