From 48ac5591028046d7084165145a669303760f4e80 Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Wed, 4 Jun 2025 22:32:20 +1000 Subject: [PATCH 1/7] Prepare 0.12.0 version --- CHANGELOG.md | 6 +++++- pom.xml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd1b3ca..1b7aa5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [0.12.0] - 2025-06-04 +### Added +- Include OSGi metadata in jar +### Changed - Require at least Java 11 ## [0.11.0] - 2023-02-27 @@ -84,6 +87,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Initial release! +[0.12.0]: https://github.com/robinst/autolink-java/compare/autolink-0.11.0...autolink-0.12.0 [0.11.0]: https://github.com/robinst/autolink-java/compare/autolink-0.10.1...autolink-0.11.0 [0.10.1]: https://github.com/robinst/autolink-java/compare/autolink-0.10.0...autolink-0.10.1 [0.10.0]: https://github.com/robinst/autolink-java/compare/autolink-0.9.0...autolink-0.10.0 diff --git a/pom.xml b/pom.xml index b149f91..95c8892 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.nibor.autolink autolink - 0.11.1-SNAPSHOT + 0.12.0-SNAPSHOT autolink-java From d88fdc91c5c9c2a80d189599f7b9bc389d0f68a3 Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Wed, 4 Jun 2025 22:34:16 +1000 Subject: [PATCH 2/7] Migrate from OSSRH to Central Publisher Portal See announcement: https://central.sonatype.org/news/20250326_ossrh_sunset/ Followed the guide here, we'll see if it works: https://central.sonatype.org/publish/publish-portal-maven/ --- .github/workflows/release.yml | 15 ++++++++------- pom.xml | 21 +++++++-------------- 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 642589c..1943866 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,16 +14,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Maven Central repository - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '11' distribution: 'temurin' - server-id: ossrh - server-username: MAVEN_USERNAME # env variable to use for username in release - server-password: MAVEN_PASSWORD # env variable to use for password in release + # See https://central.sonatype.org/publish/publish-portal-maven/ + server-id: central + server-username: CENTRAL_USERNAME # env variable to use for username in release + server-password: CENTRAL_PASSWORD # env variable to use for password in release gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable to use for passphrase in release @@ -37,6 +38,6 @@ jobs: mvn -B -Dpassword=${{ secrets.GITHUB_TOKEN }} release:prepare mvn -B release:perform env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} diff --git a/pom.xml b/pom.xml index 95c8892..e8a04a4 100644 --- a/pom.xml +++ b/pom.xml @@ -119,16 +119,16 @@ + - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 + org.sonatype.central + central-publishing-maven-plugin + 0.7.0 true - ossrh - https://oss.sonatype.org/ - true - 10 + central + true + published @@ -239,13 +239,6 @@ - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - Robin Stocker From 8b07a6911fd62871042c5b63412d3ac3489a0531 Mon Sep 17 00:00:00 2001 From: "Robin Stocker (GitHub Actions)" Date: Wed, 4 Jun 2025 23:37:03 +0000 Subject: [PATCH 3/7] [maven-release-plugin] prepare release autolink-0.12.0 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e8a04a4..8b5fd18 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.nibor.autolink autolink - 0.12.0-SNAPSHOT + 0.12.0 autolink-java @@ -257,7 +257,7 @@ scm:git:git@github.com:robinst/autolink-java.git scm:git:https://github.com/robinst/autolink-java.git https://github.com/robinst/autolink-java - HEAD + autolink-0.12.0 From 275d37b26aeb3ad093c7525d04dc1a2bce464cbb Mon Sep 17 00:00:00 2001 From: "Robin Stocker (GitHub Actions)" Date: Wed, 4 Jun 2025 23:37:04 +0000 Subject: [PATCH 4/7] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 8b5fd18..ddf6190 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.nibor.autolink autolink - 0.12.0 + 0.12.1-SNAPSHOT autolink-java @@ -257,7 +257,7 @@ scm:git:git@github.com:robinst/autolink-java.git scm:git:https://github.com/robinst/autolink-java.git https://github.com/robinst/autolink-java - autolink-0.12.0 + HEAD From e56e5375d6237ff8f88f46dd54411d32ee75b086 Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Thu, 5 Jun 2025 09:53:32 +1000 Subject: [PATCH 5/7] README: Bump version --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 28083da..8f58e1d 100644 --- a/README.md +++ b/README.md @@ -37,14 +37,14 @@ This library is supported on Java 11 or later. It works on Android Maven coordinates (see -[here](https://central.sonatype.com/artifact/org.nibor.autolink/autolink/0.11.0/overview) +[here](https://central.sonatype.com/artifact/org.nibor.autolink/autolink/0.12.0/overview) for other build systems): ```xml org.nibor.autolink autolink - 0.11.0 + 0.12.0 ``` From 9f14723422f001e141d24fbf6a6dccdf4524727b Mon Sep 17 00:00:00 2001 From: Alex Soto Date: Thu, 5 Jun 2025 13:14:37 +0200 Subject: [PATCH 6/7] Overload the linkTypes method to add the var-args approach --- src/main/java/org/nibor/autolink/LinkExtractor.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/org/nibor/autolink/LinkExtractor.java b/src/main/java/org/nibor/autolink/LinkExtractor.java index 8229571..4de9745 100644 --- a/src/main/java/org/nibor/autolink/LinkExtractor.java +++ b/src/main/java/org/nibor/autolink/LinkExtractor.java @@ -90,6 +90,17 @@ public static class Builder { private Builder() { } + /** + * @param linkTypes the link types that should be extracted (by default, all types are extracted) + * @return this builder + */ + public Builder linkTypes(LinkType...linkTypes) { + if (linkTypes == null) { + throw new NullPointerException("linkTypes must not be null"); + } + return this.linkTypes(Set.of(linkTypes)); + } + /** * @param linkTypes the link types that should be extracted (by default, all types are extracted) * @return this builder From 5da00fbf7a9125c53c2bc97243cece5047db83ad Mon Sep 17 00:00:00 2001 From: Alex Soto Date: Sat, 7 Jun 2025 09:46:59 +0200 Subject: [PATCH 7/7] Fix Format --- src/main/java/org/nibor/autolink/LinkExtractor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/nibor/autolink/LinkExtractor.java b/src/main/java/org/nibor/autolink/LinkExtractor.java index 4de9745..0312eec 100644 --- a/src/main/java/org/nibor/autolink/LinkExtractor.java +++ b/src/main/java/org/nibor/autolink/LinkExtractor.java @@ -94,7 +94,7 @@ private Builder() { * @param linkTypes the link types that should be extracted (by default, all types are extracted) * @return this builder */ - public Builder linkTypes(LinkType...linkTypes) { + public Builder linkTypes(LinkType... linkTypes) { if (linkTypes == null) { throw new NullPointerException("linkTypes must not be null"); }