-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.gradle
More file actions
76 lines (66 loc) · 2.25 KB
/
build.gradle
File metadata and controls
76 lines (66 loc) · 2.25 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
import org.apache.tools.ant.taskdefs.condition.Os
plugins {
id 'java-library'
id 'com.vanniktech.maven.publish' version '0.36.0'
}
group = 'io.github.jwharm.cairobindings'
version = '1.18.4.3'
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
dependencies {
compileOnly 'org.java-gi:glib:0.15.0'
testImplementation 'org.junit.jupiter:junit-jupiter:6.0.3'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
tasks.named('test', Test) {
// Configure library path for MacOS (Homebrew) and set MacOS-specific JVM parameter
if (Os.isFamily(Os.FAMILY_MAC)) {
jvmArgs += '-Djava.library.path=/opt/homebrew/lib'
jvmArgs += '-XstartOnFirstThread'
}
// Configure library path for Arch, Fedora and Debian/Ubuntu
else if (Os.isFamily(Os.FAMILY_UNIX)) {
jvmArgs += '-Djava.library.path=/usr/lib64:/lib64:/lib:/usr/lib:/lib/x86_64-linux-gnu'
}
// Configure library path for Windows (MSYS2)
else if (Os.isFamily(Os.FAMILY_WINDOWS)) {
jvmArgs += '-Djava.library.path=C:/msys64/mingw64/bin'
}
useJUnitPlatform()
jvmArgs += "--enable-native-access=ALL-UNNAMED"
}
mavenPublishing {
publishToMavenCentral()
signAllPublications()
coordinates("io.github.jwharm.cairobindings", 'cairo', project.version.toString())
pom {
name = "io.github.jwharm.cairobindings:cairo"
description = 'Java language bindings for cairo'
url = 'https://github.com/jwharm/cairo-java-bindings/'
licenses {
license {
name = 'GNU Lesser General Public License, version 2.1'
url = 'https://www.gnu.org/licenses/lgpl-2.1.txt'
}
}
developers {
developer {
id = 'jwharm'
name = 'Jan-Willem Harmannij'
email = 'jwharmannij@gmail.com'
url = 'https://github.com/jwharm'
}
}
scm {
connection = 'scm:git:git://github.com/jwharm/cairo-java-bindings.git'
developerConnection = 'scm:git:ssh://github.com:jwharm/cairo-java-bindings.git'
url = 'http://github.com/jwharm/cairo-java-bindings/tree/master'
}
}
}