-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
New JavaLayerConfiguration API for more flexibility #1049
Conversation
jib-core/src/main/java/com/google/cloud/tools/jib/frontend/JavaDockerContextGenerator.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/frontend/JavaLayerConfigurations.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/frontend/JavaLayerConfigurations.java
Outdated
Show resolved
Hide resolved
jib-core/src/main/java/com/google/cloud/tools/jib/frontend/JavaLayerConfigurations.java
Outdated
Show resolved
Hide resolved
* sourceFile} | ||
* @return this | ||
*/ | ||
public Builder addDependencyFileRecursive(Path sourceFile, AbsoluteUnixPath pathInContainer) { |
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.
Is it okay if all files are added recursively? (aka are the non-rescursive add...File
methods necessary?)
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.
I tried to be in line with LayerConfiguration
having both recursive and non-recursive methods, but now I think it is possible to cover all cases only with recursive adds. Then perhaps I can rename add...FileRecursive()
to just add...File
.
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.
Sounds good!
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.
Now I remember. The non-recursive case is useful when the caller is walking a directory, enumerating all files and directories and adding each path.
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.
LGTM I think we should add a CHANGELOG note that the Docker context layout has changed.
Added CHANGELOG entries. |
Fixes #1007.
See if this sounds reasonable.
I will see if I can further simplify
GradleLayerConfigurations
andMavenLayerConfigurations
with the new API.