refreshVersions icon indicating copy to clipboard operation
refreshVersions copied to clipboard

extraArtifactVersionKeyRules not working with sub directory in Windows

Open jschneider opened this issue 3 years ago • 4 comments

Configuring "extraArtifactVersionKeyRules" with a file in a sub directory:

extraArtifactVersionKeyRules(file("gradle/refreshVersions-extra-rules.txt"))

This works just fine using Ubuntu. But when running in Windows, the extra rules are not evaluated (for me).

file("gradle/refreshVersions-extra-rules.txt").exists returns true - on Windows.

Workaround

Moving the "refreshVersions-extra-rules.txt" file to the project root directory, solved the issue for me.

jschneider avatar Jul 08 '21 07:07 jschneider

Did you test in command line?

LouisCAD avatar Jul 08 '21 08:07 LouisCAD

@jschneider I'm still waiting for your reply.

LouisCAD avatar Dec 18 '21 23:12 LouisCAD

I am quite sure I build it using the command line ("cmd") on Windows. I am using the workaround - therefore I have no idea if this is still an issue today.

jschneider avatar Dec 20 '21 07:12 jschneider

I've come across a variation of this which also appears to not work on Windows. The kmdc project uses a rules file (see sandbox folder) with the content ../versions.rules. On windows when building this produces the error:

Every artifact version key rule is made of two lines, but an odd count of rules lines has been found.

But when building within the Windows Subsystem for Linux the error does not occur.

Edit: Please ignore this. The issue was that Git on Windows handles symlinks by silently creating new placeholder files (and doesn't provide any warnings it is doing so).

gsteckman avatar Jan 09 '22 04:01 gsteckman