57 lines
1.7 KiB
Groovy
57 lines
1.7 KiB
Groovy
plugins {
|
|
id 'groovy'
|
|
id 'application'
|
|
id "net.nemerosa.versioning" version "2.15.1"
|
|
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation 'org.codehaus.groovy:groovy:3.0.13'
|
|
testImplementation 'org.spockframework:spock-core:2.2-groovy-3.0'
|
|
testImplementation 'junit:junit:4.13.2'
|
|
|
|
annotationProcessor 'info.picocli:picocli-codegen:4.7.4'
|
|
implementation 'info.picocli:picocli:4.7.4'
|
|
implementation 'org.slf4j:slf4j-api:2.0.7'
|
|
implementation 'ch.qos.logback:logback-classic:1.3.8'
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(8)
|
|
}
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
application {
|
|
mainClass = 'biz.nellemann.memstress.Application'
|
|
}
|
|
|
|
tasks.named('test') {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
|
|
group = projectGroup
|
|
version = projectVersion
|
|
|
|
|
|
jar {
|
|
manifest {
|
|
attributes(
|
|
'Created-By' : "Gradle ${gradle.gradleVersion}",
|
|
'Build-OS' : "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}",
|
|
'Build-Jdk' : "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
|
|
'Build-User' : System.properties['user.name'],
|
|
'Build-Version' : versioning.info.tag ?: (versioning.info.branch + "-" + versioning.info.build),
|
|
'Build-Revision' : versioning.info.commit,
|
|
'Build-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ss.SSSZ").toString(),
|
|
)
|
|
}
|
|
}
|