Build Fails, possible Windows Path Issue

Robert Sanders's Avatar

Robert Sanders

11 Jun, 2011 09:53 PM

Hello,

I came across the GradleFx project just the other day while I was looking to update the build system for a Actionscript 3 project, which currently uses a bunch of ANT build files. I'd looked at gradle before, but the lack of support for MXMLC and COMPC made me decide against it. So, I am new not just to GradleFx but to gradle as well, so it is entirely possible that I am making a number of stupid beginner mistakes. Anyway, here goes.

My project is embedding Adobe's OSMF, and for a variety of reasons we decided to compile it from source, currently being done by some ANT build files. So I decided to try it as the first place to implement a gradle based build. I am now at the point of narrowing down the attempt to a single sub-library, and I am running into errors when the script attempts to run the compile step. I am wondering if these don't have something to do with Windows paths. Actually there are two errors depending on how I configure the task.

In the first case, if I set flexHome such as:
flexHome = 'C:/Downloads/sdk4.1.0'

the result is that the build errors out with:

What went wrong: C:\eclipse-data\robert.sanders\csp-player-2\osmf-lib-core\libs\testing\NetMocker\null\ant\lib does not exist.

I messed around with the script, and if I do:
flexHome = file('C:/Downloads/sdk4.1.0')

then I seem to get a little further, with the error being:

What went wrong: Execution failed for task ':compile'. Cause: No signature of method: java.io.File.plus() is applicable for argument types: (java.lang.String) values: [/lib/compc.jar] Possible solutions: list(), list(java.io.FilenameFilter), split(groovy.lang.Closure), is(java.lang.Object), use([Ljava.lang.Object;), wait()

which seems to me to indicate that the File object is being passed in to the flexHome property, but running into errors further in the code where its attempting to do other manipulations on the path.

I've cloned your git repository, and poked around the code, but I really don't know where to get started, anyway, as I said I suspect that the issue has to do with Windows paths, and that passing the file() in is simply incorrect. If you have any tips on how to get setup and/or where to look, I'd be willing to to try and get this working and submit a patch.

-- Robert

  1. 1 Posted by Robert Sanders on 11 Jun, 2011 09:54 PM

    Robert Sanders's Avatar

    P.S. the project I am trying to compile is indeed located at:

    C:\eclipse-data\robert.sanders\csp-player-2\osmf-lib-core\libs\testing\NetMocker

  2. Support Staff 2 Posted by steven on 12 Jun, 2011 02:57 PM

    steven's Avatar

    Could you send us a simple example build demonstrating the problem? In the meantime, I'll do some exploration on this tomorrow (Monday 13th).

  3. steven closed this discussion on 12 Jun, 2011 02:57 PM.

  4. steven re-opened this discussion on 12 Jun, 2011 02:59 PM

  5. Support Staff 3 Posted by steven on 12 Jun, 2011 03:01 PM

    steven's Avatar

    lol - I didn't mean to close this. I see there's a 'null' in the path of your initial error which suggests some sort of pathing issue, but it's not obvious that the problem is related to the Flex SDK location.

  6. Support Staff 4 Posted by steven on 12 Jun, 2011 03:11 PM

    steven's Avatar

    And which version of OSMF? The latest version, 1.6 sprint 5, specifies Flex 4.5 in the existing build properties.

  7. 5 Posted by Robert Sanders on 12 Jun, 2011 06:53 PM

    Robert Sanders's Avatar

    Hi,

    Thanks for the quick reply. I am using OSMF 1.5.1 (or whatever they called the 'point' release).

    I took another look today, and I think I have resolved the issue(s). First, I must have had something cached or something, because when I started looking at my sub-project on its own again, I was quickly able to get the build to run. I then when back and re-enabled the parent project, and this time was able to find the main issue, which seems to be that I needed to first set the flexHome property on the parent project and then in the allprojects (or subprojects I guess) do:

    flexHome = rootProject.flexHome

    So, sorry for bugging you, and again, GradleFx looks very promising.

  8. Support Staff 6 Posted by Yennick Trevels on 15 Jun, 2011 05:48 PM

    Yennick Trevels's Avatar

    That's weird, normally you only have to set the flexHome property in the subprojects section (as I do in the GradleFx sample projects)

  9. 7 Posted by Robert Sanders on 15 Jun, 2011 05:53 PM

    Robert Sanders's Avatar

    That may be what I had been doing wrong. As I said, I'd looked at gradle a while a go (one of the 0.9 releases) but didn't actually do anything more complex than run some examples at the time, so I may have been doing that incorrectly and changed where I set flexHome to be set on the sub-projects without realizing it. At the time I first ran into the issue the GradleFx-Examples repo was empty, although I did look at the previous repo, but it was using an older version of the plugin.

  10. Yennick Trevels closed this discussion on 23 Jun, 2011 05:41 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