mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

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 } ```
35 lines
943 B
Plaintext
35 lines
943 B
Plaintext
// 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.
|
|
|
|
plugins {
|
|
`groovy-gradle-plugin`
|
|
}
|
|
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
|
|
|
|
group = "dev.flutter.plugin"
|
|
version = "1.0.0"
|
|
|
|
gradlePlugin {
|
|
plugins {
|
|
// The "flutterPlugin" name isn't used anywhere.
|
|
create("flutterPlugin") {
|
|
id = "dev.flutter.flutter-gradle-plugin"
|
|
implementationClass = "FlutterPlugin"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// When bumping, also update:
|
|
// * ndkVersion in FlutterExtension in packages/flutter_tools/gradle/src/main/flutter.groovy
|
|
// * AGP version constants in packages/flutter_tools/lib/src/android/gradle_utils.dart
|
|
// * AGP version in buildscript block in packages/flutter_tools/gradle/src/main/flutter.groovy
|
|
compileOnly("com.android.tools.build:gradle:7.3.0")
|
|
}
|