I'm migrating from Ant/Ivy to Gradle, and am trying to understand how you specify a relative path to the local Ivy repo. Standalone Ivy sets the variable ${ivy.default.ivy.user.dir}
by default to .ivy2
in the user home directory, and places the local repo there.
I can simulate this as follows:
repositories {
ivy {
url "C:/Users/RYAN/.ivy2/local"
layout 'pattern', {
artifact "[organisation]/[module]/[revision]/[artifact](-[classifier])-[revision](.[ext])"
ivy "[organisation]/[module]/[revision]/[artifact](-[classifier])-[revision](.[ext])"
}
}
But I don't want to specify an absolute path. I see there's a GRADLE_USER_HOME environment variable, but Gradle doesn't set it by default--I have to specify it command line.
Does Gradle provide a way to access a default local Ivy repo?
How about using:
url "${System.properties['user.home']}/.ivy2/local"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With