Skip to content

Commit 20e7a7c

Browse files
authored
Merge pull request #502 from diffplug/feat/fix-jitpack
Add an environment variable to exclude maven from the build.
2 parents 402be65 + c112bcd commit 20e7a7c

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ You might be looking for:
99

1010
* Ignored `KtLintStepTest`, because [gradle/gradle#11752](https://github.com/gradle/gradle/issues/11752) is causing too many CI failures. ([#499](https://github.com/diffplug/spotless/pull/499))
1111
* Also fixed a minor problem in TestProvisioner.
12+
* If you set the environment variable `SPOTLESS_EXCLUDE_MAVEN=true` then the maven plugin will be excluded from the build. ([#502](https://github.com/diffplug/spotless/pull/502))
13+
* We have set this in JitPack, as a workaround for [jitpack/jitpack.io#4112](https://github.com/jitpack/jitpack.io/issues/4112)
1214

1315
### Version 1.26.1 - November 27th 2019 (javadoc [lib](https://diffplug.github.io/spotless/javadoc/spotless-lib/1.26.0/) [lib-extra](https://diffplug.github.io/spotless/javadoc/spotless-lib-extra/1.26.0/), artifact [lib]([jcenter](https://bintray.com/diffplug/opensource/spotless-lib), [lib-extra]([jcenter](https://bintray.com/diffplug/opensource/spotless-lib-extra)))
1416

CONTRIBUTING.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ If you get something running, we'd love to host your plugin within this repo as
117117

118118
## Integration testing
119119

120-
### Locally
120+
### Gradle - locally
121121

122122
First, run `./gradlew publishToMavenLocal` in your local checkout of Spotless. Now, in any other project on your machine, you can use the following snippet in your `settings.gradle` (for Gradle 6.0+).
123123

@@ -141,9 +141,9 @@ pluginManagement {
141141
}
142142
```
143143

144-
### Any commit in a public GitHub repo (this one, or any fork)
144+
### Gradle - any commit in a public GitHub repo (this one, or any fork)
145145

146-
In Gradle 6.0+, you can use the following snippet in your `settings.gradle`. TODO: broken until [jitpack/jitpack.io#4112](https://github.com/jitpack/jitpack.io/issues/4112) is resolved.
146+
In Gradle 6.0+, you can use the following snippet in your `settings.gradle`.
147147

148148
```gradle
149149
pluginManagement {
@@ -165,6 +165,9 @@ pluginManagement {
165165
}
166166
}
167167
```
168+
### Maven
169+
170+
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).
168171

169172
## License
170173

@@ -173,7 +176,7 @@ By contributing your code, you agree to license your contribution under the term
173176
All files are released with the Apache 2.0 license as such:
174177

175178
```
176-
Copyright 2016 DiffPlug
179+
Copyright 2020 DiffPlug
177180
178181
Licensed under the Apache License, Version 2.0 (the "License");
179182
you may not use this file except in compliance with the License.

settings.gradle

+5-1
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ include 'testlib' // library for sharing test infrastructure between the project
3434

3535
include 'lib-extra' // reusable library with lots of dependencies
3636
include 'plugin-gradle' // gradle-specific glue code
37-
include 'plugin-maven' // maven-specific glue code
37+
38+
// excludes maven from JitCI builds,
39+
if (System.getenv('SPOTLESS_EXCLUDE_MAVEN') != 'true' && System.getenv('JITPACK') != 'true') {
40+
include 'plugin-maven' // maven-specific glue code
41+
}

0 commit comments

Comments
 (0)