Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,28 @@ Releasing
1. Click on Tags
2. Find your new tag and select "Create Release" from the context menu.
3. Auto-generate and edit release notes as necessary.
2. `./gradlew clean publish --no-daemon --no-parallel && ./gradlew closeAndReleaseRepository`
2. Publish to Maven Central via Sonatype Central Portal:
```bash
./gradlew clean :plugin:publishToSonatype closeSonatypeStagingRepository --no-daemon --no-parallel
```
This will upload the artifacts to a staging repository and close it for review.

3. Review and release the deployment:
- Go to https://central.sonatype.com/publishing
- Review the staged deployment
- Click "Publish" to release to Maven Central

**Alternative:** To publish automatically without manual review:
```bash
./gradlew clean :plugin:publishToSonatype closeAndReleaseSonatypeStagingRepository --no-daemon --no-parallel
```

**Note:** Publishing requires Central Portal User Tokens in `~/.gradle/gradle.properties`:
```properties
mavenCentralUsername=<your-user-token-username>
mavenCentralPassword=<your-user-token-password>
```
Generate User Tokens at: https://central.sonatype.com/account


## Prepare for Next Release
Expand Down
16 changes: 16 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,28 @@ buildscript {
classpath deps.build.sqlDelightPlugin
classpath deps.build.shadowJar
classpath deps.build.versionsPlugin
classpath deps.build.gradleNexusPublish
}
configurations.all {
exclude group:"com.android.tools.build", module: "transform-api"
}
}

apply plugin: "io.github.gradle-nexus.publish-plugin"

// Configure Nexus publishing for automatic repository closing
nexusPublishing {
packageGroup = "com.uber"
repositories {
sonatype {
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
username.set(providers.gradleProperty('mavenCentralUsername').forUseAtConfigurationTime().orElse(''))
password.set(providers.gradleProperty('mavenCentralPassword').forUseAtConfigurationTime().orElse(''))
}
}
}

allprojects {
task allDeps(type: DependencyReportTask) {}
}
Expand Down
1 change: 1 addition & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ buildscript {
}
dependencies {
classpath deps.build.gradleMavenPublish
classpath deps.build.gradleNexusPublish
classpath deps.build.errorpronePlugin
classpath deps.build.rockerPlugin
}
Expand Down
1 change: 0 additions & 1 deletion buildSrc/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ POM_NAME=okbuck
POM_ARTIFACT_ID=okbuck
POM_PACKAGING=jar

SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true
1 change: 1 addition & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def build = [
androidPluginApi : "com.android.tools.build:gradle-api:${versions.androidPlugin}",
bcprov : "org.bouncycastle:bcprov-jdk15on:1.60",
gradleMavenPublish: "com.vanniktech:gradle-maven-publish-plugin:0.18.0",
gradleNexusPublish: "io.github.gradle-nexus:publish-plugin:1.3.0",
butterKnifePlugin: "com.jakewharton:butterknife-gradle-plugin:${versions.butterKnife}",
commonsCompress : "org.apache.commons:commons-compress:1.18",
commonsIo : "commons-io:commons-io:2.8.0",
Expand Down