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:
gradle publish
The 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 lib:publishToMavenLocal
Edit 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
}
}