Files
Holocore/build.gradle
2018-05-22 11:40:40 -05:00

90 lines
1.7 KiB
Groovy

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.3'
}
}
plugins {
id 'com.github.johnrengelman.shadow' version '2.0.3'
id 'application'
id 'java'
id 'groovy'
id 'idea'
id 'findbugs'
id 'checkstyle'
}
mainClassName = 'com.projectswg.holocore.ProjectSWG'
sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceSets {
// https://stackoverflow.com/questions/22159699/gradle-groovy-and-java-class-dependency-compile
main {
groovy {
// override the default locations, rather than adding additional ones
srcDirs = ['src/main/groovy', 'src/main/java']
}
java {
srcDirs = [] // don't compile Java code twice
}
}
display {
java {
}
}
}
test {
testLogging {
events "skipped", "failed" // just good to know in terms of what failed
}
afterSuite { TestDescriptor td, TestResult tr ->
if (td.parent == null) {
println 'Tests run: (' + tr.getTestCount() + '), Failures: (' + tr.getFailedTestCount() + ')' // IMPORTANT - this is required for Lightspeed
}
}
include 'com/projectswg/holocore/TestAll.class' // to run only a single test case
}
shadowJar {
baseName = "Holocore"
classifier = null
version = null
}
repositories {
jcenter()
}
dependencies {
compile project(':pswgcommon')
compile group: 'org.codehaus.groovy', name: 'groovy', version: '3.0.0-alpha-1'
compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.21.0.1'
testCompile 'junit:junit:4.12'
displayCompile project(':pswgcommon')
displayCompile sourceSets.main.output
}
task wrapper(type: Wrapper) {
gradleVersion = "4.7"
}
tasks.withType(FindBugs) {
reports {
xml.enabled = false
html.enabled = true
}
}
checkstyle {
toolVersion "8.8"
}