diff --git a/README.md b/README.md index 3cf5a57..08ff7eb 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ values and react to their changes in a clean and decoupled way. ## Key Features -- Shared context for storing and retrieving named values -- Publish/subscribe event bus for listening to value changes -- Simple API for easy integration into existing projects -- Enables modular design by decoupling components through events \ No newline at end of file +- Shared context for storing and retrieving named values +- Publish/subscribe event bus for listening to value changes +- Simple API for easy integration into existing projects +- Enables modular design by decoupling components through events diff --git a/build.gradle b/build.gradle index 855a661..ab9959f 100644 --- a/build.gradle +++ b/build.gradle @@ -36,27 +36,31 @@ tasks.named('test') { useJUnitPlatform() } -publishing { - publications { - mavenJava(MavenPublication) { - from components.java - } - } - repositories { - maven { - name = "GiteaMaven" - url = uri("https://gitea.egothor.org/api/packages/Egothor/maven") - - credentials(HttpHeaderCredentials) { - name = "Authorization" - value = "token ${giteaToken}" +if (project.hasProperty('giteaToken') && project.giteaToken) { + publishing { + publications { + mavenJava(MavenPublication) { + from components.java } + } + repositories { + maven { + name = "GiteaMaven" + url = uri("https://gitea.egothor.org/api/packages/Egothor/maven") - authentication { - header(HttpHeaderAuthentication) + credentials(HttpHeaderCredentials) { + name = "Authorization" + value = "token ${giteaToken}" + } + + authentication { + header(HttpHeaderAuthentication) + } } } } +} else { + println "No giteaToken defined - skipping publishing configuration" } gradle.taskGraph.whenReady { taskGraph ->