intellij-platform-gradle-plugin icon indicating copy to clipboard operation
intellij-platform-gradle-plugin copied to clipboard

Bug: prepareSandbox - file is renamed if another file somewhere else in the file-tree has the same name

Open SeeSharpSoft opened this issue 4 years ago • 1 comments

Since #497 was resolved in 0.7.3, all duplicate file names - independent of their target directory! - are renamed to ${originalName}_${++index}.${originalExtension}. The renaming on the flattened file-hierarchy is AFAIK not necessary and causes issues.

Example: Lets say there are some additional files in my project...

<root>
- gradle
- src
- additionalFiles  <-- just a "resource" directory
  - A.jpg
  - subDirectory
    - A.jpg
build.gradle
...

...to be added as dependency...

dependencies {
    implementation files('additionalFiles')
}

...then the prepareSandbox result looks like this

- lib
  - A.jpg
  - subDirectory
    - A_1.jpg

  <actual_build_artifacts>

... but should look like this:

- lib
  - A.jpg
  - subDirectory
    - A.jpg

  <actual_build_artifacts>

This behavior was introduced in 5721b713b47cea864fff6e9e41c22b0ce40847ff (and therefore works as expected in 0.7.2).

SeeSharpSoft avatar Aug 03 '21 12:08 SeeSharpSoft

Is there a workaround? :-)

bugwelle avatar Jan 23 '23 16:01 bugwelle