-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
109 lines (93 loc) · 2.85 KB
/
build.gradle
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
99
100
101
102
103
104
105
106
107
108
109
plugins {
id 'java'
id 'maven-publish'
id 'signing'
id "me.champeau.jmh" version "0.7.2"
}
group = 'io.github.xfacthd'
version = '1.2'
project.ext.lwjglVersion = "3.3.3"
project.ext.lwjglNatives = "natives-windows"
repositories {
mavenCentral()
}
dependencies {
testImplementation platform("org.lwjgl:lwjgl-bom:$lwjglVersion")
testImplementation "org.lwjgl:lwjgl"
testImplementation "org.lwjgl:lwjgl-stb"
testImplementation "org.lwjgl:lwjgl-xxhash"
testRuntimeOnly "org.lwjgl:lwjgl::$lwjglNatives"
testRuntimeOnly "org.lwjgl:lwjgl-stb::$lwjglNatives"
testRuntimeOnly "org.lwjgl:lwjgl-xxhash::$lwjglNatives"
}
test {
}
final var INC_ONLY_FROM_DISK = [ '(PNJ|STBI)_read(\\\\d)+bitFile' ];
final var INC_ONLY_FROM_MEMORY = [ '(PNJ|STBI)_read(\\d)+bitBuffer' ];
final var INC_ONLY_RGBA = [ 'PNJTruecolorAlphaDirect(Progressive|Interlace)Benchmark' ]
final var INC_ONLY_RGBA_PROF = [ 'PNJTruecolorAlphaDirect(Progressive|Interlace)Benchmark.PNJ_read(\\d)+bitBuffer' ]
final var INC_DIFF_SIZE = [ 'PNJDifferenSizesBenchmark' ]
jmh {
includes = INC_ONLY_FROM_MEMORY
fork = 1
}
java {
withJavadocJar()
withSourcesJar()
}
javadoc {
options.tags = [ "apiNote" ]
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = 'pnj'
pom {
url = 'https://github.com/XFactHD/PNJ'
description = 'Straightforward PNG decoder and encoder, fully written in Java'
licenses {
license {
name = 'LGPL 3'
url = 'https://github.com/XFactHD/PNJ/blob/main/LICENSE'
distribution = 'repo'
}
}
developers {
developer {
id = 'xfacthd'
name = 'Dennis C'
email = '[email protected]'
}
}
scm {
url = 'https://github.com/XFactHD/PNJ'
connection = 'scm:git:git://github.com/XFactHD/PNJ.git'
}
issueManagement {
system = 'github'
url = 'https://github.com/XFactHD/PNJ/issues'
}
}
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}
repositories {
maven {
// FIXME: properly publish to Central Portal directly
name = 'LocalPublishMaven'
url = file('/publish')
}
}
}
signing {
sign publishing.publications.mavenJava
useGpgCmd()
}