Skip to content

Commit

Permalink
Merge pull request #502 from diffplug/feat/fix-jitpack
Browse files Browse the repository at this point in the history
Add an environment variable to exclude maven from the build.
  • Loading branch information
nedtwigg authored Jan 1, 2020
2 parents 402be65 + c112bcd commit 20e7a7c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ You might be looking for:

* 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))
* Also fixed a minor problem in TestProvisioner.
* 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))
* We have set this in JitPack, as a workaround for [jitpack/jitpack.io#4112](https://github.com/jitpack/jitpack.io/issues/4112)

### 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)))

Expand Down
11 changes: 7 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ If you get something running, we'd love to host your plugin within this repo as

## Integration testing

### Locally
### Gradle - locally

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+).

Expand All @@ -141,9 +141,9 @@ pluginManagement {
}
```

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

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.
In Gradle 6.0+, you can use the following snippet in your `settings.gradle`.

```gradle
pluginManagement {
Expand All @@ -165,6 +165,9 @@ pluginManagement {
}
}
```
### 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).

## License

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

```
Copyright 2016 DiffPlug
Copyright 2020 DiffPlug
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 5 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ include 'testlib' // library for sharing test infrastructure between the project

include 'lib-extra' // reusable library with lots of dependencies
include 'plugin-gradle' // gradle-specific glue code
include 'plugin-maven' // maven-specific glue code

// excludes maven from JitCI builds,
if (System.getenv('SPOTLESS_EXCLUDE_MAVEN') != 'true' && System.getenv('JITPACK') != 'true') {
include 'plugin-maven' // maven-specific glue code
}

0 comments on commit 20e7a7c

Please sign in to comment.