./gradlew clean buildThat's it! This builds everything, runs all tests, and verifies quality.
# Install to ~/.m2/repository for local projects to use
./gradlew publishToMavenLocal
# Use in other projects:
# dependencies { implementation("io.github.yourusername:jvm-functional-utils:1.0.0-SNAPSHOT") }-
Sonatype Account: Create JIRA ticket at https://issues.sonatype.org/
- Request namespace:
io.github.YOUR-GITHUB-USERNAME - Wait for approval (~2 business days)
- Request namespace:
-
GPG Keys: Sign artifacts
gpg --gen-key gpg --keyserver keyserver.ubuntu.com --send-keys YOUR-KEY-ID gpg --export-secret-keys YOUR-KEY-ID | base64 > private-key.txt
-
GitHub Secrets: Add to repo Settings → Secrets → Actions
OSSRH_USERNAME- Your Sonatype JIRA usernameOSSRH_PASSWORD- Your Sonatype JIRA passwordSIGNING_KEY_ID- Your GPG key ID (last 8 chars)SIGNING_KEY- Contents of private-key.txtSIGNING_PASSWORD- Your GPG key passphrase
-
Update version in
lib/build.gradle.kts:version = "1.0.0" // Remove -SNAPSHOT
-
Create release tag:
git add lib/build.gradle.kts git commit -m "Release 1.0.0" git tag -a v1.0.0 -m "Release version 1.0.0" git push origin main git push origin v1.0.0
-
GitHub Actions publishes automatically!
- Builds all platforms
- Runs tests
- Publishes to Maven Central staging
-
Release the staged artifacts:
- Login: https://s01.oss.sonatype.org/
- Find your staging repository
- Click "Close" (validates artifacts - takes 5 min)
- Click "Release" (publishes to Maven Central)
- Wait ~2 hours for sync to https://search.maven.org/
# 1. Make your code changes
vim lib/src/commonMain/kotlin/io/github/functional/IO.kt
# 2. Build and test
./gradlew clean build
# 3. Check results
echo "✅ All tests passed if you see BUILD SUCCESSFUL"
# 4. View coverage report (optional)
open lib/build/reports/kover/html/index.html| What | Command |
|---|---|
| Build everything | ./gradlew clean build |
| Run tests only | ./gradlew test |
| Install locally | ./gradlew publishToMavenLocal |
| Check coverage | ./gradlew koverHtmlReport |
| Quality checks | ./run-quality-checks.sh |
# 1. Build it
./gradlew clean build
# 2. Install to local Maven repo
./gradlew publishToMavenLocal
# 3. Use it in another project
# In your other project's build.gradle.kts:
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation("io.github.yourusername:jvm-functional-utils-jvm:1.0.0-SNAPSHOT")
}- Full build guide: BUILDING.md
- Publishing guide: PUBLISHING.md
- Contributing: CONTRIBUTING.md
To develop:
./gradlew clean buildTo test locally:
./gradlew publishToMavenLocalTo publish publicly:
- Set up Sonatype account (one-time, 2 days)
- Create git tag
- GitHub Actions does the rest