com.didichuxing.doraemonkit.plugin.extension.DoKitExt.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dokitx-plugin Show documentation
Show all versions of dokitx-plugin Show documentation
DoKit is an efficiency platform for the entire life cycle of general front-end product research and development.
package com.didichuxing.doraemonkit.plugin.extension
import org.gradle.api.Action
/**
* Created by jint on 07/10/2018.
*/
open class DoKitExt(
//var dokitPluginSwitch: Boolean = true,
var comm: CommExt = CommExt(),
var slowMethod: SlowMethodExt = SlowMethodExt()) {
//方法名必须和插件配置一直才能进行反射注入
// fun dokitPluginSwitch(dokitPluginSwitch: Boolean) {
// this.dokitPluginSwitch = dokitPluginSwitch
// }
/**
* 让comm 支持 DSL 语法
*
* @param action
*/
fun comm(action: Action) {
action.execute(comm)
}
/**
* 让slowMethod 支持 DSL 语法
*
* @param action
*/
fun slowMethod(action: Action) {
action.execute(slowMethod)
}
override fun toString(): String {
return "DoKitExt(comm=$comm, slowMethod=$slowMethod)"
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy