Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Set up Maven publishing #1761

Merged
merged 2 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just double-checking, this line doesn't need project. anymore, even though artifactId does?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure actually. I followed the example here.

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
}
}
}
}
Loading