richardm
2010-11-03 11:52:57 UTC
I have a multi-project build with a flat layout as follows:
- main-build
build.gradle
settings.gradle
- ProjA
- ProjA1
- ProjA2
- ProjB
ProjA contains 2 other projects. Their is a single build file in the
main-build project. My sub-projects ProjA1 and ProjA2 aren't inheriting any
properties from ProjA. The example below shows a simple property being set
in ProjA. If I try to output this in ProjA1 I get an error 'Could not find
property 'propATest' on project ':projA/projA1''
I've tried setting the path with project(':projA:projA1') rather than
project(':projA/projA1'), but this doesn't work 'Project with path
':projA:projA1' could not be found in root project 'main-build'.
settings.gradle
includeFlat 'projA', 'projB', 'projA/projA1', 'projA/projA2'
build.gradle
apply plugin: 'java'
dependsOnChildren()
subprojects {
apply plugin: 'java'
}
project(':projA') {
propATest = "propATest"
println "projA Test = $propATest"
}
project(':projA/projA1') {
println "projA1 Test = $propATest"
}
- main-build
build.gradle
settings.gradle
- ProjA
- ProjA1
- ProjA2
- ProjB
ProjA contains 2 other projects. Their is a single build file in the
main-build project. My sub-projects ProjA1 and ProjA2 aren't inheriting any
properties from ProjA. The example below shows a simple property being set
in ProjA. If I try to output this in ProjA1 I get an error 'Could not find
property 'propATest' on project ':projA/projA1''
I've tried setting the path with project(':projA:projA1') rather than
project(':projA/projA1'), but this doesn't work 'Project with path
':projA:projA1' could not be found in root project 'main-build'.
settings.gradle
includeFlat 'projA', 'projB', 'projA/projA1', 'projA/projA2'
build.gradle
apply plugin: 'java'
dependsOnChildren()
subprojects {
apply plugin: 'java'
}
project(':projA') {
propATest = "propATest"
println "projA Test = $propATest"
}
project(':projA/projA1') {
println "projA1 Test = $propATest"
}
--
View this message in context: http://gradle.1045684.n5.nabble.com/Multi-Project-with-Flat-Directories-subproject-not-inheriting-properties-tp3248301p3248301.html
Sent from the gradle-user mailing list archive at Nabble.com.
View this message in context: http://gradle.1045684.n5.nabble.com/Multi-Project-with-Flat-Directories-subproject-not-inheriting-properties-tp3248301p3248301.html
Sent from the gradle-user mailing list archive at Nabble.com.