IT AINT BROKEN NOW (jar still broken)

This commit is contained in:
LinlyBoi
2023-03-04 12:06:25 +02:00
commit 1dc7909a90
20 changed files with 614 additions and 0 deletions

64
build.gradle Normal file
View 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()
}
}