-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
99 lines (84 loc) · 1.95 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
plugins {
id 'java'
id 'maven-publish'
id 'signing'
id 'jacoco'
}
version = '1.3.1'
group = 'se.llbit'
archivesBaseName = 'jo-nbt'
// Source level is JDK 7 because we use AutoCloseable.
sourceCompatibility = targetCompatibility = '1.7'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.11'
}
jar.manifest.attributes 'Main-Class': 'se.llbit.nbt.DumpNBT'
test.inputs.dir file('testfiles')
jacocoTestReport {
reports {
xml.required = true
html.required = true
}
}
check.dependsOn jacocoTestReport
compileJava.options.encoding = compileTestJava.options.encoding = 'UTF-8'
javadoc {
options.encoding = 'UTF-8'
options.addStringOption('Xdoclint:none', '-quiet')
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'jo-nbt'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'jo-nbt'
description = 'Java NBT library.'
url = 'https://github.com/llbit/jo-nbt'
licenses {
license {
name = 'Modified BSD License'
url = 'http://opensource.org/licenses/BSD-3-Clause'
distribution = 'repo'
}
}
developers {
developer {
name = 'Jesper Öqvist'
email = 'jesper@llbit.se'
}
}
scm {
connection = 'scm:git:https://github.com/llbit/jo-nbt.git'
url = 'https://github.com/llbit/jo-nbt'
}
}
}
}
if (project.hasProperty('ossrhUsername')) {
repositories {
maven {
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
credentials {
username = ossrhUsername
password = ossrhPassword
}
}
}
}
}