Creating a swc

Jhon's Avatar

Jhon

18 Sep, 2013 01:20 AM

I am using the build file below to create fat swc. The swc file was successfully created, but all the PNGs in my asset folder are added directly to the ROOT folder in the swc. For instance

SWCLIb
     -catalog.xml
     -docs
     -library.swf
      image1.png
      image2.png

Is there any way to create a swc but instead of adding the PNGs directly to the root have the following directory structure inside the swc

SWCLIb
     -catalog.xml
     -docs
     -library.swf
     - ASSETS_FOLDER
                  -image1.png
                  - image2.png

Thanks

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

apply plugin: 'gradlefx'

type = 'swc'
srcDirs = ['src/']
resourceDirs = ['assets/']

asdoc.outputDir = 'api' //will create the documentation in the %projectdir%/documentation folder
fatSwc = true
frameworkLinkage='external'

dependencies {
external fileTree(dir: 'lib/', include: '*.swc')

}

  1. Support Staff 1 Posted by Yennick Trevels on 18 Sep, 2013 08:23 AM

    Yennick Trevels's Avatar

    Hi Jhon,

    Everything in a resource directory is added "as is" into the swc, including directory structure. So what you can do is create the following directory structure in your project:
    %MY_PROJECT%/resources/assets

    Then define the resourceDirs property as follows:
    resourceDirs = ['resources/']

    That should do the trick.

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

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