-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
127 lines (112 loc) · 3.68 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
plugins {
id 'java-library'
id 'jacoco'
id 'maven-publish'
id 'signing'
}
group 'net.sandrohc'
version '1.1.0'
ext.isReleaseVersion = !version.endsWith('SNAPSHOT')
repositories {
mavenCentral()
}
dependencies {
api 'org.slf4j:slf4j-api:1.7.36'
implementation 'org.checkerframework:checker-qual:3.41.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.1'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.1'
testImplementation 'org.assertj:assertj-core:3.24.2'
testImplementation 'io.github.origin-energy:java-snapshot-testing-junit5:4.0.6'
testImplementation 'io.github.origin-energy:java-snapshot-testing-plugin-jackson:4.0.6'
testImplementation 'com.fasterxml.jackson.core:jackson-core:2.16.0'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.16.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.36'
testRuntimeOnly 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.16.0'
testRuntimeOnly 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.16.0'
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withJavadocJar()
withSourcesJar()
}
jar {
manifest {
attributes(
'Implementation-Title': 'schematic4j',
'Implementation-Version': project.version
)
}
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
}
tasks.withType(JavaCompile) {
// force UTF-8 encoding on Windows machines
options.encoding = 'UTF-8'
}
publishing {
repositories {
maven {
def releasesRepoUrl = layout.buildDirectory.dir('repos/releases')
def snapshotsRepoUrl = layout.buildDirectory.dir('repos/snapshots')
url = isReleaseVersion ? releasesRepoUrl : snapshotsRepoUrl
//credentials {
// username = project.hasProperty('ossrhUsername') ? ossrhUsername : 'unk'
// password = project.hasProperty('ossrhPassword') ? ossrhPassword : 'unk'
//}
}
}
publications {
maven(MavenPublication) {
from components.java
pom {
name = 'Schematic4J'
description = 'Java parser for the .schem/.schematic/.litematic Minecraft formats. 🗺'
url = 'https://github.com/SandroHc/schematic4j'
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'SandroHc'
name = 'Sandro Marques'
email = 'sandro123iv@gmail.com'
}
}
scm {
connection = 'scm:git:git://github.com/SandroHc/schematic4j.git'
developerConnection = 'scm:git:ssh://github.com/SandroHc/schematic4j.git'
url = 'https://github.com/SandroHc/schematic4j'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/SandroHc/schematic4j/issues'
}
}
}
}
}
signing {
useGpgCmd()
sign publishing.publications.maven
}
tasks.withType(Sign).configureEach {
onlyIf { System.env['JITPACK'] == null }
}