Skip to content

Commit

Permalink
chore: Set up Maven publishing (#1761)
Browse files Browse the repository at this point in the history
* chore: Set up Maven publishing

* chore: Remove nexusPublishing
  • Loading branch information
joc-a committed Jun 21, 2023
1 parent 8ddf444 commit a154fcc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
10 changes: 0 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ subprojects {
}
}

nexusPublishing {
repositories {
sonatype {
username.set(System.getenv("exposed.sonatype.user"))
password.set(System.getenv("exposed.sonatype.password"))
useStaging.set(true)
}
}
}

repositories {
mavenLocal()
mavenCentral()
Expand Down
22 changes: 20 additions & 2 deletions buildScripts/gradle/publishing.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,33 @@ _java {
withSourcesJar()
}

val version: String by rootProject

_publishing {
publications {
create<MavenPublication>("ExposedJars") {
create<MavenPublication>("exposed") {
groupId = "org.jetbrains.exposed"
artifactId = project.name
from(project.components["java"])
version = version
from(components["java"])
pom {
configureMavenCentralMetadata(project)
}
signPublicationIfKeyPresent(project)
}
}

val publishingUsername: String? = System.getenv("PUBLISHING_USERNAME")
val publishingPassword: String? = System.getenv("PUBLISHING_PASSWORD")

repositories {
maven {
name = "Exposed"
url = uri("https://maven.pkg.jetbrains.space/public/p/exposed/release")
credentials {
username = publishingUsername
password = publishingPassword
}
}
}
}

0 comments on commit a154fcc

Please sign in to comment.