From e73a2f74a7b2884f543439395ad2aef92279876f Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Thu, 13 Jul 2023 20:14:12 +1000 Subject: [PATCH 1/6] Bump target SDK to appease Google Play. --- android/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index b6a688f..e76c30f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,12 +6,12 @@ plugins { } android { - compileSdk 31 + compileSdk 33 defaultConfig { applicationId "com.serwylo.babybook" minSdk 21 - targetSdk 31 + targetSdk 33 versionCode 10 versionName "0.9.0" From dcb676e429f63f2a7992f5f6866402c270f2b563 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Thu, 13 Jul 2023 20:16:25 +1000 Subject: [PATCH 2/6] Bump gradle plugin version. Used the upgrade assistant from Android Studio. --- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 09c5261..904bd9d 100644 --- a/build.gradle +++ b/build.gradle @@ -5,8 +5,8 @@ buildscript { mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:7.0.4" - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10" + classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b72a299..39d11c9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Jan 14 21:19:08 AEDT 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME From 2313b719f9c1ab2e65772768801dd6bfba4eb378 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Thu, 13 Jul 2023 20:25:55 +1000 Subject: [PATCH 3/6] Bump dependencies and implement recommended annotations from Android Studio. --- android/build.gradle | 39 +++++++++---------- .../babybook/bookviewer/BookViewerActivity.kt | 1 + .../babybook/onboarding/OnboardingActivity.kt | 1 + build.gradle | 2 +- cli/build.gradle | 2 +- library/build.gradle | 2 +- web/build.gradle | 2 +- 7 files changed, 25 insertions(+), 24 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index e76c30f..9a63b90 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,7 +1,6 @@ plugins { id 'com.android.application' id 'kotlin-android' - id 'kotlin-android-extensions' id 'kotlin-kapt' } @@ -62,24 +61,24 @@ dependencies { implementation project(":library") implementation 'com.github.babydots:immersivelock:1.0.1' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4' + implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1' - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'androidx.compose.material:material:1.1.0' - implementation 'com.google.android.material:material:1.5.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.3' + implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'androidx.compose.material:material:1.4.3' + implementation 'com.google.android.material:material:1.9.0' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.2.1' - implementation 'androidx.annotation:annotation:1.3.0' + implementation 'androidx.recyclerview:recyclerview:1.3.0' + implementation 'androidx.annotation:annotation:1.6.0' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' - def room_version = '2.4.1' + def room_version = '2.5.2' implementation "androidx.room:room-runtime:$room_version" implementation "androidx.room:room-ktx:$room_version" kapt "androidx.room:room-compiler:$room_version" @@ -88,18 +87,18 @@ dependencies { implementation "com.google.dagger:dagger:$dagger_version" kapt "com.google.dagger:dagger-compiler:$dagger_version" - def lifecycle_version = '2.4.0' + def lifecycle_version = '2.6.1' implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version" - def activity_version = "1.4.0" - implementation("androidx.activity:activity-ktx:$activity_version") + def activity_version = "1.7.2" + implementation("androidx.activity:activity-ktx:1.7.2") def fragment_version = "1.4.0" - implementation("androidx.fragment:fragment-ktx:$fragment_version") + implementation("androidx.fragment:fragment-ktx:1.6.0") - implementation("androidx.viewpager2:viewpager2:1.1.0-beta01") + implementation("androidx.viewpager2:viewpager2:1.1.0-beta02") implementation 'com.squareup.picasso:picasso:2.8' diff --git a/android/src/main/java/com/serwylo/babybook/bookviewer/BookViewerActivity.kt b/android/src/main/java/com/serwylo/babybook/bookviewer/BookViewerActivity.kt index 8fa6d4c..e18244e 100644 --- a/android/src/main/java/com/serwylo/babybook/bookviewer/BookViewerActivity.kt +++ b/android/src/main/java/com/serwylo/babybook/bookviewer/BookViewerActivity.kt @@ -153,6 +153,7 @@ class BookViewerActivity : AppCompatActivity() { startActivityForResult(intent, RESULT_CREATE_FILE) } + @Deprecated("Deprecated in Java") override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { super.onActivityResult(requestCode, resultCode, resultData) diff --git a/android/src/main/java/com/serwylo/babybook/onboarding/OnboardingActivity.kt b/android/src/main/java/com/serwylo/babybook/onboarding/OnboardingActivity.kt index 45678e9..8c72020 100644 --- a/android/src/main/java/com/serwylo/babybook/onboarding/OnboardingActivity.kt +++ b/android/src/main/java/com/serwylo/babybook/onboarding/OnboardingActivity.kt @@ -66,6 +66,7 @@ class OnboardingActivity : FragmentActivity() { binding.pager.unregisterOnPageChangeCallback(onPageChange) } + @Deprecated("Deprecated in Java") override fun onBackPressed() { if (binding.pager.currentItem == 0) { super.onBackPressed() diff --git a/build.gradle b/build.gradle index 904bd9d..4fb647d 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:7.4.2' - classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21' + classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/cli/build.gradle b/cli/build.gradle index 9476863..3e67a20 100644 --- a/cli/build.gradle +++ b/cli/build.gradle @@ -12,7 +12,7 @@ dependencies { implementation project(":library") implementation "org.jetbrains.kotlinx:kotlinx-cli:0.3.4" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" } diff --git a/library/build.gradle b/library/build.gradle index a6825bf..00bb16b 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -12,7 +12,7 @@ dependencies { implementation 'com.google.code.gson:gson:2.8.9' - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" implementation "io.ktor:ktor-client-core:1.6.3" implementation "io.ktor:ktor-client-cio:1.6.3" diff --git a/web/build.gradle b/web/build.gradle index c050da1..dca9683 100644 --- a/web/build.gradle +++ b/web/build.gradle @@ -17,7 +17,7 @@ dependencies { implementation "io.ktor:ktor-gson:1.6.3" implementation "ch.qos.logback:logback-classic:1.2.5" - implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2" + implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" } From ced5c9f8b987acf758376d8d75a1782758e92745 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Thu, 13 Jul 2023 20:26:15 +1000 Subject: [PATCH 4/6] Run web and cli build during CI as well as the Android app. --- .github/workflows/android.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f06ae9e..cbf56d0 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -17,5 +17,9 @@ jobs: uses: actions/setup-java@v1 with: java-version: 11 - - name: Gradle build + - name: Build Android app run: ./gradlew :android:build + - name: Build web app + run: ./gradlew :web:build + - name: Build cli app + run: ./gradlew :cli:build From 6f8bf526d9596bc541f6bf813fca07e4fabe2d64 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Thu, 13 Jul 2023 20:35:01 +1000 Subject: [PATCH 5/6] Add required permission after targeting SDK 33. --- android/src/main/AndroidManifest.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml index 0e3ce9a..ebb2166 100644 --- a/android/src/main/AndroidManifest.xml +++ b/android/src/main/AndroidManifest.xml @@ -4,6 +4,10 @@ + + + Date: Thu, 13 Jul 2023 20:36:12 +1000 Subject: [PATCH 6/6] Bump for release v0.9.1 - Bump SDK + dependencies + tools. --- android/build.gradle | 4 ++-- fastlane/metadata/android/en-US/changelogs/11.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 fastlane/metadata/android/en-US/changelogs/11.txt diff --git a/android/build.gradle b/android/build.gradle index 9a63b90..4bd4105 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -11,8 +11,8 @@ android { applicationId "com.serwylo.babybook" minSdk 21 targetSdk 33 - versionCode 10 - versionName "0.9.0" + versionCode 11 + versionName "0.9.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/fastlane/metadata/android/en-US/changelogs/11.txt b/fastlane/metadata/android/en-US/changelogs/11.txt new file mode 100644 index 0000000..ece5126 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/11.txt @@ -0,0 +1 @@ +Bump target SDK to latest version. \ No newline at end of file