flutter/packages/flutter_tools/gradle
Bartek Pacia dbf5f04b86
FlutterExtension: make fields non-static (#141463)
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
        // ...
    }
}
// ...
```
2024-01-12 18:49:21 +00:00
..
src/main FlutterExtension: make fields non-static (#141463) 2024-01-12 18:49:21 +00:00
.dartignore
aar_init_script.gradle Allows adding a storage 'realm' to the storage base URL (#131951) 2023-08-09 23:26:05 +00:00
app_plugin_loader.gradle Reland "Warn when Gradle plugins are applied using the legacy apply script method (#140103) 2023-12-19 16:03:23 +00:00
build.gradle.kts Chore/gradle remove redundant apply (#135348) 2023-11-02 19:48:54 +00:00
flutter_multidex_keepfile.txt Reland "Add multidex flag and automatic multidex support (#90944)" (#92049) 2021-10-19 02:20:39 -07:00
flutter_proguard_rules.pro
flutter.gradle Reland "Warn when Gradle plugins are applied using the legacy apply script method (#140103) 2023-12-19 16:03:23 +00:00
manual_migration_settings.gradle.md
module_plugin_loader.gradle Reland: "Fix how Gradle resolves Android plugin" (#137115) 2023-12-21 16:55:04 +00:00
resolve_dependencies.gradle Allows adding a storage 'realm' to the storage base URL (#131951) 2023-08-09 23:26:05 +00:00
settings_aar.gradle.tmpl
settings.gradle.kts Refactor "app plugin loader" Gradle Plugin so it can be applied using the declarative plugins {} block (#127897) 2023-09-22 16:31:48 +00:00
settings.gradle.legacy_versions Remove license statements in template files. (#57268) 2020-06-15 09:30:05 -07:00