Files
sheepit-shadow-nabber/build.gradle

72 lines
1.7 KiB
Groovy
Raw Normal View History

2021-05-11 15:36:59 +00:00
plugins {
id 'java-library'
2023-11-08 12:00:44 +01:00
id 'application'
2024-06-06 00:25:23 +00:00
id 'com.github.johnrengelman.shadow' version '8.1.1'
2024-06-03 14:02:30 +00:00
id 'pmd'
2019-08-10 22:09:32 +02:00
}
2024-06-06 00:25:23 +00:00
java {
sourceCompatibility = 11
targetCompatibility = 11
}
2024-06-06 00:25:23 +00:00
tasks.register('generateVersionFile') {
2022-02-19 14:20:08 +01:00
def stdout = new ByteArrayOutputStream()
def result = exec {
ignoreExitValue true
commandLine "git", "describe", "--tags", "--always"
standardOutput = stdout
}
2024-06-06 00:25:23 +00:00
if (result.getExitValue() == 0) {
2022-02-19 14:20:08 +01:00
new File(projectDir, "src/main/resources/VERSION").text = stdout.toString() - "v"
} else {
logger.warn("Warning: automatic version detection failed")
}
}
shadowJar {
exclude 'OSGI-OPT/' // args4j garbage
}
2022-02-19 14:20:08 +01:00
tasks.shadowJar.dependsOn(generateVersionFile)
2019-08-10 22:09:32 +02:00
repositories {
mavenCentral()
}
dependencies {
2022-07-29 23:27:10 +00:00
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
2021-05-11 15:36:59 +00:00
implementation 'args4j:args4j:2.33'
2024-10-25 11:26:22 +02:00
implementation 'net.lingala.zip4j:zip4j:2.11.+'
implementation 'net.java.dev.jna:jna-platform:5.12.+'
implementation 'com.github.oshi:oshi-core:6.2.+'
implementation 'org.simpleframework:simple-xml:2.7.+'
2022-08-29 15:58:47 +00:00
implementation 'com.formdev:flatlaf:2.2' // 2.3+ causes illegal reflective access warning on win + adoptium java 11.0.16
2024-10-25 11:26:22 +02:00
implementation 'com.squareup.okhttp3:okhttp:4.12.+'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:4.12.+'
2022-07-29 23:27:10 +00:00
implementation 'org.slf4j:slf4j-nop:1.7.36'
2019-08-10 22:09:32 +02:00
}
2024-06-06 00:25:23 +00:00
application {
mainClass = "com.sheepit.client.standalone.Worker"
}
2023-11-08 12:00:44 +01:00
2019-08-10 22:09:32 +02:00
jar {
manifest {
attributes "Main-Class": "com.sheepit.client.standalone.Worker"
}
from {
2024-06-06 00:25:23 +00:00
configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) }
duplicatesStrategy "exclude"
2019-08-10 22:09:32 +02:00
}
}
2024-06-03 14:02:30 +00:00
pmd {
toolVersion = "7.2.0"
2024-06-03 14:02:30 +00:00
ignoreFailures = false
ruleSetFiles = files("rulesets/java-sheepit.xml")
ruleSets = []
}