Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-Release 0.16 #428

Merged
merged 7 commits into from
Mar 12, 2023
Merged
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
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