From 91f6da88a00d77eb5d4c4119b5e49cc088200b83 Mon Sep 17 00:00:00 2001 From: Zoe Maas Date: Thu, 25 Jul 2024 15:29:30 +0200 Subject: [PATCH] chore: Added nexus configuration --- modules/openapi/build.gradle.kts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/openapi/build.gradle.kts b/modules/openapi/build.gradle.kts index 7d913327..64c3fc69 100644 --- a/modules/openapi/build.gradle.kts +++ b/modules/openapi/build.gradle.kts @@ -24,6 +24,10 @@ repositories { kotlin { tasks { + named("build") { + finalizedBy("publish") + } + // Temporary fix for this issue: https://github.com/OpenAPITools/openapi-generator/issues/17658 register("fixOpenApiGeneratorIssue") { from( @@ -161,4 +165,16 @@ publishing { from(components["kotlin"]) } } + repositories { + maven { + name = "sphereon-opensource-snapshots" + val snapshotsUrl = "https://nexus.sphereon.com/content/groups/sphereon-opensource-snapshots" + val releasesUrl = "https://nexus.sphereon.com/content/groups/sphereon-opensource-releases" + url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsUrl else releasesUrl) + credentials { + username = System.getenv("NEXUS_USERNAME") + password = System.getenv("NEXUS_PASSWORD") + } + } + } }