Skip to content

Commit

Permalink
Merge remote-tracking branch 'robert3005/rk/upgradle' into callumr/gr…
Browse files Browse the repository at this point in the history
…adle-8
  • Loading branch information
CRogers committed Jun 27, 2023
2 parents 471dbe8 + a86541a commit 80d5e6a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 33 deletions.
5 changes: 5 additions & 0 deletions changelog/@unreleased/pr-1060.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: improvement
improvement:
description: Add gradle 8 compatibility
links:
- https://github.com/palantir/gradle-consistent-versions/pull/1060
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,6 @@ private void recursivelyCopyProjectDependenciesWithScope(
copiedConf.getAttributes().attribute(Usage.USAGE_ATTRIBUTE, internalUsage);
// Must set this because we depend on this configuration when resolving unifiedClasspath.
copiedConf.setCanBeConsumed(true);
// But this should never be resolved! (it will most likely fail to given the usage above)
copiedConf.setCanBeResolved(false);
// Since we only depend on these from the same project (via CONSISTENT_VERSIONS_PRODUCTION or
// CONSISTENT_VERSIONS_TEST), we shouldn't allow them to be visible outside this project.
copiedConf.setVisible(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,34 +115,6 @@ class ConsistentVersionsPluginIntegrationSpec extends IntegrationSpec {
gradleVersionNumber << GRADLE_VERSIONS
}

// TODO(dsanduleac): should remove this since this functionality doesn't fully work anyway, and we are
// actively encouraging people to stop resolving the deprecated configurations `compile` and `runtime`.
def '#gradleVersionNumber: can resolve all configurations like compile with version coming only from versions props'() {
setup:
gradleVersion = gradleVersionNumber

file('versions.props') << """
org.slf4j:slf4j-api = 1.7.22
""".stripIndent()

buildFile << """
apply plugin: 'java'
dependencies {
implementation "org.slf4j:slf4j-api"
}
""".stripIndent()

when:
runTasks('--write-locks')

then:
// Ensures that configurations like 'compile' are resolved and their dependencies have versions
runTasks('--warning-mode=none', 'resolveConfigurations')

where:
gradleVersionNumber << GRADLE_VERSIONS
}

def "#gradleVersionNumber: locks are consistent whether or not we do --write-locks for glob-forced direct dependency"() {
setup:
gradleVersion = gradleVersionNumber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@

package com.palantir.gradle.versions;

import com.google.common.collect.ImmutableList;
import java.util.List;

public final class GradleTestVersions {
private GradleTestVersions() {}

public static final List<String> GRADLE_VERSIONS =
ImmutableList.of(VersionsLockPlugin.MINIMUM_GRADLE_VERSION.getVersion(), "6.9", "7.1.1");
List.of(VersionsLockPlugin.MINIMUM_GRADLE_VERSION.getVersion(), "6.9", "7.1.1", "8.1.1");
}

0 comments on commit 80d5e6a

Please sign in to comment.