-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
78 lines (63 loc) · 1.59 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
78 lines (63 loc) · 1.59 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
75
76
77
78
plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.kotlin.serialization)
`maven-publish`
}
group = "xyz.bluspring.unitytranslate"
version = "${rootProject.property("unitytranslate_version")}"
base {
archivesName.set("unitytranslate-library")
}
repositories {
mavenCentral()
}
dependencies {
api(libs.bundles.kotlin)
api(libs.slf4j.api)
testRuntimeOnly(libs.slf4j.simple)
}
java {
withSourcesJar()
}
kotlin {
jvmToolchain(17)
}
val xmake = natives {
path = projectDir.toPath().resolve("jni")
platform("windows", "x64")
// TODO: fix for every other platform
// platform("windows", "arm64")
// platform("windows", "arm64ec")
// platform("linux", "x86_64")
// platform("linux", "armv7")
// platform("linux", "armv7s")
// platform("linux", "arm64")
// platform("mac", "x86_64")
// platform("mac", "arm64")
}
tasks {
test {
useJUnitPlatform()
}
}
publishing {
repositories {
maven("https://mvn.devos.one/releases") {
credentials {
username = System.getenv()["MAVEN_USER"]
password = System.getenv()["MAVEN_PASS"]
}
}
}
publications {
register("maven", MavenPublication::class) {
groupId = "xyz.bluspring.unitytranslate"
artifactId = "unitytranslate-library"
version = "${rootProject.version}"
from(components.getByName("java"))
for (platform in xmake.platformTaskNames) {
artifact(tasks.getByName("nativesJar$platform"))
}
}
}
}