[Flutter 3.29] Update docs and build.cs to handle Kotlin .gradle.kts files. #1004
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Since Flutter 3.29, new projects will use the Kotin gradle DSL.
Files like
build.gradle
andsettings.gradle
now have a.gradle.kts
extension.Besides the file extension change, the syntax is different.
For example:
This leads to issue like #1002
This PR:
build.cs
capable of adjusting.gradle.kts
files in the Unity export.Type of Change
I did not test the Unity
Export Android Plugin
option, as I'm not sure how that is used.But I did update it with the same changes as the regular Android (debug/release) export, which I did test.
The example project needs to be updated before it will be compatible with Flutter 3.29.
For a new Flutter 3.29 project this PR is enough.
With Flutter 3.29 you will likely have to define
ndkVersion
inapp/build.gradle.kts
.In my case, the Flutter console error messages told me to use
ndkVersion = "27.0.12077973"
.