86 lines
2.3 KiB
Groovy
86 lines
2.3 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.9.RELEASE")
|
|
classpath 'org.springframework:springloaded:1.2.6.RELEASE'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'base'
|
|
apply plugin: 'java'
|
|
apply plugin: 'eclipse'
|
|
apply plugin: 'idea'
|
|
apply plugin: 'org.springframework.boot'
|
|
|
|
|
|
def versionObj = new Version(major: 0, minor: 2, revision: 0)
|
|
|
|
group = "net.broken"
|
|
archivesBaseName = "BrokenDiscordBot"
|
|
version = "$versionObj"
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
|
|
|
|
jar.doFirst {
|
|
delete "${buildDir}/libs/*"
|
|
}
|
|
|
|
jar {
|
|
|
|
baseName = 'DiscordBot'
|
|
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
jcenter()
|
|
}
|
|
|
|
javadoc {
|
|
source = sourceSets.main.allJava
|
|
classpath = configurations.compile
|
|
}
|
|
|
|
|
|
dependencies {
|
|
compile("org.springframework.boot:spring-boot-starter-web"){
|
|
exclude group:"org.springframework.boot", module: "spring-boot-starter-logging"
|
|
}
|
|
compile("org.springframework.boot:spring-boot-starter-log4j2")
|
|
compile("com.sedmelluq:lavaplayer:1.2.49")
|
|
compile 'net.dv8tion:JDA:3.3.1_303'
|
|
compile group: 'org.json', name: 'json', version: '20160810'
|
|
compile 'org.springframework.security:spring-security-web:5.0.1.RELEASE'
|
|
// JPA Data (We are going to use Repositories, Entities, Hibernate, etc...)
|
|
compile("org.springframework.boot:spring-boot-starter-data-jpa") {
|
|
exclude group:"org.springframework.boot", module: "spring-boot-starter-logging"
|
|
}
|
|
// Use MySQL Connector-J
|
|
compile 'mysql:mysql-connector-java'
|
|
compile 'org.reflections:reflections:0.9.11'
|
|
compile 'org.apache.commons:commons-lang3:3.7'
|
|
|
|
testCompile('org.springframework.boot:spring-boot-starter-test')
|
|
testCompile('com.jayway.jsonpath:json-path')
|
|
compile("org.springframework.boot:spring-boot-starter-thymeleaf") {
|
|
exclude group:"org.springframework.boot", module: "spring-boot-starter-logging"
|
|
}
|
|
}
|
|
|
|
class Version {
|
|
String major, minor, revision
|
|
|
|
static String getBuild() {
|
|
System.getenv("BUILD_NUMBER") ?: System.getProperty("BUILD_NUMBER") ?:
|
|
System.getenv("GIT_COMMIT")?.substring(0, 7) ?: System.getProperty("GIT_COMMIT")?.substring(0, 7) ?:"DEV"
|
|
}
|
|
|
|
String toString() {
|
|
"${major}.${minor}.${revision}_$build"
|
|
}
|
|
} |