mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() There's no issue for this PR. I can create one if requested. ## Summary This PR makes public fields of `FlutterExtension` non-static. The aim is to make migrating from Gradle Groovy DSL to Gradle Kotlin DSL easier for Flutter developers, because... ### Without this PR **android/app/build.gradle.kts** ```kotlin plugins { id "com.android.application" id "dev.flutter.flutter-gradle-plugin" } android { namespace = "io.flutter.examples.hello_world" compileSdk = FlutterExtension.compileSdkVersion defaultConfig { applicationId = "io.flutter.examples.hello_world" minSdk = FlutterExtension.minSdkVersion targetSdk = FlutterExtension.targetSdkVersion // ... } } // ... ``` Groovy and Java allow accessing static fields of a class through its instance, but Kotlin is being more "correct" and disallows that. ### With this PR Thanks to this PR, the user won't have to replace `flutter` with FlutterExtension in some places, thus decreasing possible confusion. ```kotlin plugins { id "com.android.application" id "dev.flutter.flutter-gradle-plugin" } android { namespace = "io.flutter.examples.hello_world" compileSdk = flutter.compileSdkVersion defaultConfig { applicationId = "io.flutter.examples.hello_world" minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion // ... } } // ... ``` |
||
---|---|---|
.. | ||
src/main | ||
.dartignore | ||
aar_init_script.gradle | ||
app_plugin_loader.gradle | ||
build.gradle.kts | ||
flutter_multidex_keepfile.txt | ||
flutter_proguard_rules.pro | ||
flutter.gradle | ||
manual_migration_settings.gradle.md | ||
module_plugin_loader.gradle | ||
resolve_dependencies.gradle | ||
settings_aar.gradle.tmpl | ||
settings.gradle.kts | ||
settings.gradle.legacy_versions |