Runtime Shared Libraries (RSL's)

R. van Twisk's Avatar

R. van Twisk

31 Jul, 2012 10:00 PM


I am new to GradleFX and somewhat new to Gradle.
I managed to compile my Flex application and libraries with GradleFX and all went well.

However, when I compile my application I get to see the unsigned runtime libraries in my project. What I would like to see the signed runtime libraries in my project, framework_4.1.0.16076.swz and friends. It's been a while since I used mxmlc myself.
Is this something I need to set using additionalCompilerOptions?
I currently have that set to : additionalCompilerOptions=['-static-link-runtime-shared-libraries=false', '-optimize=false', '-debug=false']


  1. Support Staff 1 Posted by Yennick Trevels on 03 Aug, 2012 06:42 AM

    Yennick Trevels's Avatar

    Sorry for the late response but I've been super busy the last few days.
    In GradleFx we are using rsl's by default for swf-based projects and we use the unsigned rsl's.
    You should be able to specify the signed rsl's as file-based rsl's:

    rsl files('mysignedrsl.swc', 'mysecondsignedrsl.swc')

    or alternatively you can use the additionalCompilerOptions to which you can specify any option you want. See for more information on RSLs.

    I'll try to come up with a better example once I find some more time.

    Hope this helped you a bit further :)

  2. 2 Posted by rvt on 10 Aug, 2012 08:57 PM

    rvt's Avatar

    thanks for the answer,

    I could pickup this project again, and you mentioned I can do something like this:

    rsl files('mysignedrsl.swc', 'mysecondsignedrsl.swc')

    ofcourse I need to change this with the files supplied by adobe, but where do I add 'rsl files' ?

    When added in the depdencies I get: > No such property: rsl for class: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler

    I think I am missing something... Just newbie questions I guess :)

  3. 3 Posted by rvt on 10 Aug, 2012 10:25 PM

    rvt's Avatar

    Yennick ,

    I came a bit further. My newby-ishm on groovy and gradle allowed me to put a comma somewhere where it wasn't needed (gradle really needs string IDE support!!)

    When I put this in my dependencies, compiling is successful:

    rsl files('/Applications/Adobe Flash Builder 4 Plug-in/sdks/4.1.0/frameworks/libs/framework.swc')

    When I change it to the following it isn't compiling
    rsl files('/Applications/Adobe Flash Builder 4 Plug-in/sdks/4.1.0/frameworks/libs/framework.swc,framework_4.1.0.16076.swz,,framework_4.1.0.16076.swf')

    From what I understand is that mxmlc should be able to include the swz rather then the swf files. Similar to the option useDebugRSLSwfs="false" using eclipse.

    Our problem is that when we set useDebugRSLSwfs to true, using the non signed files that some of our clients cannot load the flex applications.

  4. 4 Posted by rvt on 10 Aug, 2012 10:45 PM

    rvt's Avatar


    I could root cause this to the function copyFrameworkRSLs.
    It looks like that GradleFX cannot copy the signed RLS's (with the extension swz).

    I am still a bit vague on this because I cannot supply my own -runtime-shared-library-path as mentioned here :

    But it seems like that GradleFX needs to be extended with a parameter like : useDebugRSLSwfs so cope with this issue.

    if you agree on this, I can look into such modification and provide a patch...

  5. 5 Posted by rvt on 11 Aug, 2012 04:28 PM

    rvt's Avatar


    here is a pull request to add that feature :

    I added a option called useDebugRSLSwfs that when set to false (default is true) to use the signed swz files rather then the unsigned swf files.

  6. Support Staff 6 Posted by Yennick Trevels on 11 Aug, 2012 05:55 PM

    Yennick Trevels's Avatar

    Wow, thanks man :)
    So when you use this option the signed rsl's are working for your application?


  7. 7 Posted by rvt on 11 Aug, 2012 06:56 PM

    rvt's Avatar

    the signed RSL's should be working.

    Over the weekend I will do some extensive testing that will include cleaning my flash and browser caches just to ensure that everything is in working order.

    I will update this thread once confirmed.

  8. Support Staff 8 Posted by Yennick Trevels on 11 Aug, 2012 08:26 PM

    Yennick Trevels's Avatar

    Thanks again.

    I'll try to merge this into the GradleFx code as fast as possible. Still super busy, but since you did the heavy lifting this should be a fast process for me :)

  9. 9 Posted by rvt on 12 Aug, 2012 06:36 PM

    rvt's Avatar


    I have been digging a bit deeper into the code and I think there is one bug in gradlefx and one area that needs improvements, so don't commit my pull request yet!

    First the bug:

    In the function copyFrameworkRSLs (Mxmlc.groovy) it will copy the swf (unsigned!!) library file from the *.swc file and put that in the projects output directory.
    However, Mxmlc compiles against the settings as found in flex-config.mxml where it's specified as:


    That means that if a flex application loads, it will first try to load the signed swz file from the adobe website, and if that couldn't get reached, it would load the swz file from the same host the application was loaded.

    That means that the function copyFrameworkRSLs(..) should not extract the unsigned library.swf from the *.swc file, but copy the swz file from the rsls directory.

    I will create a separate pull request to correct this because the current unsigned library (swf) files won't ever be used anyways.

    The improvement:
    I still want to keep using the setting : useDebugRSLSwfs but instead of the default of true I want to set it to false, this is essentially the current behavior.

    When set to true gradlefx will create a set runtime-shared-library-path entries for the compiler that will instruct it to load the unsigned swf files.
    The created compiler arguments will look like this:

    I think that will be better then my current pull request.

  10. 10 Posted by rvt on 12 Aug, 2012 08:50 PM

    rvt's Avatar


    here is the pull request to fix the above items:

    it has been tested with both the internet on and off for the signed swz. When the internet was off, the local swz where loaded. When the internet was on, the versions from adobe where loaded

    When the option useDebugRSLSwfs was set to true, gradlefx will include the unsigned swf version instead of the swz version and are loaded as such.

    For each test I made sure the browser caches was cleared and that flash-cache was empties so I could see exactly what files where loaded.

  11. Support Staff 11 Posted by Yennick Trevels on 13 Aug, 2012 01:56 PM

    Yennick Trevels's Avatar

    Thanks again :)

  12. Support Staff 12 Posted by Yennick Trevels on 15 Aug, 2012 02:02 PM

    Yennick Trevels's Avatar

    I've merged your pull request with the develop branch. Closing this discussion.

  13. Yennick Trevels closed this discussion on 15 Aug, 2012 02:02 PM.

Comments are currently closed for this discussion. You can start a new one.

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

Recent Discussions

07 May, 2023 04:17 PM
28 Apr, 2023 11:22 PM
23 Apr, 2023 09:43 AM
03 Nov, 2022 01:22 AM
29 Jun, 2022 05:39 PM


04 Aug, 2021 12:50 PM
15 Apr, 2021 06:10 PM
15 Jan, 2021 06:56 PM
09 Mar, 2020 11:11 PM
09 Mar, 2020 11:09 PM
17 Apr, 2019 02:51 PM