105 lines
2.3 KiB
Groovy
105 lines
2.3 KiB
Groovy
/*
|
|
* This file was generated by the Gradle 'init' task.
|
|
*
|
|
* This generated file contains a sample Java library project to get you started.
|
|
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
|
|
* User Manual available at https://docs.gradle.org/6.8.3/userguide/building_java_projects.html
|
|
*/
|
|
import com.github.jk1.license.render.*
|
|
|
|
plugins {
|
|
id 'java-library'
|
|
id 'com.adarshr.test-logger' version '3.0.0'
|
|
id "com.github.spotbugs" version "4.7.0"
|
|
}
|
|
|
|
sourceCompatibility = 15
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.compilerArgs += '--enable-preview'
|
|
}
|
|
tasks.withType(Test) {
|
|
jvmArgs += "--enable-preview"
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
buildDir 'out/gradle'
|
|
java {
|
|
srcDir 'src'
|
|
}
|
|
resources {
|
|
srcDir 'resources'
|
|
}
|
|
version = rootProject.file('etk/version.txt').text.trim()
|
|
}
|
|
test {
|
|
java {
|
|
srcDir 'test/src'
|
|
}
|
|
resources {
|
|
srcDir 'test/resources'
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
// Use JCenter for resolving dependencies.
|
|
jcenter()
|
|
google()
|
|
}
|
|
|
|
dependencies {
|
|
// Use JUnit Jupiter API for testing.
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.2'
|
|
|
|
// Use JUnit Jupiter Engine for testing.
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
|
|
|
|
implementation group: 'com.google.code.findbugs', name: 'annotations', version: '3.0.1'
|
|
|
|
compile project(':scenarium-logger')
|
|
}
|
|
|
|
|
|
tasks.named('test') {
|
|
// Use junit platform for unit tests.
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
|
|
tasks.named('jar') {
|
|
manifest {
|
|
attributes('Implementation-Title': project.name,
|
|
'Implementation-Version': project.version)
|
|
}
|
|
}
|
|
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
classifier = 'javadoc'
|
|
from javadoc.destinationDir
|
|
}
|
|
|
|
testlogger {
|
|
showFullStackTraces true
|
|
showSimpleNames true
|
|
// pick a theme - mocha, standard, plain, mocha-parallel, standard-parallel or plain-parallel
|
|
theme 'mocha'
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes 'Implementation-Title': 'Ewol tool Kit (ETK)', 'Implementation-Version': version
|
|
}
|
|
} |