Skip to content

build!: Updated gradle and build version - #437

Open
victormutuku wants to merge 1 commit into
ABausG:mainfrom
victormutuku:main
Open

build!: Updated gradle and build version#437
victormutuku wants to merge 1 commit into
ABausG:mainfrom
victormutuku:main

Conversation

@victormutuku

@victormutuku victormutuku commented Jul 29, 2026

Copy link
Copy Markdown

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:

  • Gradle Wrapper: Updated distribution URL to Gradle 9.4.1-all.zip (from 8.1-bin.zip).
  • Kotlin: Updated Kotlin version to 2.1.0 (from 1.9.0), replaced kotlin-stdlib-jdk8 dependency with standard kotlin-stdlib, and set jvmTarget to 17 (from 1.8).
  • Android Gradle Plugin (AGP): Upgraded com.android.tools.build:gradle to 8.7.3 (from 8.1.2).
  • SDK & Java Compatibility: Raised minSdkVersion to 21 (from 16) and bumped Java compatibility options (sourceCompatibility and targetCompatibility) to JavaVersion.VERSION_17 (from VERSION_1_8).
  • Namespace & Lint: Simplified namespace declaration (es.antonborri.home_widget) by removing legacy conditional checks for AGP < 4.2 and migrated DSL from lintOptions to lint.
  • Dependencies: Adjusted AndroidX Work Manager (work-runtime-ktx to 2.10.0) and Coroutines (kotlinx-coroutines-android to 1.9.0).

Checklist

  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added code (documentation) comments where necessary.
  • I have updated/added relevant examples in example or documentation.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Migration instructions

  • Minimum SDK Version: The minimum supported Android SDK version for apps using home_widget is now 21 (Android 5.0 Lollipop). Ensure your app's minSdkVersion in android/app/build.gradle is set to 21 or higher.
  • Java Target: Projects using this package must target Java 17 (JavaVersion.VERSION_17 / JVM target 17).

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The 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.

Changes

Android toolchain modernization

Layer / File(s) Summary
Build toolchain versions
packages/home_widget/android/gradle/wrapper/gradle-wrapper.properties, packages/home_widget/android/build.gradle
The Gradle wrapper, Kotlin version, and Android Gradle Plugin classpath were upgraded.
Android compatibility and dependencies
packages/home_widget/android/build.gradle
The namespace, minimum SDK, lint DSL, Java/Kotlin targets, Kotlin stdlib, WorkManager, and coroutines versions were updated.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title uses the required prefix and accurately summarizes the Gradle and build-tooling updates.
Description check ✅ Passed The description follows the template, covers the change, breaking impact, and migration notes; the checklist is present but unchecked.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@victormutuku victormutuku changed the title Updated gradle and buidl version build: Updated gradle and build version Jul 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0b42c89 and 2d727b9.

📒 Files selected for processing (2)
  • packages/home_widget/android/build.gradle
  • packages/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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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
done

Repository: 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:


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.

@victormutuku victormutuku changed the title build: Updated gradle and build version build!: Updated gradle and build version Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant