Upgrade to Gradle 8.8
This commit is contained in:
24
build.gradle
24
build.gradle
@@ -1,28 +1,23 @@
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'application'
|
||||
id 'com.github.johnrengelman.shadow' version '7.1.2'
|
||||
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
||||
id 'pmd'
|
||||
}
|
||||
|
||||
sourceCompatibility = '1.11'
|
||||
targetCompatibility = '1.11'
|
||||
|
||||
compileJava {
|
||||
// Suppress warnings about internal api usage - https://stackoverflow.com/a/19553686/6238618
|
||||
options.fork = true
|
||||
options.forkOptions.executable = 'javac'
|
||||
options.compilerArgs << '-XDignore.symbol.file'
|
||||
java {
|
||||
sourceCompatibility = 11
|
||||
targetCompatibility = 11
|
||||
}
|
||||
|
||||
task generateVersionFile {
|
||||
tasks.register('generateVersionFile') {
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
def result = exec {
|
||||
ignoreExitValue true
|
||||
commandLine "git", "describe", "--tags", "--always"
|
||||
standardOutput = stdout
|
||||
}
|
||||
if(result.getExitValue() == 0) {
|
||||
if (result.getExitValue() == 0) {
|
||||
new File(projectDir, "src/main/resources/VERSION").text = stdout.toString() - "v"
|
||||
} else {
|
||||
logger.warn("Warning: automatic version detection failed")
|
||||
@@ -53,7 +48,9 @@ dependencies {
|
||||
implementation 'org.slf4j:slf4j-nop:1.7.36'
|
||||
}
|
||||
|
||||
mainClassName = "com.sheepit.client.standalone.Worker"
|
||||
application {
|
||||
mainClass = "com.sheepit.client.standalone.Worker"
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
@@ -61,7 +58,8 @@ jar {
|
||||
}
|
||||
|
||||
from {
|
||||
configurations.implementation.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||
duplicatesStrategy "exclude"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user