Skip to content

Commit 51ee9d4

Browse files
authored
Fix JitPack (#1547)
2 parents b290d8c + e3f1ca4 commit 51ee9d4

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ If it doesn't work, you can check the JitPack log at `https://jitpack.io/com/git
207207

208208
### Maven
209209

210-
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).
210+
Run `./gradlew publishToMavenLocal` to publish this to your local repository. You can also use the JitPack artifacts, using the same principles as Gradle above.
211211

212212
## License
213213

gradle/java-publish.gradle

+5-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ model {
170170
}
171171
}
172172

173-
if (!version.endsWith('-SNAPSHOT')) {
173+
if (System.env['JITPACK'] == 'true') {
174+
signing {
175+
setRequired(false)
176+
}
177+
} else if (!version.endsWith('-SNAPSHOT')) {
174178
signing {
175179
String gpg_key = decode64('ORG_GRADLE_PROJECT_gpg_key64')
176180
useInMemoryPgpKeys(gpg_key, System.env['ORG_GRADLE_PROJECT_gpg_passphrase'])

jitpack.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jdk:
2+
- openjdk11

plugin-maven/CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
55
## [Unreleased]
66
### Added
77
* A synthesis log with the number of considered files is added after each formatter execution ([#1507](https://github.com/diffplug/spotless/pull/1507))
8+
* Any commit of the Spotless maven plugin now available via JitPack ([#1547](https://github.com/diffplug/spotless/pull/1547))
89

910
## [2.31.0] - 2023-01-26
1011
### Added

settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def getStartProperty(java.lang.String name) {
9191

9292
}
9393

94-
if (System.getenv('SPOTLESS_EXCLUDE_MAVEN') != 'true' && getStartProperty('SPOTLESS_EXCLUDE_MAVEN') != 'true' && System.getenv('JITPACK') != 'true') {
94+
if (System.getenv('SPOTLESS_EXCLUDE_MAVEN') != 'true' && getStartProperty('SPOTLESS_EXCLUDE_MAVEN') != 'true') {
9595
include 'plugin-maven' // maven-specific glue code
9696
}
9797

0 commit comments

Comments
 (0)