Gradle build on multi project (java + swc) doesn't perform gradlefx:compile when invoked via gradle build

edward.yakop's Avatar

edward.yakop

02 Oct, 2012 06:04 AM

As per subject says.

When gradle build --info is invoked, this is the tasks to be executed:

Tasks to be executed: [task ':pons-core:compileJava', task ':pons-core:processResources', task ':pons-core:classes', task ':pons-core:jar', task ':pons-core:assemble', task ':pons-core:compileTestJava', task ':pons-core:proce            ssTestResources', task ':pons-core:testClasses', task ':pons-core:test', task ':pons-core:check', task ':pons-core:build', task ':pons-swc:test', task ':pons-swc:build']

Notice that pons-swc:compile is not executed.

Versions:
Gradle: 1.2
GradleFx: 0.5

build.gradle for pons-swc:

buildscript {
  repositories {
    mavenCentral()
  }

  dependencies {
    classpath 'org.gradlefx:gradlefx:0.5'
  }
}

apply plugin: 'gradlefx'

type = 'swc'

When gradle compile is invoked implictly, pons-swc is created

$ gradle compile
:pons-swc:compile
Loading configuration file C:\workspace\apps\flex_sdk_4.5.1.21328_mod\frameworks\flex-config.xml
C:\workspace\dev\pons\pons-swc\build\pons-swc.swc (6590 bytes)

BUILD SUCCESSFUL

Total time: 6.002 secs

Project structure

build.gradle
settings.gradle
pons-core/ <-- Java module
pons-swc/ <-- Flex swc module

Root build.gradle

subprojects {
  apply plugin: 'idea'

  repositories {
    mavenCentral()
    mavenLocal()
  }
}

settings.gradle

include 'pons-core', 'pons-swc'
  1. Support Staff 1 Posted by Yennick Trevels on 02 Oct, 2012 10:05 AM

    Yennick Trevels's Avatar

    I think this is because currently the GradleFx build task only depends on the test task. This is an issue and I'll add it to our issue tracker.

    Can you try to add the following to your pons-swc buildfile to see whether it works:

     build.dependsOn("compile")
    
  2. 2 Posted by edward.yakop on 02 Oct, 2012 02:24 PM

    edward.yakop's Avatar

    Yup, that works.

  3. Support Staff 3 Posted by Yennick Trevels on 02 Oct, 2012 03:50 PM

    Yennick Trevels's Avatar

    ok, very good. I'll create an issue for it on our issue tracker and in the meantime you have a solution.

  4. Yennick Trevels closed this discussion on 02 Oct, 2012 03:50 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