gradle: kts dsl (#1845)

* gradle: kts dsl

* deob: Fix tests

* gradle: Convert fernflower plugin to kotlin
This commit is contained in:
Owain van Brakel
2019-10-27 19:35:25 +01:00
committed by Ganom
parent a3667f10e3
commit b859cec91a
52 changed files with 1598 additions and 975 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2019 ThatGamerBlue
* Copyright (c) 2019 Owain van Brakel <https://github.com/Owain94>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -22,28 +23,33 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
description = 'Injected Client'
compileJava {
dependsOn ':injector-plugin:assemble'
}
description = "Injected Client"
compileJava.outputs.upToDateWhen { false }
tasks {
compileJava {
dependsOn(":injector-plugin:assemble")
compileJava.doLast() {
copy {
File f = file("build/classes/java/main")
f.deleteDir()
f.mkdirs()
from ("${injectedClassesPath}")
into ("build/classes/java/main")
outputs.upToDateWhen { false }
doLast {
copy {
val f = file ("build/classes/java/main")
f.deleteRecursively()
f.mkdirs()
from(project.extra["injectedClassesPath"])
into("build/classes/java/main")
}
}
}
}
classes.doLast() {
File f = file("build/classes/java/main/Placeholder.class")
f.delete()
}
classes {
val f = file("build/classes/java/main/Placeholder.class")
f.delete()
}
// tasks.build.dependsOn(tasks.decompile)
// this is just here to show how this could be used
// this is just here to show how the fernflower plugin could be used
//build {
// dependsOn(project.tasks.getByName("decompile"))
//}
}