Re-write root and libs to Kotlin DSL

This commit is contained in:
Kenzie Togami
2019-07-10 16:33:21 -07:00
parent eccbad92e8
commit 19802e478c
22 changed files with 366 additions and 298 deletions

28
build.gradle.kts Normal file
View File

@@ -0,0 +1,28 @@
import org.ajoberstar.grgit.Grgit
println("""
*******************************************
You are building WorldEdit!
If you encounter trouble:
1) Read COMPILING.md if you haven't yet
2) Try running 'build' in a separate Gradle run
3) Use gradlew and not gradle
4) If you still need help, ask on Discord! https://discord.gg/enginehub
Output files will be in [subproject]/build/libs
*******************************************
""")
applyRootArtifactoryConfig()
if (!project.hasProperty("gitCommitHash")) {
apply(plugin = "org.ajoberstar.grgit")
ext["gitCommitHash"] = try {
(ext["grgit"] as Grgit).head().abbreviatedId
} catch (e: Exception) {
println("Error getting commit hash: " + e.message)
"no_git_id"
}
}