From 5e5152c6baf08d2d40794558c7592b6ca8746f34 Mon Sep 17 00:00:00 2001 From: Callum Rogers Date: Thu, 25 Mar 2021 17:56:13 +0000 Subject: [PATCH] Remove usages of dependencyRecommendations (#5340) * Remove usages of dependencyRecommendations * Add trial publish --- .circleci/config.yml | 18 ++++++++++++++++++ build.gradle | 7 ------- gradle/publish-jars.gradle | 6 +++--- gradle/qos.gradle | 3 --- 4 files changed, 21 insertions(+), 13 deletions(-) delete mode 100644 gradle/qos.gradle diff --git a/.circleci/config.yml b/.circleci/config.yml index 095151058f7..bfa9e5f7008 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -84,6 +84,19 @@ jobs: root: . paths: [ . ] + trial-publish: + docker: + - image: circleci/openjdk:8u212-jdk-stretch-node + resource_class: xlarge + environment: + GRADLE_OPTS: -Dorg.gradle.console=plain -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false + _JAVA_OPTIONS: "-Xmx4g -XX:+HeapDumpOnOutOfMemoryError -verbose:gc -XX:+PrintGC -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:-TraceClassUnloading -Xloggc:build-%t-%p.gc.log" + CIRCLE_TEST_REPORTS: /tmp/test-reports + CIRCLE_ARTIFACTS: /tmp/artifacts + steps: + - attach_workspace: { at: . } + - run: ./gradlew --profile --stacktrace --continue publishToMavenLocal + deploy: docker: - image: circleci/openjdk:8u212-jdk-stretch-node @@ -128,6 +141,11 @@ workflows: filters: tags: only: /.*/ + - trial-publish: + requires: [build] + filters: + branches: + ignore: [develop] - deploy: requires: [build, test] filters: diff --git a/build.gradle b/build.gradle index 278d4c5afcc..30e898c8783 100644 --- a/build.gradle +++ b/build.gradle @@ -73,13 +73,6 @@ allprojects { } configurations.all { - - resolutionStrategy.eachDependency { details -> - if (details.requested.group == 'com.palantir.docker.compose' && details.requested.name == 'docker-compose-rule') { - details.useTarget group: 'com.palantir.docker.compose', name: 'docker-compose-rule-junit4', version: dependencyRecommendations.getRecommendedVersion('com.palantir.docker.compose', 'docker-compose-rule-junit4') - } - } - resolutionStrategy.eachDependency { details -> if (details.requested.group == 'io.dropwizard.metrics' && details.requested.name != 'metrics-jmx') { details.useVersion '3.2.6' diff --git a/gradle/publish-jars.gradle b/gradle/publish-jars.gradle index 3cedfcfdf07..c81c5fd1387 100644 --- a/gradle/publish-jars.gradle +++ b/gradle/publish-jars.gradle @@ -37,7 +37,7 @@ private void replaceShadedDependencies(MavenPublication mavenPublication) { addNodesForShadowDependenciesNotInCompileConfiguration( newDependencyRoot, shadowDependencies, - dependencyRecommendations) + project) asNode().getByName('dependencies')[0].replaceNode(newDependencyRoot) } @@ -75,14 +75,14 @@ private static String getOnlyValue(List nodeList) { private static void addNodesForShadowDependenciesNotInCompileConfiguration( Node dependencyRoot, Set remainingDeps, - recommender) { + project) { remainingDeps.forEach { dependencyTuple -> Node newDependency = dependencyRoot.appendNode('dependency') newDependency.appendNode('groupId', dependencyTuple[0]) newDependency.appendNode('artifactId', dependencyTuple[1]) newDependency.appendNode('scope', 'runtime') - def version = recommender.getRecommendedVersion(dependency.getGroup(), dependency.getName()) + def version = getVersion("${dependency.getGroup()}:${dependency.getName()}") newDependency.appendNode('version', version) } } diff --git a/gradle/qos.gradle b/gradle/qos.gradle deleted file mode 100644 index ed27de977e7..00000000000 --- a/gradle/qos.gradle +++ /dev/null @@ -1,3 +0,0 @@ -dependencyRecommendations { - propertiesFile file: project.rootProject.file('qos.props') -}