gradle: kts dsl (#1845)
* gradle: kts dsl * deob: Fix tests * gradle: Convert fernflower plugin to kotlin
This commit is contained in:
17
buildSrc/src/main/kotlin/FernflowerPlugin.kt
Normal file
17
buildSrc/src/main/kotlin/FernflowerPlugin.kt
Normal file
@@ -0,0 +1,17 @@
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.tasks.StopExecutionException
|
||||
|
||||
class FernflowerPlugin : Plugin<Project> {
|
||||
override fun apply(project: Project) {
|
||||
project.tasks.create("decompile", FernflowerTask::class.java).run {
|
||||
dependsOn(project.tasks.getByName("jar"))
|
||||
|
||||
doFirst {
|
||||
if (!project.tasks.getByName("jar").didWork) {
|
||||
throw StopExecutionException()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user