-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.gradle.kts
64 lines (51 loc) · 1.56 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import java.util.Date
group = "xyz.chunkstories"
version = "1.1.0"
val verboseVersion = "cleanup-branch"
subprojects {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven("https://jitpack.io")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://raw.githubusercontent.com/kotlin-graphics/mary/master")
}
group = rootProject.group
version = rootProject.version
}
buildscript {
repositories {
maven("https://plugins.gradle.org/m2/")
}
}
plugins {
id("com.palantir.git-version") version "3.0.0"
}
val apiRevisionBuiltAgainst by extra { "2.0.4" }
var actualContentLocation = "core_content.zip"
val lwjglVersion by extra { "3.3.2" }
val lwjglNatives by extra { listOf("natives-windows", "natives-linux", "natives-macos")}
task("buildAll") {
dependsOn(":api:publishToMavenLocal")
dependsOn(":enklume:publishToMavenLocal")
dependsOn(":client:shadowJar")
dependsOn(":server:shadowJar")
dependsOn(":converter:shadowJar")
dependsOn(":launcher:createExe")
}
val versionDetails: groovy.lang.Closure<com.palantir.gradle.gitversion.VersionDetails> by extra
task("versionTxt") {
doLast {
val details = versionDetails()
val file = File("${project.rootDir}/version.json")
file.writeText("""
{
"version": "$version",
"verboseVersion": "$verboseVersion",
"commit": "${details.gitHashFull}",
"buildtime": "${Date()}"
}
""".trimIndent())
}
}