Gradle 1.9 and gradlefx


(a.bresser) #1

Hi,

I have a gradlefx-Project that compiles smoothly with gradle-1.8 but with 1.9-rc3 i get the following errors:

15:41:36.275 [ERROR] [org.gradle.BuildExceptionReporter] A problem occurred configuring root project ‘cleaning-slide’. 15:41:36.276 [ERROR] [org.gradle.BuildExceptionReporter] > Failed to notify project evaluation listener. 15:41:36.276 [ERROR] [org.gradle.BuildExceptionReporter]

Tried to remove model tasks.asdoc but it is not registered 15:41:36.277 [ERROR] [org.gradle.BuildExceptionReporter]

Tried to remove model tasks.createHtmlWrapper but it is not registered


(Luke Daley) #2

What’s going on with the createHtmlWrapper and asdoc tasks in your build? Are you removing or replacing them?


(a.bresser) #3

Hi Luke. I do not have createHtmlWrapper or asdoc in my gradle file so it has to be included by gradle or gradlefx.


(Luke Daley) #4

It would be extremely helpful if you could provide a sample build (perhaps on GitHub) that I can use to dig in to the problem. Would that be possible?


(a.bresser) #5

sure, here you go: https://github.com/brean/gradlefx-mac-test

this is the output with gradle 1.9-rc3: http://pastebin.com/YsticpCq

and as you can see it compiles with gradle 1.8: http://pastebin.com/gsJ8KrP8


(a.bresser) #6

When I change the gradlefx version to 0.7 I get an even longer error log: http://pastebin.com/S3YfGXRK


(Jason Miller) #7

We’re also seeing the same errors with gradle 1.9-rc-3 (as well as earlier release candidates for 1.9) and GradleFX 0.6.4 and GradleFX 0.7.

I can reproduce it with the following build.gradle in a blank project running any generic task such as ‘tasks’.

buildscript {
  repositories {
    mavenCentral()
  }
    dependencies {
    classpath (
      'org.gradlefx:gradlefx:0.7',
    )
  }
}
  apply plugin: 'gradlefx'
  type = 'swc'
  task wrapper(type:Wrapper) {
  gradleVersion = '1.9-rc-3'
}

(Yennick Trevels) #8

Hi, I’m the lead developer of GradleFx.

What’s special about these tasks is the way they’re being added, which is conditionally.

addTask Tasks.PACKAGE_TASK_NAME, AirPackage, { flexConvention.type?.isNativeApp() }

protected Task addTask(String name, Class taskClass, Closure condition) {

//always add tasks to make sure they are immediately on the task graph,

//but remove them after evaluation if it turns out we don’t need them

Task task = project.tasks.create name, taskClass

project.afterEvaluate {

if (!condition()) project.tasks.remove task

}

return task

}

Maybe something has changed with the remove method, but I couldn’t find any breaking changes related to this in the release notes of Gradle 1.9.


(Luke Daley) #9

This has been fixed in the just released 1.9-rc-4.