You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.5 KiB
52 lines
1.5 KiB
plugins { |
|
id("java") |
|
} |
|
|
|
group = "de.srsoftware" |
|
version = "unspecified" |
|
|
|
repositories { |
|
mavenCentral() |
|
} |
|
|
|
dependencies { |
|
implementation("de.srsoftware:tools.mime:1.1.2") |
|
implementation("de.srsoftware:tools.optionals:1.0.0") |
|
implementation("de.srsoftware:tools.util:2.0.3") |
|
implementation("org.json:json:20240303") |
|
implementation("org.xerial:sqlite-jdbc:3.49.0.0") |
|
testImplementation(platform("org.junit:junit-bom:5.10.0")) |
|
testImplementation("org.junit.jupiter:junit-jupiter") |
|
} |
|
|
|
|
|
tasks.jar { |
|
manifest.attributes["Main-Class"] = "de.srsoftware.umbrella.core.Launcher" |
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE |
|
val dependencies = configurations |
|
.runtimeClasspath |
|
.get() |
|
.map(::zipTree) // OR .map { zipTree(it) } |
|
from(dependencies) |
|
} |
|
|
|
fun download(url : String, destination : String){ |
|
var destFile = projectDir.toPath().resolve(destination).toFile(); |
|
destFile.parentFile.mkdirs() |
|
if (!destFile.exists()) { |
|
System.out.println("Downloading "+url) |
|
ant.invokeMethod("get", mapOf("src" to url, "dest" to destFile)) |
|
} |
|
} |
|
|
|
tasks.register("downloadLib"){ |
|
download("https://github.com/AshurAxelR/JParsedown/raw/refs/heads/master/src/com/xrbpowered/jparsedown/JParsedown.java", "src/main/java/com/xrbpowered/jparsedown/JParsedown.java") |
|
} |
|
|
|
tasks.withType<org.gradle.jvm.tasks.Jar>() { |
|
exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA") |
|
} |
|
|
|
tasks.named("compileJava") { |
|
dependsOn("downloadLib") |
|
}
|
|
|