This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
94 lines (83 loc) · 2.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'distribution'
apply plugin: 'org.springframework.boot'
version = '2.9.1'
buildscript {
ext {
springBootVersion = '1.5.0.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.springframework.boot:spring-boot-starter-jersey:${springBootVersion}")
classpath("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}")
}
}
repositories {
repositories {
jcenter()
mavenCentral()
maven {
url('https://m2.dv8tion.net/releases')
}
}
}
dependencies {
compile('net.dv8tion:JDA:4.3.0_293')
compile('com.sedmelluq:lavaplayer:1.3.53')
compile("commons-io:commons-io:2.5")
compile("com.h2database:h2")
compile("com.googlecode.soundlibs:mp3spi:1.9.5-1")
compile group: "com.google.guava", name: "guava", version: "r05"
compile 'com.google.code.gson:gson:2.8.1'
compile 'org.json:json:20160810'
compile("org.springframework.boot:spring-boot-starter-jersey")
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("org.springframework.boot:spring-boot-starter-web")
testCompile('org.springframework.boot:spring-boot-starter-test')
}
jar {
group = 'build'
manifest {
attributes 'Main-Class': 'net.dirtydeeds.discordsoundboard.MainController',
'Implementation-Version': version
}
from { configurations.compile.findAll {
!it.name.endsWith('pom') }.collect {
it.isDirectory() ? it : zipTree(it) } }
exclude('/src/main/java/**')
exclude('/src/main/resources/**')
}
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
def distributionsCopySpec = copySpec {
def baseName = "${jar.baseName}"
def fileName = "${baseName}-$version"
from file("$buildDir/libs")
from file("$buildDir/resources/main")
include "**/app.properties.example"
include "soundboard.bat"
include "strings.txt"
include "${fileName}.jar"
rename ("app.properties.example", "app.properties")
rename "${fileName}.jar", "${baseName}.jar"
}
task zip(type: Zip, dependsOn: 'bootRepackage') {
def fileName = "${baseName}-$version"
with distributionsCopySpec
archiveName "${fileName}.zip"
}
task tar(type: Tar, dependsOn: 'bootRepackage') {
def fileName = "${baseName}-$version"
with distributionsCopySpec
archiveName "${fileName}.tar"
}
build.dependsOn(zip,tar)
task wrapper(type: Wrapper) {
gradleVersion = '4.4'
}