-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
89 lines (79 loc) · 2.61 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
plugins {
id 'java-library'
id 'com.github.johnrengelman.shadow' version '7.0.0'
id 'maven-publish'
id 'signing'
}
group 'com.exaroton'
version '1.5.2'
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
mavenCentral()
}
dependencies {
shadow group: 'net.md-5', name: 'bungeecord-api', version: '1.16-R0.5-SNAPSHOT'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
implementation 'com.exaroton:api:1.4.2'
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
java {
withJavadocJar()
withSourcesJar()
}
publishing {
repositories {
maven {
def releaseRepo = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotRepo = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = isReleaseVersion ? releaseRepo : snapshotRepo
credentials {
username = project.hasProperty('ossrhUsername') ? ossrhUsername : "Unknown user"
password = project.hasProperty('ossrhPassword') ? ossrhPassword : "Unknown password"
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = 'bungee'
pom {
name = 'exaroton Bungee API'
description = 'The official exaroton bungee plugin to manage exaroton servers in your proxy'
url = 'https://github.com/exaroton/exaroton-bungeecord'
licenses {
license {
name = 'MIT'
url = 'https://github.com/exaroton/exaroton-bungeecord/blob/master/LICENSE'
}
}
developers {
developer {
id = 'julian'
name = 'Julian Vennen'
email = 'julian@aternos.org'
}
}
scm {
connection = 'scm:git:https://github.com/exaroton/exaroton-bungeecord.git'
developerConnection = 'scm:git:git@github.com:exaroton/exaroton-bungeecord.git'
url = 'https://github.com/exaroton/exaroton-bungeecord'
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}
processResources {
filter {
it.replace('${project.version}', project.version)
}
}
shadowJar {
archiveClassifier.set('')
}