Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an environment variable to exclude maven from the build. #502

Merged
merged 9 commits into from Jan 1, 2020
2 changes: 2 additions & 0 deletions CHANGES.md
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
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
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
}