Skip to content

Commit

Permalink
Update release process for sonatype and release v1.12.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Raibaz committed Aug 22, 2022
1 parent 870bd59 commit 4139fa2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
7 changes: 3 additions & 4 deletions MAINTAINING.md
Expand Up @@ -8,15 +8,14 @@
- [ ] make sure all required PRs are merged
- [ ] run test-suite in Gradle
- [ ] run test-suite from Android Studio or IntelliJ from emulator (Android Instrumented tests)
- [ ] release to local maven repo by running `gradle publish` with the `localrepo` gradle property set
- [ ] release to local maven repo by running `gradle publish` with the `localrepo` repository uncommented in `mockk-publishing.gradle.kts`
- [ ] do quick testing with this local maven repo: basics, if documentation is loading, if all dependencies are fine
- [ ] change version to RELEASE version (i.e. remove -SNAPSHOT from version)
- [ ] bump if needed major or minor (resetting everything afterwards)
- [ ] commit it
- [ ] tag it
- [ ] redirect release process to oss.sonatype by removing the `localrepo` property in gradle.properties
- [ ] set `org.gradle.parallel=true` in `gradle.properties`: apparently, sonatype does not like parallel builds
- [ ] release from Gradle with `gradle publish`
- [ ] redirect release process to oss.sonatype by uncommenting the sonatype repository in `mockk-publishing.gradle.kts`
- [ ] release from Gradle with `gradle publish -Dorg.gradle.parallel=false` (apparently, sonatype does not like parallel builds)
- [ ] goto oss.sonatype
- [ ] find io.mockk repo
- [ ] check state of dependencies (are sizes okay), maybe download one
Expand Down
Expand Up @@ -14,9 +14,9 @@ val sonatypeRepositoryCredentials: Provider<Action<PasswordCredentials>> =

val sonatypeRepositoryReleaseUrl: Provider<String> = provider {
if (version.toString().endsWith("SNAPSHOT")) {
"https://s01.oss.sonatype.org/content/repositories/snapshots/"
"https://oss.sonatype.org/content/repositories/snapshots/"
} else {
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
}
}

Expand All @@ -28,6 +28,10 @@ val signingPassword: Provider<String> =
providers.gradleProperty("signing.password")
val signingSecretKeyRingFile: Provider<String> =
providers.gradleProperty("signing.secretKeyRingFile")
val ossrhUsername: Provider<String> =
providers.gradleProperty("ossrhUsername")
val ossrhPassword: Provider<String> =
providers.gradleProperty("ossrhPassword")


tasks.withType<AbstractPublishToMaven>().configureEach {
Expand All @@ -51,6 +55,14 @@ publishing {
maven(rootProject.layout.projectDirectory.dir(localrepo)) {
name = "LocalRepo"
}

/*maven {
url = uri(sonatypeRepositoryReleaseUrl)
credentials {
username = ossrhUsername.get()
password = ossrhPassword.get()
}
}*/
}
publications.withType<MavenPublication>().configureEach {
createMockKPom {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
@@ -1,4 +1,4 @@
version=1.12.6-SNAPSHOT
version=1.12.7-SNAPSHOT
# Enable Gradle build cache https://docs.gradle.org/current/userguide/build_cache.html
org.gradle.caching=true
org.gradle.configureondemand=false
Expand Down

0 comments on commit 4139fa2

Please sign in to comment.