refactor: extract FlutterExtension into own file

This commit is contained in:
Andreas Fahrecker 2024-04-29 08:12:06 +02:00
parent 4167f48614
commit 7a685fd621
2 changed files with 25 additions and 24 deletions

View File

@ -0,0 +1,25 @@
package com.fahrecker.gradle
class FlutterExtension {
final Property<String> flutterVersion
final Property<String> flutterChannel
final Property<String> flutterSdkPath
FlutterExtension(Project project) {
flutterVersion = project.objects.property(String)
flutterChannel = project.objects.property(String)
flutterSdkPath = project.objects.property(String)
}
void setFlutterVersion(String version) {
flutterVersion.set(version)
}
void setFlutterChannel(String channel) {
flutterChannel.set(channel)
}
void setFlutterSdkPath(String path) {
flutterSdkPath.set(path)
}
}

View File

@ -41,27 +41,3 @@ class FlutterGradlePlugin implements Plugin<Project> {
}
}
}
class FlutterExtension {
final Property<String> flutterVersion
final Property<String> flutterChannel
final Property<String> flutterSdkPath
FlutterExtension(Project project) {
flutterVersion = project.objects.property(String)
flutterChannel = project.objects.property(String)
flutterSdkPath = project.objects.property(String)
}
void setFlutterVersion(String version) {
flutterVersion.set(version)
}
void setFlutterChannel(String channel) {
flutterChannel.set(channel)
}
void setFlutterSdkPath(String path) {
flutterSdkPath.set(path)
}
}