-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
84 lines (68 loc) · 1.94 KB
/
build.gradle.kts
File metadata and controls
84 lines (68 loc) · 1.94 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
79
80
81
82
83
84
plugins {
id("java")
id("java-library")
id("maven-publish")
}
// Configure all subprojects
subprojects {
apply(plugin = "java")
apply(plugin = "maven-publish")
apply(plugin = "java-library")
group = "gg.makera"
version = "0.1.0-SNAPSHOT"
fun RepositoryHandler.ultimisRepository() {
maven {
name = "ultimis"
url = uri("https://repo.ultimismc.com/repository/makera")
credentials {
username = project.properties["repoUsername"].toString()
password = project.properties["repoPassword"].toString()
}
}
}
repositories {
mavenCentral()
ultimisRepository()
}
dependencies {
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
api("org.jetbrains:annotations:26.0.1")
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
repositories {
ultimisRepository()
}
}
tasks {
withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
sourceCompatibility = JavaVersion.VERSION_11.toString()
targetCompatibility = JavaVersion.VERSION_11.toString()
}
withType<Javadoc> {
val options = (options as StandardJavadocDocletOptions)
options.encoding = Charsets.UTF_8.name()
options.links(
"https://docs.oracle.com/en/java/javase/17/docs/api/",
)
options.tags(
"apiNote:a:API Note:",
"implSpec:a:Implementation Specification",
"implNote:a:Implementation Note"
)
}
test {
useJUnitPlatform()
}
}
}