n0mer / gradle-git-properties

Gradle plugin for `git.properties` file generation
https://plugins.gradle.org/plugin/com.gorylenko.gradle-git-properties
Apache License 2.0
321 stars 54 forks source link

fix: make the unit tests work under Windows #210

Open Fiouz opened 2 years ago

Fiouz commented 2 years ago

Windows uses the \ backslash character as the directory separator, which interferes with the standard Groovy escaping.

tha2015 commented 2 years ago

How about using / as the separator? It should work with both Windows and *nix

Fiouz commented 2 years ago

PR modified to adopt a safer and more generic approach; instead, we use a system property to pass a JSON-encapsulated value around (we rely on Groovy JsonOutput/JsonSlurper):