LibJF/libjf-config-compiler-plugin-v2/build.gradle.kts

54 lines
1.6 KiB
Plaintext
Raw Normal View History

import io.gitlab.jfronny.scripts.*
import javax.lang.model.element.Modifier.*
plugins {
`java-library`
id("jf.maven-publish")
id("jf.codegen")
}
group = rootProject.group
version = rootProject.version
repositories {
mavenCentral()
maven("https://maven.frohnmeyer-wds.de/artifacts")
maven("https://maven.fabricmc.net/")
}
dependencies {
implementation("io.gitlab.jfronny.gson:gson-compile-processor-core:${prop("gson_compile_version")}")
2022-12-29 13:18:59 +01:00
implementation(devProject(":libjf-config-core-v1"))
2023-06-09 15:04:53 +02:00
implementation("org.jetbrains:annotations:${prop("annotations_version")}")
implementation("io.gitlab.jfronny:commons:${prop("commons_version")}")
implementation("io.gitlab.jfronny:commons-gson:${prop("commons_version")}")
2023-06-09 15:04:53 +02:00
implementation("com.squareup:javapoet:${prop("javapoet_version")}")
testAnnotationProcessor(sourceSets.main.get().output)
configurations.testAnnotationProcessor.get().extendsFrom(configurations.implementation.get())
}
tasks.publish.get().dependsOn(tasks.build.get())
rootProject.tasks.deployDebug.dependsOn(tasks.publish.get())
sourceSets {
main {
generate(project) {
`class`("io.gitlab.jfronny.libjf.config.plugin", "BuildMetadata") {
modifiers(PUBLIC)
field("IS_RELEASE", project.hasProperty("release"), PUBLIC, STATIC, FINAL)
}
}
}
}
tasks.named<JavaCompile>("compileTestJava") {
options.compilerArgs.add("-AmodId=example-mod")
2022-12-14 20:12:54 +01:00
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
}
}
}