-
Notifications
You must be signed in to change notification settings - Fork 17
Skip extendsFrom(rootConfiguration) for consumable-only configurations
#1614
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
Changes from 5 commits
cc969f1
1c78358
3ab332b
c285c10
162bdfd
8d8148c
b8e9799
8daecce
567d839
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ | |
| import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty; | ||
| import com.palantir.gradle.testing.execution.GradleInvoker; | ||
| import com.palantir.gradle.testing.execution.InvocationResult; | ||
| import com.palantir.gradle.testing.junit.AdditionallyRunWithGradle; | ||
| import com.palantir.gradle.testing.junit.DisabledConfigurationCache; | ||
| import com.palantir.gradle.testing.junit.GradlePluginTests; | ||
| import com.palantir.gradle.testing.maven.MavenArtifact; | ||
|
|
@@ -83,7 +84,7 @@ void setup(MavenRepo repo, RootProject rootProject) { | |
|
|
||
| allprojects { | ||
| repositories { | ||
| maven { url "file:///%s" } | ||
| maven { url uri("%s") } | ||
|
||
| } | ||
| } | ||
|
|
||
|
|
@@ -298,6 +299,30 @@ void creates_rootconfiguration_even_if_versions_props_file_missing(GradleInvoker | |
| gradle.withArgs().buildsSuccessfully(); | ||
| } | ||
|
|
||
| @Test | ||
| @AdditionallyRunWithGradle("9.4.0") | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when all the tests are moved over we can start testing everything on 9.4.0 |
||
| void consumable_only_configuration_on_root_project_does_not_cause_variant_model_cycle( | ||
| GradleInvoker gradle, RootProject rootProject) { | ||
| rootProject.propertiesFile("versions.props").setProperty("org.slf4j:*", "1.7.24"); | ||
|
|
||
| rootProject.buildGradle().plugins().add("java"); | ||
|
|
||
| rootProject.buildGradle().append(""" | ||
| configurations.consumable('customOutgoing') { | ||
| attributes { | ||
| attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage, 'custom-usage')) | ||
| } | ||
| outgoing.artifacts(provider { | ||
| configurations.compileClasspath.incoming.artifactView { | ||
| attributes { attribute(Attribute.of('artifactType', String), 'jar') } | ||
| }.files.files | ||
| }) | ||
| } | ||
| """); | ||
|
|
||
| gradle.withArgs("resolveConfigurations").buildsSuccessfully(); | ||
| } | ||
|
|
||
| @Test | ||
| void build_succeeds_without_versions_props_or_versions_lock(GradleInvoker gradle, SubProject foo) { | ||
| foo.buildGradle().plugins().add("java"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not a worthwhile change, please undo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have undone - but now require
@SuppressWarnings("checkstyle:CyclomaticComplexity")I assume thats okay?