build!: Updated gradle and build version - #437
Conversation
WalkthroughThe Android package now uses updated Gradle, Kotlin, and Android Gradle Plugin versions, Gradle 9.4.1, Java 17 compatibility, minimum SDK 21, modern lint configuration, and revised Kotlin and AndroidX dependencies. ChangesAndroid toolchain modernization
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/home_widget/android/gradle/wrapper/gradle-wrapper.properties`:
- Line 4: Align the Gradle wrapper in
packages/home_widget/android/gradle/wrapper/gradle-wrapper.properties with AGP
8.7.3 by selecting a supported Gradle 8.x release, preferably the minimum
supported 8.9 or the project’s established compatible version. Keep
packages/home_widget/android/build.gradle using AGP 8.7.3; no direct change is
required there unless upgrading both AGP and Gradle together.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 25d16336-3acb-47ff-95c0-19441435d4b8
📒 Files selected for processing (2)
packages/home_widget/android/build.gradlepackages/home_widget/android/gradle/wrapper/gradle-wrapper.properties
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-all.zip |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== files =="
git ls-files | rg '(^|/)packages/home_widget/android/(gradle/wrapper/gradle-wrapper\.properties|build\.gradle|settings\.gradle|build\.gradle\.kts)$|$gradle-wrapper\.properties$|^packages/home_widget/android/build\.gradl$'
echo
echo "== gradle wrapper =="
if [ -f packages/home_widget/android/gradle/wrapper/gradle-wrapper.properties ]; then
cat -n packages/home_widget/android/gradle/wrapper/gradle-wrapper.properties
fi
echo
echo "== build gradle relevant =="
if [ -f packages/home_widget/android/build.gradle ]; then
sed -n '1,80p' packages/home_widget/android/build.gradle | cat -n
fi
echo
echo "== root build gradle android version if present =="
for f in build.gradle build.gradle.kts; do
if [ -f "packages/home_widget/android/$f" ]; then
echo "--- $f ---"
rg -n "classpath\s+['\"][^'\"]*tools\.build:gradle|'com\.android\.application'|'$com\.android\.library|androidGradlePlugin|buildscript|plugins" "packages/home_widget/android/$f" || true
fi
doneRepository: ABausG/home_widget
Length of output: 2981
🌐 Web query:
Kotlin 2.1.0 Gradle support Gradle 9.4.1 Android Gradle Plugin 8.7.3 required Gradle version
💡 Result:
For Kotlin 2.1.0, the minimum supported Gradle version is 7.6.3 [1]. Kotlin 2.1.0 is fully compatible with Gradle versions 7.6.3 through 8.6, and also supports versions 8.7 through 8.10 with the exception of specific known issues [1]. Regarding Android Gradle Plugin (AGP) 8.7.3, it requires a minimum of Gradle 8.9 [2][3]. AGP 8.7.3 is not compatible with Gradle 9.4.1; Gradle 9.4.1 is intended for much newer versions of the Android Gradle Plugin (specifically AGP 9.2 and later) [2]. For AGP 8.7.3, you should use the required Gradle 8.9 or a version within the 8.x range explicitly validated for that AGP release [2][3].
Citations:
- 1: https://github.com/jetbrains/kotlin-web-site/blob/master/docs/topics/whatsnew/whatsnew21.md
- 2: https://developer.android.com/build/releases/about-agp
- 3: https://developer.android.com/build/releases/agp-8-7-0-release-notes
Use a Gradle version supported by AGP 8.7.3.
AGP 8.7.3 is at least Gradle 8.9, but Gradle 9.4.1 belongs with AGP 9.x, not AGP 8.7.3. Align the Gradle wrapper to a supported 8.x release, or upgrade both com.android.tools.build:gradle and Gradle together for Gradle 9 compatibility.
📍 Affects 2 files
packages/home_widget/android/gradle/wrapper/gradle-wrapper.properties#L4-L4(this comment)packages/home_widget/android/build.gradle#L5-L12
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/home_widget/android/gradle/wrapper/gradle-wrapper.properties` at
line 4, Align the Gradle wrapper in
packages/home_widget/android/gradle/wrapper/gradle-wrapper.properties with AGP
8.7.3 by selecting a supported Gradle 8.x release, preferably the minimum
supported 8.9 or the project’s established compatible version. Keep
packages/home_widget/android/build.gradle using AGP 8.7.3; no direct change is
required there unless upgrading both AGP and Gradle together.
build: update Android build configurations, Kotlin version, and Gradle dependencies
Description
This PR updates the Android build configurations and tooling dependencies across the package to align with updated modern Android development standards.
Summary of changes:
9.4.1-all.zip(from8.1-bin.zip).2.1.0(from1.9.0), replacedkotlin-stdlib-jdk8dependency with standardkotlin-stdlib, and setjvmTargetto17(from1.8).com.android.tools.build:gradleto8.7.3(from8.1.2).minSdkVersionto21(from16) and bumped Java compatibility options (sourceCompatibilityandtargetCompatibility) toJavaVersion.VERSION_17(fromVERSION_1_8).es.antonborri.home_widget) by removing legacy conditional checks for AGP < 4.2 and migrated DSL fromlintOptionstolint.work-runtime-ktxto2.10.0) and Coroutines (kotlinx-coroutines-androidto1.9.0).Checklist
exampleor documentation.Breaking Change?
Migration instructions
home_widgetis now 21 (Android 5.0 Lollipop). Ensure your app'sminSdkVersioninandroid/app/build.gradleis set to21or higher.JavaVersion.VERSION_17/ JVM target17).