-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
74 lines (59 loc) · 1.66 KB
/
build.gradle.kts
File metadata and controls
74 lines (59 loc) · 1.66 KB
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
65
66
67
68
69
70
71
72
73
74
import java.nio.file.Path
plugins {
java
kotlin("jvm") version "2.0.21"
id("com.gradleup.shadow") version "8.3.5"
id("dev.jsinco.pterodactyldeploy") version "1.14-SNAPSHOT"
}
allprojects {
group = "net.lumamc.web"
version = "1.0-SNAPSHOT"
apply(plugin = "dev.jsinco.pterodactyldeploy")
}
repositories {
mavenCentral()
}
tasks {
clean {
doLast {
file("output").deleteRecursively()
}
}
jar {
enabled = false
}
build {
dependsOn(":client:yarnBuild")
dependsOn(":server:build")
val sharedOutputDir = file("${projectDir}/output")
sharedOutputDir.mkdirs()
doLast {
val clientOutputDir = file("client/dist")
copy {
from(clientOutputDir)
into("$sharedOutputDir/client")
}
val serverOutputDir = file("server/build/libs")
copy {
from(serverOutputDir)
into("$sharedOutputDir/server")
}
}
if (System.getenv("PTERO_URL") != null) { // todo: need to fix this on pterodeploy
finalizedBy(pterodactylDeploy)
}
}
pterodactylDeploy {
apiKey = System.getenv("PTERO_TOKEN")
url = System.getenv("PTERO_URL")
serverId = System.getenv("PTERO_SERVER")
clearRunway {
removeRemoteDirectories = mutableListOf("client")
}
dropIn {
uploadDirectories = mutableListOf(Path.of("output/client"))
uploadFiles = mutableListOf(file("output/server/server.jar"))
//deployCommands = mutableListOf("reload")
}
}
}