-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
50 lines (43 loc) · 1.13 KB
/
build.gradle.kts
File metadata and controls
50 lines (43 loc) · 1.13 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
plugins {
`java-library`
`maven-publish`
idea
}
repositories {
mavenCentral()
}
dependencies {
compileOnly("com.google.code.gson:gson:2.13.2")
compileOnly("org.jspecify:jspecify:1.0.0")
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = Charsets.UTF_8.name()
options.release = 25
options.isFork = true
options.compilerArgs.addAll(listOf("-Xlint:-deprecation", "-Xlint:-removal"))
}
tasks.withType<Javadoc>().configureEach {
options.encoding = Charsets.UTF_8.name()
}
tasks.withType<ProcessResources>().configureEach {
filteringCharset = Charsets.UTF_8.name()
}
java {
withSourcesJar()
}
extensions.configure<PublishingExtension> {
repositories {
maven("https://maven.canvasmc.io/releases") {
name = "canvasReleases"
credentials {
username = providers.environmentVariable("PUBLISH_USER").orNull
password = providers.environmentVariable("PUBLISH_TOKEN").orNull
}
}
}
publications {
register<MavenPublication>("mavenJava") {
from(components["java"])
}
}
}