Skip to content
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

extraArtifactVersionKeyRules not working with sub directory in Windows #385

Open
jschneider opened this issue Jul 8, 2021 · 4 comments
Open
Labels

Comments

@jschneider
Copy link

jschneider commented Jul 8, 2021

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.

@LouisCAD
Copy link
Member

LouisCAD commented Jul 8, 2021

Did you test in command line?

@LouisCAD
Copy link
Member

@jschneider I'm still waiting for your reply.

@jschneider
Copy link
Author

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.

@gsteckman
Copy link

gsteckman commented Jan 9, 2022

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants