-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle
43 lines (34 loc) · 1.15 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
plugins {
id 'java'
}
group 'io.github.aquerr'
version '0.13.1'
compileJava.options.encoding = 'UTF-8'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
maven { url 'https://repo.spongepowered.org/maven' }
}
dependencies {
compileOnly('org.spongepowered:spongeapi:7.1.0')
// compile 'com.github.rojo8399:PlaceholderAPI:4.5.1'
}
tasks.create("publishBuildOnDiscord") {
group = "Publishing"
description = "Task for publishing the jar file to discord's jenkins channel"
doLast {
String[] jarFiles = new FileNameFinder().getFileNames(project.buildDir.getPath(), "**/*.jar")
if(jarFiles.length > 0) {
println("Found jar files: " + jarFiles)
String lastCommitDescription = "git log -1 --pretty=%B".execute().getText()
if(lastCommitDescription == null || lastCommitDescription == "") {
lastCommitDescription = "No changelog provided"
}
exec {
commandLine("java", "-jar", "..\\jenkinsdiscordbot-1.0.jar", "EagleFactionsAPI", jarFiles[0], lastCommitDescription)
}
}
}
}