Use correct configuration for Skaffold dependencies#2188
Use correct configuration for Skaffold dependencies#2188chanseokoh merged 1 commit intoGoogleContainerTools:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
|
@googlebot I signed it! |
This comment has been minimized.
This comment has been minimized.
chanseokoh
left a comment
There was a problem hiding this comment.
Awesome! Very cool to see you dug into this far.
| currentProject.getConfigurations().getByName("runtime").getHierarchy()) { | ||
| currentProject | ||
| .getConfigurations() | ||
| .getByName(JavaPlugin.RUNTIME_CLASSPATH_CONFIGURATION_NAME) |
There was a problem hiding this comment.
@lightoze in this class, there's another use of getByName("runtime") for SNAPSHOT, non-project dependencies. Does it need to be changed as well?
for (File file : project.getConfigurations().getByName("runtime")) {
if (!projectDependencyJars.contains(file) && file.toString().contains("SNAPSHOT")) {And you said this is broken with Gradle 5. After changing this, will it continue to work with Gradle 4.9? (Gradle 4.9 is the minimum version Jib supports/requires.)
@loosebazooka looks like the value is now changed to "runtimeClasspath" from "runtime." Does this make sense?
There was a problem hiding this comment.
@chanseokoh probably that should be changed too, but it does not affect the project I have on hands so I have nothing to test on. As such "runtime" is deprecated and should be used if only for compatibility.
Gradle 4 should continue to work but I haven't tested.
There was a problem hiding this comment.
Yeah I think with 2.0 we plan on going to minimum of gradle 5 anyway: #2140
There was a problem hiding this comment.
Also, yeah I agree we should use runtimeClasspath everywhere...
There was a problem hiding this comment.
@chanseokoh @loosebazooka OK changed that too and reworked patch into a single commit.
chanseokoh
left a comment
There was a problem hiding this comment.
Great! Thanks for fixing this.
|
I'll temporarily override the kokoro-macos failure (due to #2189) and merge this. |
Because configurations were changed in Gradle 5, existing implementation fails to detect dependencies between project modules.