Skip to content

Instantly share code, notes, and snippets.

@KwabenBerko
Last active April 10, 2024 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KwabenBerko/9c059e394a1687e884611a2fe170a880 to your computer and use it in GitHub Desktop.
Save KwabenBerko/9c059e394a1687e884611a2fe170a880 to your computer and use it in GitHub Desktop.
math-lib sonatype central gradle file
mavenPublishing {
// Define coordinates for the published artifact
coordinates(
groupId = "<YOUR_SONATYPE_CENTRAL_NAMESPACE>",
artifactId = "math-lib",
version = "1.0.0"
)
// Configure POM metadata for the published artifact
pom {
name.set("Math KMP Library")
description.set("Sample Kotlin MultiPlatform Library Test")
inceptionYear.set("2024")
url.set("https://github.com/<GITHUB_USER_NAME>/MathLibGuide")
licenses {
license {
name.set("MIT")
url.set("https://opensource.org/licenses/MIT")
}
}
// Specify developers information
developers {
developer {
id.set("<GITHUB_USER_NAME>")
name.set("<GITHUB_ACTUAL_NAME>")
email.set("<GITHUB_EMAIL_ADDRESS>")
}
}
// Specify SCM information
scm {
url.set("https://github.com/<GITHUB_USER_NAME>/MathLibGuide")
}
}
// Configure publishing to Maven Central
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
// Enable GPG signing for all publications
signAllPublications()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment