From 78c327ba03ce189f7a891e7d9493e70a0cd0776c Mon Sep 17 00:00:00 2001 From: Diego Beraldin Date: Tue, 28 May 2024 20:48:20 +0200 Subject: [PATCH] chore: update Gradle and AGP (#902) --- .github/workflows/android.yml | 2 +- CONTRIBUTING.md | 16 +++++++++------- README.md | 4 ++-- docs/tech_manual/setup.md | 12 ++++++------ gradle/libs.versions.toml | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 6 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 6d2a41553..39c1b0ed3 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 with: - gradle-version: 8.6 + gradle-version: 8.7 - name: Build run: ./gradlew build diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 71afe7293..cf5aea4bc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,7 @@ will be added and new answers will be provided as long as questions are submitte ### 1.1 Purpose -Raccoon was designed with three goals in mind: on the one side experiment and put to some stress +Raccoon was designed with three goals in mind: on the one side experiment and put to some stress test with a real world project Kotlin Multiplatform (KMP) and Compose multiplatform, in order to explore what could be achieved with multiplatform libraries and share as much code as possible in the `commonMain` source directory. The Android ecosystem of Lemmy apps has many cross-platform @@ -218,8 +218,8 @@ This project uses the Gradle build tool. The recommended development environment with the Kotlin Multiplatform Mobile plugin installed, which will automatically detect the build tool and download a Gradle distribution for you. -Since the project is using Gradle 8.5 with the Android Gradle Plugin (AGP) version 8.2.2, please -make sure that you are using Android Studio Hedgehog or later -- have a +Since the project is using Gradle 8.7 with the Android Gradle Plugin (AGP) version 8.4.0, please +make sure that you are using Android Studio Jellyfish or later -- have a look [here](https://developer.android.com/build/releases/gradle-plugin?hl=en#android_gradle_plugin_and_android_studio_compatibility) for a compatibility matrix between versions of Gradle, AGP and Android Studio. @@ -227,9 +227,9 @@ In order for Gradle to build, you will need a JDK installed on your local develo you are using stock Android Studio it ships with the JetBrains runtime. If you want to use your custom JDK (e.g. under Linux you want to try OpenJDK instead), please make sure that it has a suitable version, according -to [this page](https://docs.gradle.org/8.2/userguide/compatibility.html). +to [this page](https://docs.gradle.org/current/userguide/compatibility.html). -Finally, since building this project requires a lot of RAM, please make sure that +Finally, since building this project requires quite a lot of RAM, please make sure that the `gradle.properties` file in the root folder contains proper memory settings for the JVM and the Kotlin compile daemon: @@ -336,8 +336,10 @@ As far as Compose code is concerned, we take Google’s indications as a baselin ### 6.2.3 Linter -The recommended lint to use is [Ktlint](https://pinterest.github.io/ktlint/latest/) with the `ktlint_official` code -style. There is a plugin for IntelliJ/Android Studio that allows to have distraction-free formatting upon saving, to +The recommended lint to use is [Ktlint](https://pinterest.github.io/ktlint/latest/) with +the `ktlint_official` code +style. There is a plugin for IntelliJ/Android Studio that allows to have distraction-free formatting +upon saving, to make sure any new code is compliant with the rules. ### 6.3 Test structure diff --git a/README.md b/README.md index 8cc812f15..56ca78514 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@
- + - +
diff --git a/docs/tech_manual/setup.md b/docs/tech_manual/setup.md index 4f4ccc3da..071c32b11 100644 --- a/docs/tech_manual/setup.md +++ b/docs/tech_manual/setup.md @@ -2,8 +2,8 @@ This is a Kotlin Multiplatform (KMP) project that uses the Gradle build tool. The recommended development environment is Android Studio with the Kotlin Multiplatform Mobile plugin installed. -Since the project is using Gradle 8.5 with the Android Gradle Plugin (AGP) version 8.2.2 you -should use Android Studio Hedgehog or later (have a +Since the project is using Gradle 8.7 with the Android Gradle Plugin (AGP) version 8.4.0 you +should use Android Studio Jellyfish or later (have a look [here](https://developer.android.com/build/releases/gradle-plugin?hl=en#android_gradle_plugin_and_android_studio_compatibility) for a compatibility matrix between versions of Gradle, AGP and Android Studio). Alternatively, you can try and use IntelliJ IDEA or Fleet but some extra steps may be needed to @@ -14,11 +14,11 @@ machine, if you are using stock Android Studio it ships with the JetBrains runti look in the Settings dialog under the section "Build, Execution, Deployment > Build Tools > Gradle" in the "Gradle JDK" location drop-down menu. If you want to use your custom JDK (e.g. under Linux you want to try OpenJDK instead), please make sure that it has a suitable version, according -to [this page](https://docs.gradle.org/8.2/userguide/compatibility.html), so between 8 and 21. +to [this page](https://docs.gradle.org/current/userguide/compatibility.html), so between 8 and 21. -Finally, since building this project requires a lot of RAM due to its multi-module structure and to -the fact that it is quite a complex project, please make sure that the `gradle.properties` file in -the root folder contains proper memory settings for the JVM and the Kotlin compile daemon: +Finally, since building this project requires a quite lot of RAM due to its multi-module structure +and to the fact that it is quite a complex project, please make sure that the `gradle.properties` +file in the root folder contains proper memory settings for the JVM and the Kotlin compile daemon: ```properties org.gradle.jvmargs=-Xmx4096M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx4096M" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8c3c52a55..aca595200 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -7,7 +7,7 @@ androidx_crypto = "1.0.0" androidx_media3 = "1.3.0" androidx_splashscreen = "1.0.1" androidx_work = "2.9.0" -android_gradle = "8.2.2" +android_gradle = "8.4.0" coil = "2.6.0" compose = "1.6.10" detekt = "1.23.6" diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a80b22ce5..b82aa23a4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME