Skip to content

Commit

Permalink
Pre-Release 0.16 (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
TWiStErRob committed Mar 12, 2023
1 parent 1556676 commit 9bb759f
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 36 deletions.
6 changes: 3 additions & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
"enabled": false
},
{
"description": "Disable updating Quality plugin in example projects, they're part of the release process.",
"description": "Disable updating plugins in example projects, they're part of the release process.",
"matchPackageNames": [
"net.twisterrob.quality",
"net.twisterrob.gradle.plugin.quality"
"net.twisterrob.gradle.plugin.quality",
"net.twisterrob.gradle.plugin.settings"
],
"matchPaths": [
"docs/examples/release/**",
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/local/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("com.android.application") version "7.4.2"
id("net.twisterrob.gradle.plugin.quality") version "0.15.1-SNAPSHOT"
id("net.twisterrob.gradle.plugin.quality") version "0.16-SNAPSHOT"
}

android {
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/local/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ pluginManagement {
mavenLocal()
}
filter {
includeGroupByRegex("""^net\.twisterrob\.gradle\.plugin\..*$""")
includeGroupByRegex("""^net\.twisterrob\.gradle\.plugin\.[^.]+$""")
includeGroupByRegex("""^net\.twisterrob\.gradle$""")
}
}
}
}

plugins {
id("net.twisterrob.gradle.plugin.settings") version "0.15.1-SNAPSHOT"
id("net.twisterrob.gradle.plugin.settings") version "0.16-SNAPSHOT"
}

if (!JavaVersion.current().isJava11Compatible) {
Expand Down
4 changes: 1 addition & 3 deletions docs/examples/release/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
plugins {
id("com.android.application") version "7.4.2"
// TODEL resolutionStrategy in settings.gradle.kts after changing to release 0.15.1
// TODO change plugin name after changing to release 0.15.1
id("net.twisterrob.quality") version "0.15"
id("net.twisterrob.gradle.plugin.quality") version "0.15.1"
}

android {
Expand Down
14 changes: 1 addition & 13 deletions docs/examples/release/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,10 @@ pluginManagement {
}
}
}
resolutionStrategy {
eachPlugin {
when (requested.id.id) {
"com.android.application" ->
useModule("com.android.tools.build:gradle:${requested.version}")
"net.twisterrob.quality" ->
useModule("net.twisterrob.gradle:twister-quality:${requested.version}")
"net.twisterrob.settings" ->
useModule("net.twisterrob.gradle:twister-convention-settings:${requested.version}")
}
}
}
}

plugins {
id("net.twisterrob.settings") version "0.15"
id("net.twisterrob.gradle.plugin.settings") version "0.15.1"
}

if (!JavaVersion.current().isJava11Compatible) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/snapshot/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("com.android.application") version "7.4.2"
id("net.twisterrob.gradle.plugin.quality") version "0.15.1-SNAPSHOT"
id("net.twisterrob.gradle.plugin.quality") version "0.16-SNAPSHOT"
}

android {
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/snapshot/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ pluginManagement {
}
}
filter {
includeGroupByRegex("""^net\.twisterrob\.gradle\.plugin\..*$""")
includeGroupByRegex("""^net\.twisterrob\.gradle\.plugin\.[^.]+$""")
includeGroupByRegex("""^net\.twisterrob\.gradle$""")
}
}
}
}

plugins {
id("net.twisterrob.gradle.plugin.settings") version "0.15.1-SNAPSHOT"
id("net.twisterrob.gradle.plugin.settings") version "0.16-SNAPSHOT"
}

if (!JavaVersion.current().isJava11Compatible) {
Expand Down
18 changes: 9 additions & 9 deletions docs/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ For the full process see [.github/release.md](https://github.com/TWiStErRob/.git

1. Make sure local copy is on latest `master`
`git fetch -p & git checkout master & git reset --hard origin/master`
1. `git add gradle.properties README.md & git commit -m "Release x.y"`
* `gradle.properties`: remove `-SNAPSHOT` suffix
Double-check that version is `x.y`
* `README.md`: review compatibility table
* Label the PR `a:feature`, `in:meta`.
1. Upload
* Set up credentials
* `sonatypeUsername` is the account name of https://s01.oss.sonatype.org/
Expand All @@ -30,7 +30,7 @@ For the full process see [.github/release.md](https://github.com/TWiStErRob/.git
* > Failed to load staging profiles, server at https://s01.oss.sonatype.org/service/local/ responded with status code 401, body:
Means the username or password is wrong.
* Open [Sonatype Nexus Repository Manager](https://s01.oss.sonatype.org/#stagingRepositories), log in and close staging repository output at console to validate.
* Open [Sonatype Nexus Repository Manager](https://s01.oss.sonatype.org/#stagingRepositories), log in and **close staging repository**; check output at console to validate.
1. Archive and final integration test.
* Run `p:\repos\release\net.twisterrob.gradle\download-repo.bat`
Need to change mvn2get.json's `remote_repo_urls`.
Expand All @@ -45,23 +45,23 @@ For the full process see [.github/release.md](https://github.com/TWiStErRob/.git
}
filter {
includeVersionByRegex("""^net\.twisterrob\.gradle$""", ".*", "^${Regex.escape("x.y")}$")
includeVersionByRegex("""^net\.twisterrob\.gradle\.plugin\.[^.]+$""", ".*", "^${Regex.escape("x.y")}$")
}
}
}
```
1. Repeat previous steps as necessary.
1. `git push origin master:master` to get the "Release x.y" commit published.
1. Merge the PR to `master`.
1. Release staging repository at [Sonatype Nexus Repository Manager](https://s01.oss.sonatype.org/#stagingRepositories)
1. Watch [Maven Central](https://repo1.maven.org/maven2/net/twisterrob/gradle/twister-quality/) for the artifact to appear. May take a few minutes.

## Prepare next release `x.z`

1. `git add gradle.properties docs/examples/*/build.gradle.kts & git commit -m "Pre-Release x.z"`
1. Create a PR titled "Pre-Release x.z" to `master` with the following changes:
* `gradle.properties`: version number `x.z-SNAPSHOT`
* `docs/examples/local/build.gradle.kts`: plugin version `x.z-SNAPSHOT`
* `docs/examples/snapshot/build.gradle.kts`: plugin version `x.z-SNAPSHOT`
* `docs/examples/release/build.gradle.kts`: plugin version `x.y`
1. Push commit to `origin/master`.
* `docs/examples/local/build.gradle.kts` + `settings.gradle.kts`: plugin version `x.z-SNAPSHOT`
* `docs/examples/snapshot/build.gradle.kts` + `settings.gradle.kts`: plugin version `x.z-SNAPSHOT`
* `docs/examples/release/build.gradle.kts` + `settings.gradle.kts`: plugin version `x.y`
* Label the PR `a:feature`, `in:meta`.
1. [Create milestone](https://github.com/TWiStErRob/net.twisterrob.gradle/milestones/new) `vx.z`, if doesn't exist yet.

[1]: https://github.com/TWiStErRob/.github/blob/main/RELEASE.md#release-process
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ org.gradle.jvmargs=-Dfile.encoding=UTF-8 -Xmx2G -Dorg.gradle.deprecation.trace=t
# REPORT Kotlin 1.6.21 eagerly puts itself on the classpath, even though the apiVersion is set.
kotlin.stdlib.default.dependency=false

projectVersion=0.15.1
projectVersion=0.16-SNAPSHOT

# Default test substitutions
net.twisterrob.test.android.compileSdkVersion=android-30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private fun MavenPublication.setupPublication(project: Project) {
setupLinks(project)
reorderNodes(project)
}

private fun MavenPublication.fixMarkers(project: Project) {
project.gradlePlugin.plugins.forEach { plugin ->
// Needs to be eager getByName rather than named because we're already inside a named block at call-site.
Expand Down

0 comments on commit 9bb759f

Please sign in to comment.