Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add namespace property for compatibility with Gradle 8 #1274

Merged
merged 11 commits into from
May 8, 2023

Conversation

navaronbracke
Copy link
Collaborator

This PR updates Gradle to version 8.0

Fixes #1273

@@ -1,2 +1,3 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

enableR8 is deprecated, and I got a warning for the missing useAndroidX

@@ -24,6 +23,7 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
android:hardwareAccelerated="true"
android:exported="true"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This prevented building the example app

@@ -30,6 +30,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is new in newer Gradle versions, was automatically added by the Flutter tool migrators.

@@ -9,8 +9,6 @@ dependencies:
flutter:
sdk: flutter

cupertino_icons: ^0.1.2
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

cupertino_icons was never used and the old version prevented running in null-safe mode.

@navaronbracke navaronbracke marked this pull request as draft May 7, 2023 21:08
@navaronbracke
Copy link
Collaborator Author

I actually misread the changelog here. Migrating specifically to Gradle 8, requires the source compatibility to change to Java 17, which is not what we want. I'll revert the Gradle 8 change and keep the namespace changes (the latter is what we actually want per https://docs.flutter.dev/release/breaking-changes/android-java-gradle-migration-guide)

@navaronbracke navaronbracke marked this pull request as ready for review May 8, 2023 10:37
@navaronbracke navaronbracke changed the title Upgrade to Gradle 8 Add namespace property for compatibility with Gradle 8 May 8, 2023
@miguelpruivo
Copy link
Owner

Thank you, could you bump it to 5.3.0 instead, since it could break stuff for projects relying on older gradle versions?

@navaronbracke
Copy link
Collaborator Author

@miguelpruivo Done!

Copy link
Owner

@miguelpruivo miguelpruivo left a comment

Choose a reason for hiding this comment

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

LGTM

@miguelpruivo miguelpruivo merged commit 65a7c60 into miguelpruivo:master May 8, 2023
@navaronbracke navaronbracke deleted the gradle_eight branch May 14, 2023 09:26
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.

Gradle 8.0 Support
2 participants