$ brew install saket/repo/startship $ $ cd ~/path/to/your/library/project $ startship release && say "released"
startship makes the process of releasing JVM libraries a bit easier by automating usage of Sonatype Nexus so that you don't have to constantly refresh your browser after every operation to check if has gone through yet.
startship will read your library's maven coordinates from
gradle.properties, find your staged repository, request it to be closed, wait till it's closed, promote it to release, and finally wait till it's synced to maven central. It also tries to be helpful by making sure you don't release an incorrect artifact by comparing maven coordinates and versions.
Maven coordinates for your artifacts are read from your project's
GROUP=com.example POM_ARTIFACT_ID=nicolascage VERSION_NAME=4.2.0
Alternatively, you can provide them using
# Single artifact $ startship release -c com.example:nicolascage:4.2.0 # Multiple artifacts $ startship release -c com.example:nicolascage,dianekruger:4.2.0
Sonatype account credentials are read from your machine's
You can also provide these using
-p options. The values passed can be either Gradle property keys or your actual username or password values.
$ startship release -u yourActualUsername -p YOUR_PASSWORD_GRADLE_PROPERTY
Contributing and running locally
Sonatype's endpoints are badly documented and can be really flaky at times, causing
startship to fail. If you run into issues, please consider sending a PR. For your local development,
startship can be modified to run in mock mode:
// AppModule.kt val nexus = RealNexus( - api = nexusModule.nexusApi, + api = MockNexusApi(pom = ...), debugMode = debugMode, - config = NexusConfig.DEFAULT, + config = MOCK_NEXUS_CONFIG, scheduler = Schedulers.single() )
./run release -c com.example:nicolascage:4.2.0
- Draft a changelog.
./gradlew clean distZipand attach
build/distributions/startship.zipto a new GitHub release.
- Update the homebrew formula with a link to the uploaded
sha256checksum of the archive can be created by running
sha256sumon the command line.
Copyright 2020 Saket Narayan. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.