flutter/packages/flutter_tools/gradle/flutter.gradle
Bartek Pacia 51251f2e57
Refactor Flutter Gradle Plugin so it can be applied using the declarative plugins {} block (#123511)
This PR aims to resolve #121552.

Resources used:
- [Developing Plugins](https://docs.gradle.org/current/userguide/custom_plugins.html)
- [Using Gradle Plugins](https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block)
- [Composite Builds Plugin Development Sample](https://docs.gradle.org/current/samples/sample_composite_builds_plugin_development.html)

This PR also paves way for #121541, because apps will no longer have:

```groovy
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
```

hardcoded. Instead, they'll use:

```groovy
plugins {
    // ...
    id "dev.flutter.flutter-gradle-plugin" // the exact name is tentative
}
```
2023-04-19 17:56:22 +00:00

10 lines
436 B
Groovy

// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file exists solely for the compatibility with projects that have
// not migrated to the declarative apply of the Flutter Gradle Plugin.
def pathToThisDirectory = buildscript.sourceFile.parentFile
apply from: "$pathToThisDirectory/src/main/groovy/flutter.groovy"