forked from CivMC/RailSwitch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
70 lines (63 loc) · 1.36 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
65
66
67
68
69
70
//import net.civmc.civgradle.common.util.civRepo
plugins {
`java-library`
`maven-publish`
id("net.civmc.civgradle") version "2.0.0-SNAPSHOT"
}
// Temporary hack:
// Remove the root build directory
gradle.buildFinished {
project.buildDir.deleteRecursively()
}
allprojects {
group = "net.civmc.railswitch"
version = "2.0.0-SNAPSHOT"
description = "RailSwitch"
}
subprojects {
apply(plugin = "net.civmc.civgradle")
apply(plugin = "java-library")
apply(plugin = "maven-publish")
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
repositories {
mavenCentral()
val civ_repos = arrayOf(
"CivMC/CivModCore",
"CivMC/NameLayer",
"CivMC/Citadel",
)
for (repo in civ_repos) {
maven {
url = uri("https://maven.pkg.github.com/$repo")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
/*civRepo("CivMC/CivModCore")
civRepo("CivMC/NameLayer")
civRepo("CivMC/Citadel")*/
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/CivMC/RailSwitch")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
publications {
register<MavenPublication>("gpr") {
from(components["java"])
}
}
}
}