From c27d4c64504c1b2f1d1b3132b938658b57a0b91a Mon Sep 17 00:00:00 2001 From: Timo Ley Date: Tue, 22 Oct 2024 19:57:16 +0200 Subject: [PATCH] chore: make publishable --- build.gradle | 20 ++++++++++++++++++- settings.gradle | 2 +- .../gradlehaxe/compile/CompileHaxeTask.java | 3 +++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index c43211f..46f2c69 100644 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,7 @@ pluginBundle { gradlePlugin { plugins { gradlehaxe { - id = "net.anvilcraft.gradlehaxe" + id = "haxe" displayName = "GradleHaxe" description = "Haxe compatiblity for Gradle" implementationClass = "net.anvilcraft.gradlehaxe.BuilderPlugin" @@ -52,3 +52,21 @@ gradlePlugin { } } +publishing { + tasks.publish.dependsOn 'build' + + repositories { + if (project.hasProperty('mvnURL')) { + maven { + credentials { + username findProperty("mvnUsername") + password findProperty("mvnPassword") + } + url = findProperty("mvnURL") + } + } + else { + mavenLocal() + } + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index aa7646b..7bbeb59 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,2 @@ -rootProject.name = 'modpackbuilder' +rootProject.name = 'gradlehaxe' diff --git a/src/main/java/net/anvilcraft/gradlehaxe/compile/CompileHaxeTask.java b/src/main/java/net/anvilcraft/gradlehaxe/compile/CompileHaxeTask.java index 7596eab..ac02c31 100644 --- a/src/main/java/net/anvilcraft/gradlehaxe/compile/CompileHaxeTask.java +++ b/src/main/java/net/anvilcraft/gradlehaxe/compile/CompileHaxeTask.java @@ -8,6 +8,7 @@ import java.util.jar.JarFile; import org.apache.commons.io.FileUtils; import org.gradle.api.provider.Property; +import org.gradle.api.tasks.Internal; import org.gradle.api.tasks.SourceSet; import org.gradle.api.tasks.TaskAction; import org.gradle.api.tasks.compile.AbstractCompile; @@ -73,8 +74,10 @@ public abstract class CompileHaxeTask extends AbstractCompile { } } + @Internal public abstract Property getSS(); + @Internal public CompileOptions getOptions() { return this.options; }