If Gradle is installed, then gradle command will suffice, otherwise ./gradlew
Increment version according to Semantic Versioning (should automate this)
Increment those modules you plan to release:
PUBLISH_VERSION = '0.0.1'Run publish task from command line to pick up environment variables(IDE will not automatically pick up env vars):
gradle publishThe following environment variables need to be defined
OSSRH_USERNAME
OSSRH_PASSWORD
SONATYPE_STAGING_PROFILE_ID
SIGNING_KEY_ID
SIGNING_PASSWORD
SIGNING_KEY
Can run with IntelliJ because no environment variables are needed.
gradle publishToMavenLocal
// or individual
gradle keyboard:publishToMavenLocalEdit repository list to include mavenLocal, e.g. in settings.gradle:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
mavenLocal() // <-- Add this line
}
}