SWCs and themes

tyler.mcconville's Avatar


01 Sep, 2016 08:58 PM


My organization has a large Flex project that was previously built using Ant. I'm working on switching it to build with Gradle, using GradleFx. I know very little about Flex, but am familiar enough with Ant and Gradle that I didn't think it would be a huge problem to convert this.

The current module I'm converting is an SWC that was compiled with Ant using compc. Here is part of the command used to compile this library using Ant:

<java jar="${compc.jar}">
          <arg line="-theme '${flex.frameworks}/themes/Halo/halo.swc'" />

However, it says here that -theme does not work with compc. When I try to compile the Flex in Gradle, though, (with or without halo.swc specified as a theme dependency), I get a bunch of errors like this:

 C:\MyProject\MyModule\DirA\DirB\MyModalDialogWindow.mxml(334): Error: The style 'backgroundAlpha' is only supported by type 'com.my.group.MyTextArea' with the theme(s) 'halo'.

So it appears that it needs the theme to compile correctly? If I run gradle MyModule:dependencies, halo.swc is correctly listed as a theme dependency.

Let me know if that was unclear - I'm not very familiar with Flex so I may not have explained it very well. Any help would be appreciated!

  1. 1 Posted by tyler.mcconvill... on 01 Sep, 2016 09:00 PM

    tyler.mcconville's Avatar

    When I said "is an SWC that was compiled with Ant using compc" I meant that it is a library that compiles to a .swc file.

  2. Support Staff 2 Posted by Maxime Cowez on 03 Sep, 2016 08:54 AM

    Maxime Cowez's Avatar

    Hey Tyler,

    As Yennick said in that other thread: you should probably add the theme as an external dependency when compiling the library, and use the theme dependency scope in the main project that leverages this library.
    Check the dependency management section in the docs for more information.

  3. 3 Posted by tyler.mcconvill... on 05 Sep, 2016 06:37 PM

    tyler.mcconville's Avatar

    Thanks for the reply! Unfortunately, I get the same compilation errors when specifying it as an external dependency.

  4. Support Staff 4 Posted by Maxime Cowez on 06 Sep, 2016 08:05 PM

    Maxime Cowez's Avatar

    Unfortunately it's been years since I've compiled any Flex apps.
    If adding the halo.swc as an external dep doesn't help, I'm not sure how we can investigate without looking into the code.

    I would try to recreate what that ANT build is doing on the command line (so just compc and whatever flags it needs to get it to compile your library). In the end, GradleFx is just a wrapper around Flex' command line tools, so from there you should be able to figure out how to convert it (or post your command here so we can help you).

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? 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