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

47 lines
1.4 KiB
Plaintext

import io.gitlab.jfronny.scripts.*
plugins {
id("java-gradle-plugin")
id("jf.maven-publish")
}
group = rootProject.group
version = rootProject.version
repositories {
mavenCentral()
maven {
name = "JF Commons"
url = uri("https://gitlab.com/api/v4/projects/35745143/packages/maven")
}
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())
projectDir.resolve("src/main/java/io/gitlab/jfronny/libjf/config/plugin/BuildMetadata.java").writeText("""
package io.gitlab.jfronny.libjf.config.plugin;
public class BuildMetadata {
public static final boolean isRelease = ${project.hasProperty("release")};
}
""".trimIndent())