I ran into similar problem, and solve it in the following way
Keep in mind that I am very new to Gradle so not sure if what I am doing is
a "right way".
//in order to calculate dir location properly from children
def lib = rootProject.getProjectDir().getCanonicalPath() +'/lib'
repositories {
flatDir name: 'localRepository', dirs: lib
}
HTH, Alexi
Trond Andersen wrote:
>
> I have a single WAR-project which builds without any problems. Creates a
> WAR
> file without any issues, but now I'm trying to move to a multiproject
> build
> because I have a separate jar file which is going to be included into the
> WAR file.
>
> First issue I ran into was this:
>
> flatDir (name: 'localLibrary', dirs: 'library')
>
> When I run the project with a multiproject build, this results in an error
> because now the project is no longer able to find the directory named
> library. I could fix this by adding the project name/directory into the
> flatDir, but I ran into other issues also.
>
> My goal is that I would like to run gradle from within the project itself
> doing regular tasks such as unit tests etc, but at the same time I would
> like to be able to run from the parent project which packages everything
> together. This doesn't seem applicable with the way I've set up the
> multiproject build. Is this intended? If not - how can ensure that paths
> are
> working also in a multiproject build.
>
> Here's my parent project build.gradle file:
>
> dependsOnChildren()
>
> subprojects {
> usePlugin 'java'
> group = 'mygroup'
> version = '0.1'
> sourceCompatibility = 1.6
> targetCompatibility = 1.6
> manifest.mainAttributes(
> 'Implementation-Title': 'Project',
> 'Implementation-Version': version,
> 'Implementation-Vendor': 'ACME AS'
> )
> }
>
> project(':WebAppProj') {
> dependencies {
> compile project(':AppletProj')
> }
> }
>
> My settings.gradle:
>
> include 'AppletProj', 'WebAppProj'
>
>
> Any pointers on how to resolve this issue would be appreciated.
>
>
> ------- Trond
>
>
--
View this message in context:
http://www.nabble.com/Moving-to-multiproject-result-in-path-issues-tp24145810p24197287.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email