-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
73 lines (60 loc) · 1.75 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
71
72
73
import org.sinytra.adapter.gradle.AdapterPlugin
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
plugins {
id("net.neoforged.moddev")
id("org.sinytra.adapter.userdev")
id("org.sinytra.adapter.gradle")
`maven-publish`
}
val versionMc: String by project
val versionNeoForge: String by project
val timestamp: String = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMdd.HHmmss"))
version = "${AdapterPlugin.getDefinitionVersion()?.let { "$it-" } ?: "$versionMc-"}$timestamp"
println("Data version: $version")
allprojects {
apply(plugin = "net.neoforged.moddev")
group = "org.sinytra.adapter"
base {
archivesName.set(project.name.lowercase())
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
withSourcesJar()
}
neoForge {
version = versionNeoForge
}
repositories {
mavenCentral()
maven("https://maven.su5ed.dev/releases")
}
if (name !== "test") {
apply(plugin = "maven-publish")
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
artifactId = project.base.archivesName.get()
}
}
repositories {
maven {
name = "Su5eD"
url = uri("https://maven.su5ed.dev/releases")
credentials {
username = System.getenv("MAVEN_USER") ?: "not"
password = System.getenv("MAVEN_PASSWORD") ?: "set"
}
}
}
}
}
}
tasks {
jar {
from(generateAdapterData)
}
}