From 4c480a5be85a4f54aba77e1e0be03c4fd6350d79 Mon Sep 17 00:00:00 2001 From: Jocelyne Date: Thu, 15 Jun 2023 12:39:10 +0200 Subject: [PATCH] chore: Set up Maven publishing --- buildScripts/gradle/publishing.gradle.kts | 24 ++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/buildScripts/gradle/publishing.gradle.kts b/buildScripts/gradle/publishing.gradle.kts index 5013e67558..5894c61a61 100644 --- a/buildScripts/gradle/publishing.gradle.kts +++ b/buildScripts/gradle/publishing.gradle.kts @@ -4,20 +4,30 @@ apply(plugin = "java-library") apply(plugin = "maven-publish") apply(plugin = "signing") -_java { - withJavadocJar() - withSourcesJar() -} - _publishing { publications { - create("ExposedJars") { + create("exposed") { + groupId = "org.jetbrains.exposed" artifactId = project.name - from(project.components["java"]) + version = "0.41.1" + from(components["java"]) pom { configureMavenCentralMetadata(project) } signPublicationIfKeyPresent(project) } } + + val publishingUser: String? = System.getenv("PUBLISHING_USER") + val publishingPassword: String? = System.getenv("PUBLISHING_PASSWORD") + + repositories { + maven { + url = uri("https://maven.pkg.jetbrains.space/public/p/exposed/release") + credentials { + username = publishingUser + password = publishingPassword + } + } + } }