alexvasilkov / GradleGitDependenciesPlugin

Gradle plugin to add external git repos as project dependencies
Apache License 2.0
105 stars 15 forks source link

Setting custom dir downloads to user home folder #33

Open tonisives opened 1 year ago

tonisives commented 1 year ago

If I set a custom dir in settings.gradle

git {
    dir './gradle-libs' // or just 'gradle-libs'
}

The build fails with: Creating directories for /Users/me/.gradle/daemon/7.4.2/./gradle-libs/kafka-internal-schemas/.git failed or Creating directories for /Users/me/.gradle/daemon/7.4.2/gradle-libs/kafka-internal-schemas/.git failed

Solution:

git {
    dir "${System.getProperty("user.dir")}/gradle-libs"
}
alexvasilkov commented 1 year ago

Thanks for report, it is strange that dir 'gradle-libs' ends up under .gradle directory. I need to check what's going on.

I think it is a good idea to use absolute path anyway, you can also use "$rootDir/..." for paths relative to the project's root.