Open jutoft opened 2 years ago
Hi @jutoft, thanks for raising this issue. It does look like a valid approach, we'll consider this as a feature request and discuss about it. For now, the workaround you can set your eyes on is configuring jib.extraDirectories to copy additional output directory generated.
Yes thank you.
I have added the directory using extraDirectories as a workaround. The build dependency is uphold as the folder does get the right dependency "hooks".
So yes this is a feature request :)
Thanks, will look into this!
Environment:
Description of the issue: A gradle sourceSet has a common output as sourceSets.main.output When an additional output directory is registered to the main source set then it should be part of the created image.
Expected behavior: the contents of $buildDir/generated/extraResources/ to be added to the jib image.
Steps to reproduce:
Log output:
Additional Information:
The issue seems to be the code here: https://github.com/GoogleContainerTools/jib/blob/86a3c855cb302da7671356dad7d2559fe3f138f5/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/GradleProjectProperties.java#L223
// current code
// perhaps better approach
mainSourceSet.getOutput() is a fileCollection by itself so the split is only relevant to get the two separate directories classes and resources in the image.