Hello!
I want to use simple methods from subprojects{} but they can`t see actual
project I`m in on runtime. For example:
subprojects {
usePlugin('java')
prepareJarResources()
}

void prepareJarResources(){
    println "Preparing Jar resources"

    sourceSets {
        main {
            resources {
                srcDir "main/resources/default"
                srcDir "src/resources/${configName}/default"
            }
        }
    }
}

Result:
Cause: Could not find method sourceSets() for arguments
[build_gradle_ace5bd5145
ec9f80b1d9a7850f69c6b2$_preparejarresources_closu...@1d590d] on root project
'MD
L'.

-- 
View this message in context: 
http://www.nabble.com/Using-methods-in-scripts-tp25803002p25803002.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


Reply via email to