diff --git a/core/build.gradle.kts b/core/build.gradle.kts index b10fb09..16585c4 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -2,10 +2,12 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent +import java.net.URI plugins { id("com.github.johnrengelman.shadow") version "8.1.1" `java-library` + `maven-publish` } repositories { @@ -66,4 +68,32 @@ tasks.withType().configureEach { javaLauncher.set(project.javaToolchains.launcherFor(java.toolchain)) } -dependencies {} \ No newline at end of file +dependencies {} + +publishing { + publications { + create("mavenJava") { + groupId = "app.photofox.vipsffm" + artifactId = "vips-ffm-core" + version = System.getenv("GITHUB_VERSION") + + from(components["java"]) + + pom { + name.set("vips-ffm-core") + description.set("libvips bindings for JVM projects, using JDK 22's FFM and Class-File APIs, for performant, safe, and ergonomic image manipulation") + url.set("https://github.com/lopcode/vips-ffm") + } + } + } + repositories { + maven { + name = "GitHubPackages" + url = URI.create("https://maven.pkg.github.com/lopcode/vips-ffm") + credentials { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } +} \ No newline at end of file