✨ Convert build scripts to Kotlin
Also added some new tasks to only build/install to maven local certain platforms `buildMinecraft`, `installMinecraft`, `buildDiscord`, `installDiscord`, `buildIRC`, `installIRC`
This commit is contained in:
parent
d812ea633a
commit
2c188eb130
48 changed files with 519 additions and 499 deletions
7
buildSrc/build.gradle.kts
Normal file
7
buildSrc/build.gradle.kts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
29
buildSrc/src/main/kotlin/DependencyVersions.kt
Normal file
29
buildSrc/src/main/kotlin/DependencyVersions.kt
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
val versions = mapOf(
|
||||
"checker-qual" to "3.8.0",
|
||||
"geantyref" to "1.3.11",
|
||||
"errorprone" to "2.4.0",
|
||||
"errorprone_javac" to "9+181-r4173-1",
|
||||
// DISCORD DEPENDENCIES
|
||||
"javacord" to "3.1.1",
|
||||
"jda" to "4.2.0_209",
|
||||
// MINECRAFT DEPENDENCIES
|
||||
"brigadier" to "1.0.17",
|
||||
"bukkit" to "1.13.2-R0.1-SNAPSHOT",
|
||||
"commodore" to "1.9",
|
||||
"bungeecord" to "1.8-SNAPSHOT",
|
||||
"cloudburst" to "1.0.0-SNAPSHOT",
|
||||
"adventure-api" to "4.3.0",
|
||||
"adventure-platform" to "4.0.0-SNAPSHOT",
|
||||
"paper-api" to "1.15.2-R0.1-SNAPSHOT",
|
||||
"velocity-api" to "1.1.0",
|
||||
"jb-annotations" to "20.1.0",
|
||||
"guava" to "21.0-jre",
|
||||
// IRC DEPENDENCIES
|
||||
"pircbotx" to "83a4c22e80",
|
||||
// TEST DEPENDENCIES
|
||||
"jupiter-engine" to "5.7.0",
|
||||
"jhm" to "1.25.2"
|
||||
)
|
||||
|
||||
val vers
|
||||
get() = versions
|
||||
24
buildSrc/src/main/kotlin/GroupedBuild.kt
Normal file
24
buildSrc/src/main/kotlin/GroupedBuild.kt
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.invoke
|
||||
|
||||
fun Project.buildGroups(vararg groupNames: String) =
|
||||
groupNames.forEach(this::buildGroup)
|
||||
|
||||
fun Project.buildGroup(groupName: String) {
|
||||
tasks {
|
||||
register("build$groupName") {
|
||||
group = "cloud"
|
||||
rootProject.subprojects
|
||||
.filter { it.projectDir.parentFile.name == "cloud-${groupName.toLowerCase()}" }
|
||||
.map { it.tasks.getByName("build") }
|
||||
.forEach { dependsOn(it) }
|
||||
}
|
||||
register("install$groupName") {
|
||||
group = "cloud"
|
||||
rootProject.subprojects
|
||||
.filter { it.projectDir.parentFile.name == "cloud-${groupName.toLowerCase()}" }
|
||||
.map { it.tasks.getByName("publishToMavenLocal") }
|
||||
.forEach { dependsOn(it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue