elect86
(Giuseppe Barbieri)
March 9, 2020, 10:16am
1
As titled, I get tons of this warnings, if I run glm:assemble --warning-mode all
:
Copying or archiving duplicate paths with the default duplicates strategy has been deprecated. This is scheduled to be removed in Gradle 7.0.
project is here
any hints?
I think it is caused by compileKotlin { destinationDir = compileJava.destinationDir }
.
Try removing it and add "--patch-module", "$moduleName=${sourceSets["main"].output.asPath}"
to the compilerArgs
for compileJava
instead.
I haven’t worked with JPMS and Kotlin yet myself, so I am not sure what the “right” way of going about it is.
elect86
(Giuseppe Barbieri)
March 11, 2020, 2:08pm
3
Thanks @Bjorn_Vester , it looks like yours suggestions work fine
elect86
(Giuseppe Barbieri)
March 16, 2020, 9:24am
4
I had to restore destinationDir
, because in a multi-module project it complains as:
module-info.java:2: error: package is empty or does not exist
I fixed it by adding:
jar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE }
Is this fine or considered a trick?
Payero
(Payero)
August 7, 2020, 10:50am
5
Thanks for the suggestion, I added it as well and it works. I would not considered it a “trick”, to me it looks more like forcing Gradle 6.X to start behaving like Gradle 7.X will. If not allowing duplicates causes a problem with a project and is fixed now, then the likelihood you will have a problem in 7.X should be low.