-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.gradle
145 lines (114 loc) · 3.72 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
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
subprojects {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java-library'
sourceCompatibility = '1.8'
group 'fr.minuskube'
version '1.2.3'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'org.slf4j:slf4j-simple:1.7.25'
}
task copyJar(type: Copy, dependsOn: shadowJar) {
from shadowJar
into '../build'
}
shadowJar.finalizedBy copyJar
}
project(':core') {
shadowJar {
archiveFileName = 'Netherboard-API-' + project.version + '.jar'
}
archivesBaseName = 'netherboard-core'
}
project(':bukkit') {
shadowJar {
archiveFileName = '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 {
compileOnly 'org.spigotmc:spigot-api:1.11.2-R0.1-SNAPSHOT'
api project(':core')
}
}
project(':sponge') {
shadowJar {
archiveFileName = 'Netherboard-Sponge-' + project.version + '.jar'
}
archivesBaseName = 'netherboard-sponge'
repositories {
maven { url 'https://repo.spongepowered.org/maven' }
}
dependencies {
compileOnly 'org.spongepowered:spongeapi:5.1.0'
api project(':core')
}
}
subprojects {
apply plugin: 'signing'
apply plugin: 'maven-publish'
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = archivesBaseName
artifact tasks.jar
artifact tasks.javadocJar
artifact tasks.sourcesJar
pom {
name = 'Netherboard'
description = 'Scoreboard API for your Minecraft Sponge and Bukkit Plugins.'
url = 'https://github.com/MinusKube/Netherboard'
licenses {
license {
name = 'Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0'
}
}
developers {
developer {
id = 'minuskube'
name = 'MinusKube'
email = '[email protected]'
}
}
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'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/'
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username project.ossrhUsername
password project.ossrhPassword
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
}