forked from KyoriPowered/nbt
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
112 lines (92 loc) · 2.66 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
plugins {
id 'java'
id 'maven'
id 'signing'
id 'net.minecrell.licenser' version '0.3'
}
group 'net.kyori'
version '1.12-1.0.0-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.compilerArgs += ['-Xlint:all', '-Xlint:-path', '-parameters']
options.deprecation = true
options.encoding = 'UTF-8'
}
license {
header project.file('header.txt')
include '**/*.java'
newLine false
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile 'org.checkerframework:checker-qual:2.4.0'
testCompile 'com.google.guava:guava:26.0-jre'
testCompile 'org.junit.jupiter:junit-jupiter-api:5.0.3'
testCompile 'org.junit.jupiter:junit-jupiter-engine:5.0.3'
}
task javadocJar(type: Jar) {
classifier 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar
archives sourcesJar
}
signing {
required { !project.version.endsWith('-SNAPSHOT') && gradle.taskGraph.hasTask(':uploadArchives') && project.hasProperty('signing.keyId') }
sign configurations.archives
}
jar {
manifest.attributes(
'Automatic-Module-Name': 'net.kyori.nbt'
)
}
if (project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) {
uploadArchives {
enabled = System.getenv('TRAVIS') == null || project.version.endsWith('-SNAPSHOT')
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/') {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
pom.project {
description 'An NBT library for Minecraft.'
name project.name
url 'https://github.com/KyoriPowered/nbt/'
developers {
developer {
name 'kashike'
}
}
issueManagement {
system 'GitHub Issues'
url 'https://github.com/KyoriPowered/nbt/issues'
}
licenses {
license {
name 'MIT License'
url 'https://opensource.org/licenses/MIT'
}
}
scm {
connection 'scm:[email protected]:KyoriPowered/nbt.git'
developerConnection 'scm:[email protected]:KyoriPowered/nbt.git'
url 'https://github.com/KyoriPowered/nbt/'
}
}
}
}
}
}