This repository has been archived by the owner on Aug 15, 2021. It is now read-only.
forked from MsRandom/SimpleEventHandler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
71 lines (62 loc) · 1.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
plugins {
id 'java-library'
id 'maven-publish'
id 'me.qoomon.git-versioning' version '3.0.0'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
archivesBaseName = 'eventhandler'
group 'org.sandboxpowered'
def ENV = System.getenv()
def releasesRepoUrl = "https://nexus.sandboxpowered.org/repository/maven-releases/"
def snapshotsRepoUrl = "https://nexus.sandboxpowered.org/repository/maven-snapshots/"
def release = "2.1.0"
version = "${release}-SNAPSHOT"
gitVersioning.apply {
branch {
pattern = 'develop'
versionFormat = '${version}'
}
branch {
pattern = 'release'
versionFormat = '${version.release}'
}
branch {
pattern = 'feature/(?<feature>.+)'
versionFormat = '${feature}-SNAPSHOT'
}
tag {
pattern = 'release/(?<tagVersion>[0-9].*)'
versionFormat = '${tagVersion}'
}
commit {
versionFormat = '${commit.short}'
}
}
repositories {
maven { url 'https://nexus.sandboxpowered.org/repository/maven-public/' }
}
dependencies {
implementation 'com.google.guava:guava:21.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
}
test {
useJUnitPlatform()
}
publishing {
publications {
maven(MavenPublication) {
artifact jar
}
}
repositories {
maven {
url = rootProject.version.endsWith("-SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username ENV.MAVEN_USER
password ENV.MAVEN_PASS
}
}
}
}