IT AINT BROKEN NOW (jar still broken)
This commit is contained in:
64
build.gradle
Normal file
64
build.gradle
Normal file
@@ -0,0 +1,64 @@
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'jacoco'
|
||||
id 'org.barfuin.gradle.jacocolog' version '2.0.0'
|
||||
id 'com.diffplug.gradle.spotless' version '4.5.1'
|
||||
}
|
||||
|
||||
group 'libkco'
|
||||
version '4.2-BROKEN'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
||||
implementation 'com.google.googlejavaformat:google-java-format:1.9'
|
||||
}
|
||||
|
||||
jacoco {
|
||||
toolVersion = "0.8.8"
|
||||
reportsDirectory = file('jacoco')
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
dependsOn spotlessApply
|
||||
finalizedBy jacocoTestReport
|
||||
}
|
||||
|
||||
jar {
|
||||
dependsOn spotlessApply
|
||||
}
|
||||
|
||||
jacocoTestReport {
|
||||
dependsOn test
|
||||
afterEvaluate {
|
||||
classDirectories.setFrom(files(classDirectories.files.collect {
|
||||
fileTree(dir: it, exclude: [
|
||||
"**/Main*",
|
||||
])
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes "Main-Class": "org.bootcamp.TrafficLights.Traffic"
|
||||
}
|
||||
|
||||
from {
|
||||
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
}
|
||||
}
|
||||
|
||||
spotless {
|
||||
java {
|
||||
googleJavaFormat()
|
||||
trimTrailingWhitespace()
|
||||
indentWithSpaces(2)
|
||||
endWithNewline()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user