55 lines
1.2 KiB
Groovy
55 lines
1.2 KiB
Groovy
|
|
plugins {
|
|
id "application"
|
|
// these idiots don't optimize in the compile-time, but in the runtime
|
|
// who let these knuckleheads make a language
|
|
|
|
// TODO: figure out how to integrate proguard
|
|
// id "com.github.xaverkapeller.proguard-annotations"
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
gradlePluginPortal()
|
|
}
|
|
|
|
dependencies {
|
|
// Genuinely fuck Java
|
|
annotationProcessor 'com.github.bsideup.jabel:jabel-javac-plugin:0.4.2'
|
|
compileOnly 'com.github.bsideup.jabel:jabel-javac-plugin:0.4.2'
|
|
}
|
|
|
|
java {
|
|
toolchain.languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
|
|
configure([tasks.compileJava]) {
|
|
sourceCompatibility = 17 // for the IDE support
|
|
options.release = 11
|
|
|
|
javaCompiler = javaToolchains.compilerFor {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|
|
|
|
jar {
|
|
manifest.attributes["Main-class"] = project.main_class
|
|
}
|
|
|
|
sourceSets {
|
|
main.java.srcDirs = [ "src/java" ]
|
|
main.resources.srcDirs = [ "src/assets" ]
|
|
}
|
|
|
|
processResources {
|
|
filesMatching "metadata.json", {
|
|
expand(
|
|
version: project.project_version,
|
|
name: project.project_name
|
|
)
|
|
}
|
|
}
|
|
|
|
base.archivesName = project.project_name
|
|
version = project.project_version
|
|
group = project.project_group |