| File | Date | Author | Commit |
|---|---|---|---|
| central | 5 days ago |
|
[f3c084] :memo: v2.0.2 rebuild |
| gradle | 5 days ago |
|
[f3c084] :memo: v2.0.2 rebuild |
| sample | 2025-09-28 |
|
[3c6e79] :memo: v1.2.9 - update dependencies. |
| .gitignore | 2024-06-27 |
|
[9486c6] v1.2.5 |
| LICENSE | 2024-06-27 |
|
[9486c6] v1.2.5 |
| README.md | 5 days ago |
|
[b28f86] :memo: v2.0.2 rebuild |
| build.gradle.kts | 2024-06-27 |
|
[9486c6] v1.2.5 |
| gradle.properties | 2025-10-10 |
|
[b2c0de] :memo: v1.2.11 - Update dependencies and fix so... |
| icon.png | 2025-02-02 |
|
[7aad02] :memo: v1.2.7 - add icon |
| settings.gradle.kts | 2025-10-10 |
|
[b2c0de] :memo: v1.2.11 - Update dependencies and fix so... |
The plugin implements sonatype's Central Publisher API (part of).
It will call maven-publish to generate artifacts and publish them to sonatype's central portal.
Note: This is a third party plugin.
Apply this plugin in gradle:
plugins {
id("cn.lalaki.central") version "2.0.2"
}
Add configuration:
val localMavenRepo = uri("path/of/local_repo") // The path is recommended to be set to an empty directory
centralPortalPlus {
url = localMavenRepo
// Configure user token.
username = "..."
password = "..."
// or load from xml file
tokenXml = uri("D:\\user_token.xml")
publishingType = PublishingType.USER_MANAGED // or PublishingType.AUTOMATIC
}
( About "user_token.xml", save it to a file. )
Configure maven-publish as before, doc: Maven Publish Plugin, or see: sample/build.gradle.kts
publishing {
repositories {
maven {
url = localMavenRepo // Specify the same local repo path in the configuration.
}
}
// ...
}
You are now ready to start the task of publishing to the Central Portal.
# windows
.\gradlew publishToCentralPortal
# other
./gradlew publishToCentralPortal
If you need to check the status of the deployment. (If no parameter is provided, the default value will be the last deployment Id)
.\gradlew dumpDeployment -PutId="deployment Id"
If you want to remove the deployment. (If no parameter is provided, the default value will be the last deployment Id)
.\gradlew deleteDeployment -PutId="deployment Id"
Note: deployments that have been successfully published cannot be deleted.
If you need to get the deployment Id, visit: Maven Central: Publishing.