Aggregation project with gradlefx

Pavel Bernshtam's Avatar

Pavel Bernshtam

30 Jan, 2013 02:21 PM

Hi!

I'm trying to create an aggregation project.

My build.gradle is following:

buildscript {
repositories { mavenCentral() } dependencies { classpath group: 'org.gradlefx', name: 'gradlefx', version: '0.6.3' } }

subprojects {
apply plugin: 'gradlefx'

srcDirs = ['src']
localeDir = 'locale'


flexHome = 'D:\\development\\adobe-flex-4.6\\'

}

configure(['Commons']) {
type = 'swc' println "in sub projects $project.name" }

configure(['Manager', 'VideoChat']) {
type = 'swf' }


gradle compile fails with warning

Creating properties on demand (a.k.a. dynamic properties) has been deprecated and is scheduled to be removed in Gradle 2.0. Please read http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraProp... for information on the replacement for dynamic properties.

Deprecated dynamic property: "type" on "root project 'flex'", value: "swc".

and then NPE

java.lang.NullPointerException: Cannot invoke method isLib() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:77) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:32) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112) at org.gradlefx.plugins.GradleFxPlugin$_addTasks_closure1.doCall(GradleFxPlugin.groovy:53)

What I'm doing wrong? It looks like gradle applied the gradlefx plugin for the aggregation project itself, but does not see a type in it.

Thank you

  1. Support Staff 1 Posted by Yennick Trevels on 30 Jan, 2013 03:31 PM

    Yennick Trevels's Avatar

    Looks indeed like the type property isn't set on the subprojects.
    I haven't used the "configure()" syntax before, but are you sure you can just pass in the subproject names?

  2. Support Staff 2 Posted by Yennick Trevels on 30 Jan, 2013 03:35 PM

    Yennick Trevels's Avatar

    Also, if it should be possible to just provide strings, try prefixing them with a colon, like this:

    configure([':Commons'])
    

    or otherwise try this:

     configure([project(':Commons')]) {
    
  3. 3 Posted by Pavel Bernshtam on 30 Jan, 2013 08:15 PM

    Pavel Bernshtam's Avatar

    Thank you, the second is working!

  4. Yennick Trevels closed this discussion on 30 Jan, 2013 08:22 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac