-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.gradle
57 lines (47 loc) · 1.29 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
def getGitVersion() {
def versionStr = new ByteArrayOutputStream()
def result = exec {
standardOutput versionStr
errorOutput versionStr
ignoreExitValue true
commandLine "git", "describe", "--exact-match", "--tags"
}
if (result.exitValue == 0) {
return [versionStr.toString().trim(), false]
}
versionStr = new ByteArrayOutputStream()
exec {
standardOutput versionStr
errorOutput versionStr
commandLine "git", "rev-parse", "--short", "HEAD"
}
return [versionStr.toString().trim(), true]
}
subprojects {
apply plugin: 'maven-publish'
apply plugin: 'java-library'
group = 'moe.kyokobot.koe'
if (project.hasProperty('version')) {
// Used by JitPack
version = project.version
} else {
// Get version from git
def gitVersion = getGitVersion()
version = gitVersion[0]
}
sourceCompatibility = 11
targetCompatibility = 11
repositories {
mavenLocal()
mavenCentral()
maven { url "https://maven.lavalink.dev/releases" }
maven { url "https://jitpack.io/" }
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
}