2022-10-07 19:25:25 +02:00
|
|
|
import io.gitlab.jfronny.scripts.*
|
2022-11-25 14:57:40 +01:00
|
|
|
import javax.lang.model.element.Modifier.*
|
2022-10-07 19:25:25 +02:00
|
|
|
|
|
|
|
plugins {
|
|
|
|
id("java-gradle-plugin")
|
|
|
|
id("jf.maven-publish")
|
2022-10-13 19:37:55 +02:00
|
|
|
id("jf.codegen")
|
2022-10-07 19:25:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
group = rootProject.group
|
|
|
|
version = rootProject.version
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2022-11-25 14:57:40 +01:00
|
|
|
maven("https://maven.frohnmeyer-wds.de/artifacts")
|
2022-10-07 19:25:25 +02:00
|
|
|
maven("https://maven.fabricmc.net/")
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compileOnly(gradleApi())
|
|
|
|
implementation("org.apache.ant:ant:${prop("ant_version")}")
|
|
|
|
implementation("io.gitlab.jfronny:commons-gson:${prop("commons_version")}")
|
|
|
|
implementation("org.ow2.asm:asm:${prop("asm_version")}")
|
|
|
|
implementation("org.ow2.asm:asm-commons:${prop("asm_version")}")
|
|
|
|
implementation(project(":libjf-config-core-v1")) { isTransitive = false }
|
|
|
|
}
|
|
|
|
|
|
|
|
gradlePlugin {
|
|
|
|
plugins {
|
|
|
|
create("simplePlugin") {
|
|
|
|
id = "io.gitlab.jfronny.libjf.libjf-config-compiler-plugin"
|
|
|
|
implementationClass = "io.gitlab.jfronny.libjf.config.plugin.ConfigPlugin"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.publish.get().dependsOn(tasks.build.get())
|
|
|
|
rootProject.tasks.deployDebug.dependsOn(tasks.publish.get())
|
|
|
|
|
2022-10-13 19:37:55 +02:00
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
generate(project) {
|
|
|
|
`class`("io.gitlab.jfronny.libjf.config.plugin", "BuildMetadata") {
|
2022-11-25 15:03:24 +01:00
|
|
|
modifiers(PUBLIC)
|
2022-11-25 14:57:40 +01:00
|
|
|
field("IS_RELEASE", project.hasProperty("release"), PUBLIC, STATIC, FINAL)
|
2022-10-13 19:37:55 +02:00
|
|
|
}
|
|
|
|
}
|
2022-10-07 19:25:25 +02:00
|
|
|
}
|
2022-10-13 19:37:55 +02:00
|
|
|
}
|