-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
58 lines (48 loc) · 1.62 KB
/
Copy pathbuild.gradle
File metadata and controls
58 lines (48 loc) · 1.62 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
plugins {
id 'java-library'
id 'maven-publish'
}
group = rootProject.project_group
version = rootProject.project_version
repositories {
mavenCentral()
}
dependencies {
testImplementation platform('org.junit:junit-bom:6.1.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
implementation project(path: ':libwebp-api')
testImplementation testFixtures(project(path: ':libwebp-api'))
runtimeOnly project(path: ':libwebp-natives', configuration: 'darwin-x64')
runtimeOnly project(path: ':libwebp-natives', configuration: 'darwin-aarch64')
runtimeOnly project(path: ':libwebp-natives', configuration: 'windows-x64')
runtimeOnly project(path: ':libwebp-natives', configuration: 'windows-x86')
runtimeOnly project(path: ':libwebp-natives', configuration: 'linux-x64')
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
withJavadocJar()
withSourcesJar()
}
test {
useJUnitPlatform()
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += "--enable-preview"
}
tasks.withType(Test).configureEach {
jvmArgs += "--enable-preview"
}
tasks.withType(JavaExec).configureEach {
jvmArgs += "--enable-preview"
}
tasks.withType(Javadoc).configureEach {
// https://github.com/gradle/gradle/issues/27001#issuecomment-1803632810
CoreJavadocOptions opt = options as CoreJavadocOptions
opt.addStringOption("source", "21")
opt.addBooleanOption("-enable-preview", true)
}