-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
98 lines (86 loc) · 2.65 KB
/
build.gradle.kts
File metadata and controls
98 lines (86 loc) · 2.65 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
plugins {
`java-library`
alias(libs.plugins.graalvm.buildtools)
alias(libs.plugins.maven.publish)
}
group = "dev.hallock.zstd"
version = findProperty("version") ?: "dev"
repositories {
mavenCentral()
}
dependencies {
api(libs.jspecify)
api(project(":bindings"))
testImplementation(platform(libs.junit.bom))
testImplementation(libs.junit.jupiter)
testRuntimeOnly(libs.junit.platform.launcher)
}
tasks.test {
useJUnitPlatform()
jvmArgs("--enable-native-access=dev.hallock.zstd.bindings")
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(25)
modularity.inferModulePath = true
}
tasks.compileJava {
options.compilerArgs.add("-Xlint:all")
options.compilerArgs.add("-Werror")
options.encoding = "UTF-8"
}
tasks.javadoc {
val options = options as StandardJavadocDocletOptions
options.tags("apiNote:a:API Note:", "implSpec:a:Implementation Requirements:", "implNote:a:Implementation Note:")
}
graalvmNative {
agent {
enabled.set(true)
metadataCopy {
inputTaskNames.add("test")
outputDirectories.add("src/main/resources/META-INF/native-image/dev.hallock.zstd")
mergeWithExisting.set(true)
}
modes {
defaultMode = "standard"
standard {
//TODO suppress globs
accessFilterFiles.from("src/test/resources/native-image/access-filter.json")
}
}
binaries {
named("test") {
buildArgs.add("-O0")
jvmArgs.add("--enable-native-access=ALL-UNNAMED") //TODO figure out why this isn't using modules
}
}
}
}
mavenPublishing {
publishToMavenCentral(automaticRelease = false)
signAllPublications()
pom {
name.set("zstd-java")
description.set("Java (FFM) API for Zstandard (zstd)")
inceptionYear.set("2026")
url.set("https://github.com/ryanhallock/zstd-java/")
licenses {
license {
name.set("The MIT License")
url.set("https://opensource.org/licenses/MIT")
distribution.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("ryanhallock")
name.set("Ryan Hallock")
url.set("https://github.com/ryanhallock/")
}
}
scm {
url.set("https://github.com/ryanhallock/zstd-java/")
connection.set("scm:git:git://github.com/ryanhallock/zstd-java.git")
developerConnection.set("scm:git:ssh://git@github.com/ryanhallock/zstd-java.git")
}
}
}