From 0f76d80ffacc16be94d6b2c6b9e3a81f0497a3ec Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Thu, 23 Jan 2020 14:26:47 +0000 Subject: [PATCH 1/4] Break: delete configuration-resolver --- README.md | 28 ++++------------------------ gradle-baseline-java/build.gradle | 1 - versions.lock | 1 - 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index d97c6c3f7..407342831 100644 --- a/README.md +++ b/README.md @@ -271,32 +271,12 @@ configurations.all { ``` ## com.palantir.baseline-circleci -Automatically applies the following plugins: +The plugin surfaces failures using JUnit XML which is rendered nicely by CircleCI, by -- [`com.palantir.configuration-resolver`](https://github.com/palantir/gradle-configuration-resolver-plugin) - this adds a `./gradlew resolveConfigurations` task which is useful for caching on CI. - -Also, the plugin: - -1. stores junit test reports in `$CIRCLE_TEST_REPORTS/junit` -2. Converts java compilation errors and checkstyle errors into test failures stored under `$CIRCLE_TEST_REPORTS/javac` and `$CIRCLE_TEST_REPORTS/checkstyle` respectively +1. Storing JUnit test reports in `$CIRCLE_TEST_REPORTS/junit` +2. Converting java compilation errors and checkstyle errors into test failures stored under `$CIRCLE_TEST_REPORTS/javac` and `$CIRCLE_TEST_REPORTS/checkstyle` respectively ![CHECKSTYLE — 1 FAILURE](images/checkstyle-circle-failure.png?raw=true "CircleCI failure image") -3. stores the HTML output of tests in `$CIRCLE_ARTIFACTS/junit` - - -### Troubleshooting - -If you declare a force in `versions.props` that you don't depend on, but query in your repo, such as: -```groovy -dependencyRecommendations.getRecommendedVersion('group', 'name') -``` - -Then `checkNoUnusedPin` will fail because it can't determine where the version is used. To work around this, you can -put the version at the end of the file after a `# linter:OFF` line, e.g.: - -```properties -# linter:OFF -group:name = 1.0.0 -``` +3. Storeing the HTML output of tests in `$CIRCLE_ARTIFACTS/junit` ## com.palantir.baseline-format diff --git a/gradle-baseline-java/build.gradle b/gradle-baseline-java/build.gradle index 57adf65fd..dfb741977 100644 --- a/gradle-baseline-java/build.gradle +++ b/gradle-baseline-java/build.gradle @@ -11,7 +11,6 @@ dependencies { compile 'com.diffplug.spotless:spotless-plugin-gradle' compile 'com.google.errorprone:error_prone_refaster' compile 'com.google.guava:guava' - compile 'com.palantir.configurationresolver:gradle-configuration-resolver-plugin' compile 'net.ltgt.gradle:gradle-errorprone-plugin' compile 'org.apache.maven.shared:maven-dependency-analyzer' compile 'org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11' diff --git a/versions.lock b/versions.lock index a526833f1..6ccb76d69 100644 --- a/versions.lock +++ b/versions.lock @@ -38,7 +38,6 @@ com.googlecode.java-diff-utils:diffutils:1.3.0 (2 constraints: 3a1dc41d) com.googlecode.javaewah:JavaEWAH:1.1.6 (1 constraints: 480e7e50) com.jcraft:jsch:0.1.55 (1 constraints: 7b0ef35e) com.jcraft:jzlib:1.1.1 (1 constraints: 430e7950) -com.palantir.configurationresolver:gradle-configuration-resolver-plugin:0.4.0 (1 constraints: 0605f735) com.palantir.javaformat:gradle-palantir-java-format:0.3.9 (1 constraints: 0e05fd35) com.palantir.javaformat:palantir-java-format-spi:0.3.9 (1 constraints: 7b156abe) com.palantir.safe-logging:preconditions:1.13.0 (3 constraints: ce234679) From d7392c31782dfe7a0850d0b324ee510dce6bd364 Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Thu, 23 Jan 2020 14:30:30 +0000 Subject: [PATCH 2/4] Fix tests --- .../com/palantir/baseline/plugins/BaselineCircleCi.java | 4 ---- .../baseline/BaselineCircleCiIntegrationTest.groovy | 9 --------- 2 files changed, 13 deletions(-) diff --git a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineCircleCi.java b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineCircleCi.java index 40b9e231a..ea3f5f326 100644 --- a/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineCircleCi.java +++ b/gradle-baseline-java/src/main/groovy/com/palantir/baseline/plugins/BaselineCircleCi.java @@ -18,7 +18,6 @@ import com.google.common.base.Preconditions; import com.google.common.base.Splitter; -import com.palantir.configurationresolver.ConfigurationResolverPlugin; import com.palantir.gradle.junit.JunitReportsExtension; import com.palantir.gradle.junit.JunitReportsPlugin; import java.io.File; @@ -42,9 +41,6 @@ public final class BaselineCircleCi implements Plugin { public void apply(Project project) { project.getPluginManager().apply(JunitReportsPlugin.class); - // the `./gradlew resolveConfigurations` task is used on CI to download all jars for convenient caching - project.getRootProject().allprojects(p -> p.getPluginManager().apply(ConfigurationResolverPlugin.class)); - configurePluginsForReports(project); configurePluginsForArtifacts(project); diff --git a/gradle-baseline-java/src/test/groovy/com/palantir/baseline/BaselineCircleCiIntegrationTest.groovy b/gradle-baseline-java/src/test/groovy/com/palantir/baseline/BaselineCircleCiIntegrationTest.groovy index 7093f239d..e38f47d52 100644 --- a/gradle-baseline-java/src/test/groovy/com/palantir/baseline/BaselineCircleCiIntegrationTest.groovy +++ b/gradle-baseline-java/src/test/groovy/com/palantir/baseline/BaselineCircleCiIntegrationTest.groovy @@ -51,15 +51,6 @@ class BaselineCircleCiIntegrationTest extends AbstractPluginTest { new File(System.getenv('CIRCLE_ARTIFACTS')).toPath().deleteDir() } - def 'applies the configuration resolver plugin'() { - when: - buildFile << standardBuildFile - - then: - BuildResult result = with('resolveConfigurations').build() - result.task(':resolveConfigurations').outcome == TaskOutcome.SUCCESS - } - def 'collects html reports'() { when: buildFile << standardBuildFile From ed4fae9f530fbfbf92850600dc12da4a0f713ebf Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Thu, 23 Jan 2020 14:36:01 +0000 Subject: [PATCH 3/4] uuugh --- versions.props | 1 - 1 file changed, 1 deletion(-) diff --git a/versions.props b/versions.props index 7bea0cabe..95e55801e 100644 --- a/versions.props +++ b/versions.props @@ -5,7 +5,6 @@ com.google.errorprone:error_prone_core = 2.3.4 com.google.errorprone:error_prone_refaster = 2.3.4 com.google.errorprone:error_prone_test_helpers = 2.3.4 com.google.guava:guava = 27.1-jre -com.palantir.configurationresolver:gradle-configuration-resolver-plugin = 0.4.0 com.palantir.safe-logging:* = 1.13.0 org.apache.maven.shared:maven-dependency-analyzer = 1.11.1 org.github.ngbinh.scalastyle:gradle-scalastyle-plugin_2.11 = 1.0.1 From 1f683f9dc0ea0cc4d9d9f552c2eaa6df5cc72d91 Mon Sep 17 00:00:00 2001 From: Dan Fox Date: Thu, 23 Jan 2020 15:06:55 +0000 Subject: [PATCH 4/4] manual changelog --- .../@unreleased/no-more-configuration-resolver.v2.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 changelog/@unreleased/no-more-configuration-resolver.v2.yml diff --git a/changelog/@unreleased/no-more-configuration-resolver.v2.yml b/changelog/@unreleased/no-more-configuration-resolver.v2.yml new file mode 100644 index 000000000..8d93c81bc --- /dev/null +++ b/changelog/@unreleased/no-more-configuration-resolver.v2.yml @@ -0,0 +1,7 @@ +type: break +break: + description: |+ + baseline-circleci no longer applies the (deprecated) configuration resolver plugin which provided the `./gradlew resolveConfigurations` task. We no longer run this on CI, but if you want to keep using it, feel free to depend on the plugin directly. + + links: + - https://github.com/palantir/gradle-baseline/pull/1184