diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 782e377d58..783f58b9af 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -207,7 +207,7 @@ If it doesn't work, you can check the JitPack log at `https://jitpack.io/com/git ### Maven -Run `./gradlew publishToMavenLocal` to publish this to your local repository. The maven plugin is not published to JitPack due to [jitpack/jitpack.io#4112](https://github.com/jitpack/jitpack.io/issues/4112). +Run `./gradlew publishToMavenLocal` to publish this to your local repository. You can also use the JitPack artifacts, using the same principles as Gradle above. ## License diff --git a/gradle/java-publish.gradle b/gradle/java-publish.gradle index 7d2055d78d..7583bbe344 100644 --- a/gradle/java-publish.gradle +++ b/gradle/java-publish.gradle @@ -170,7 +170,11 @@ model { } } -if (!version.endsWith('-SNAPSHOT')) { +if (System.env['JITPACK'] == 'true') { + signing { + setRequired(false) + } +} else if (!version.endsWith('-SNAPSHOT')) { signing { String gpg_key = decode64('ORG_GRADLE_PROJECT_gpg_key64') useInMemoryPgpKeys(gpg_key, System.env['ORG_GRADLE_PROJECT_gpg_passphrase']) diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000000..adb3fe10c8 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +jdk: + - openjdk11 diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index c9e0f420a5..0029814ae9 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -5,6 +5,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ## [Unreleased] ### Added * A synthesis log with the number of considered files is added after each formatter execution ([#1507](https://github.com/diffplug/spotless/pull/1507)) +* Any commit of the Spotless maven plugin now available via JitPack ([#1547](https://github.com/diffplug/spotless/pull/1547)) ## [2.31.0] - 2023-01-26 ### Added diff --git a/settings.gradle b/settings.gradle index ac0e81a61b..9573775884 100644 --- a/settings.gradle +++ b/settings.gradle @@ -91,7 +91,7 @@ def getStartProperty(java.lang.String name) { } -if (System.getenv('SPOTLESS_EXCLUDE_MAVEN') != 'true' && getStartProperty('SPOTLESS_EXCLUDE_MAVEN') != 'true' && System.getenv('JITPACK') != 'true') { +if (System.getenv('SPOTLESS_EXCLUDE_MAVEN') != 'true' && getStartProperty('SPOTLESS_EXCLUDE_MAVEN') != 'true') { include 'plugin-maven' // maven-specific glue code }