Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

chore(connectivity_plus): replace deprecated config in gradle 8#3867

Open
mdmahendri wants to merge 1 commit into
fluttercommunity:mainfrom
mdmahendri:cleanup/connectivity-gradle
Open

chore(connectivity_plus): replace deprecated config in gradle 8#3867
mdmahendri wants to merge 1 commit into
fluttercommunity:mainfrom
mdmahendri:cleanup/connectivity-gradle

Conversation

@mdmahendri

@mdmahendri mdmahendri commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Description

This PR prepares connectivity_plus for the upcoming Gradle 9 migration by resolving deprecation warnings in the build scripts. Some of these changes follow the same patterns used in #3858.

Testing & Environment

This PR was tested and built successfully locally. Because it requires running melos bootstrap within the repository (which depends on Dart 3.10), Flutter 3.38.1 was used for the verification process.

Key Changes

For clarity and ease of review, here is a breakdown of the modifications:

1. Groovy Property Assignment Syntax

Updated Gradle property assignments to conform to the Groovy DSL requirements. Fixed the deprecation warning:

Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated.

2. Modernized Lint Configuration

Migrated the lintOptions block to the modern lint block. lintOptions was deprecated in AGP 7.2.

3. Resolved Dependency Conflict

Fixed an unresolved dependency conflict between integration_test and the example app test runner that caused the following Android Studio warning:

Unresolved dependencies
Cannot find a version of 'androidx.test:runner' that satisfies the version constraints:
   Dependency path 'android:app:unspecified' --> 'androidx.test:runner:1.6.2'
   Constraint path 'android:app:unspecified' --> 'androidx.test:runner:{strictly 1.2.0}' because of the following reason: version resolved in configuration ':app:debugRuntimeClasspath' by consistent resolution
   Dependency path 'android:app:unspecified' --> 'androidx.test.espresso:espresso-core:3.6.1' (runtime) --> 'androidx.test:runner:1.6.1'

4. Replaced Deprecated Build Directory Reference

Replaced project.buildDir with project.layout.buildDirectory to match modern Gradle API standards.

5. Unified NDK Version

Added ndkVersion = flutter.ndkVersion to resolve NDK version mismatches. Fix the following build warning:

Your project is configured with Android NDK 27.0.12077973, but the following plugin(s) depend on a different Android NDK version:
integration_test requires Android NDK 28.2.13676358
Fix this issue by using the highest Android NDK version (they are backward compatible).

Android NDK versions are backward compatible, and the project builds and runs successfully after this change.
flutter.ndkVersion is available for version higher 3.3.0, while this package specify Flutter version 3.7.0 or higher. See this Flutter 3.3.0 release notes and PR for the revelant change

Related Issues

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • All existing and new tests are passing. the tests failing probably the one I mentioned in another PR.
  • The analyzer (flutter analyze) does not report any problems on my PR.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • No, this is not a breaking change.

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