refactor: extract FlutterExtension into own file
This commit is contained in:
parent
4167f48614
commit
7a685fd621
25
src/main/groovy/com/fahrecker/gradle/FlutterExtension.groovy
Normal file
25
src/main/groovy/com/fahrecker/gradle/FlutterExtension.groovy
Normal 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)
|
||||
}
|
||||
}
|
@ -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)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user