-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathbuild.gradle
147 lines (113 loc) · 3.82 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
plugins {
id 'com.github.johnrengelman.shadow' version '1.2.4'
}
subprojects {
apply plugin: 'java'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'maven'
apply plugin: 'signing'
sourceCompatibility = '1.8'
group 'fr.minuskube'
version '1.0.3'
configurations { provided }
sourceSets {
main.compileClasspath += configurations.provided
test.compileClasspath += configurations.provided
test.runtimeClasspath += configurations.provided
}
repositories {
mavenCentral()
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.25'
compile 'org.slf4j:slf4j-simple:1.7.25'
testCompile 'junit:junit:4.12'
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts { archives javadocJar, sourcesJar }
task copyJar(type: Copy, dependsOn: shadowJar) {
from shadowJar
into '../build'
}
shadowJar.finalizedBy copyJar
signing {
sign configurations.archives
}
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
pom.project {
name 'Netherboard'
packaging 'jar'
description 'Scoreboard API for your Minecraft Sponge and Bukkit Plugins.'
url 'https://github.com/MinusKube/Netherboard'
scm {
connection 'scm:git:git://github.com/MinusKube/Netherboard.git'
developerConnection 'scm:git:ssh://github.com:MinusKube/Netherboard.git'
url 'http://github.com/MinusKube/Netherboard/tree/master'
}
licenses {
license {
name 'GNU General Public License v3.0'
url 'https://www.gnu.org/licenses/gpl-3.0.en.html'
}
}
developers {
developer {
id 'minuskube'
name 'MinusKube'
email '[email protected]'
}
}
}
}
}
}
}
project(':core') {
shadowJar {
archiveName = 'Netherboard-API-' + project.version + '.jar'
}
archivesBaseName = 'netherboard-core'
}
project(':bukkit') {
shadowJar {
archiveName = 'Netherboard-Bukkit-' + project.version + '.jar'
}
archivesBaseName = 'netherboard-bukkit'
repositories {
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
provided 'org.spigotmc:spigot-api:1.11.2-R0.1-SNAPSHOT'
compile project(':core')
}
}
project(':sponge') {
shadowJar {
archiveName = 'Netherboard-Sponge-' + project.version + '.jar'
}
archivesBaseName = 'netherboard-sponge'
repositories {
maven { url 'https://repo.spongepowered.org/maven' }
}
dependencies {
provided 'org.spongepowered:spongeapi:5.1.0'
compile project(':core')
}
}