-apply plugin: 'java'
+plugins {
+ id 'application'
+ id 'jacoco'
+}
-group = 'net.pterodactylus'
-version = '0.14'
+application {
+ group = 'net.pterodactylus'
+ version = '0.14'
+ mainClass = 'de.todesbaum.jsite.main.Main'
+}
repositories {
- maven { url "https://maven.pterodactylus.net/" }
- maven { url "https://repo.maven.apache.org/maven2" }
+ maven { url = "https://maven.pterodactylus.net/" }
+ maven { url = "https://repo.maven.apache.org/maven2" }
}
-dependencies {
- compile group: 'net.pterodactylus', name: 'utils', version: '0.13'
-
- testCompile group: 'junit', name: 'junit', version: '4.12'
- testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
- testCompile group: 'org.mockito', name: 'mockito-core', version: '4.11.0'
+configurations {
+ runtime.extendsFrom implementation
}
-sourceCompatibility = 1.8
-targetCompatibility = 1.8
-
-apply plugin: 'application'
+dependencies {
+ implementation group: 'net.pterodactylus', name: 'utils', version: '0.13'
-mainClassName = 'de.todesbaum.jsite.main.Main'
+ testImplementation(group: 'junit', name: 'junit', version: '4.13.2') {
+ exclude group: 'org.hamcrest', module: 'hamcrest-core'
+ }
+ testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '3.0'
+ testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.11.0'
+}
-task fatJar(type: Jar) {
- archiveName = "${project.name}-${project.version}-jar-with-dependencies.jar"
+tasks.register('fatJar', Jar) {
+ archiveFileName = "${project.name}-${project.version}-jar-with-dependencies.jar"
from {
configurations.runtime.collect {
it.isDirectory() ? it : zipTree(it)
- }
+ }
}
manifest {
attributes('Main-Class': 'de.todesbaum.jsite.main.Main')
with jar
}
-apply plugin: 'jacoco'
-
jacoco {
- toolVersion = '0.8.10'
+ toolVersion = '0.8.14'
}
jacocoTestReport {
dependsOn test
reports {
- xml.enabled = true
+ xml.required = true
}
}