what is the root of the path in gradle when using

2019-08-10 07:20发布

问题:

I am using configuration injection for gradle and have something like this

subprojects {

    dependencies {
        compile fileTree(dir: 'play-1.2.4/framework/lib', include: '*.jar')
        compile fileTree(dir: 'webserver/play-1.2.4/framework', include: '*.jar')
    }
}

My directory structure is

project
  subproject1
  subrpoject2

I run the command

gradle subproject1:dependencies and it is EMPTY :( :(

soooo, what should the relative file paths be so that this works????

thanks, Dean

回答1:

Currently, the dependencies task only shows repository dependencies. You can print the files that a configuration gets resolved to with:

task log << { configurations.compile.each { println it } }



回答2:

Also, it turns out that the confgiuration injection, the paths are relative to the subproject so maybe ../ would be needed in some cases I guess.



标签: gradle