-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
87 lines (75 loc) · 2.3 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
plugins {
kotlin("jvm") version "2.0.0"
`maven-publish`
}
group = "io.github.kituin"
version = "1.4.2"
repositories {
mavenCentral()
}
dependencies {
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(8)
}
tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
tasks.register<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
from(tasks["javadoc"])
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = project.name
groupId = project.group.toString()
version = project.version.toString()
from(components["java"])
artifact(tasks["sourcesJar"])
artifact(tasks["javadocJar"])
pom {
name.set(project.name)
description.set("Interpreter for ModMultiVersion")
url.set("https://github.com/kitUIN/ModMultiVersionInterpreter")
licenses {
license {
name.set("MIT")
url.set("")
}
}
developers {
developer {
id.set("kitUIN")
name.set("kitUIN")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:git://github.com/kitUIN/ModMultiVersionInterpreter.git")
developerConnection.set("scm:git:ssh://github.com/kitUIN/ModMultiVersionInterpreter.git")
url.set("https://github.com/kitUIN/ModMultiVersionInterpreter")
}
}
}
}
repositories {
maven {
name = project.name
url = uri(if (project.version.toString().endsWith("-SNAPSHOT")) {
"https://maven.kituin.fun/snapshots"
} else {
"https://maven.kituin.fun/releases"
})
credentials {
username = findProperty("user") as String? ?: System.getenv("KITUIN_USERNAME")
password = findProperty("pwd") as String? ?: System.getenv("KITUIN_PASSWORD")
}
}
}
}