iOS Build Error

Miranda's Avatar

Miranda

15 Jan, 2014 02:58 PM

Hi guys! I've got a GradleFx project set up so that I can build to Android, iOS, or for web. For mobile, I have my build.gradle using the following:

includeFileTrees = [
    fileTree(dir: 'build', includes: [ 
        "${config.certName}.p12",
        "${config.provName}.mobileprovision",
        "${config.descName}.xml",
        '*.swf',
        'assets/*.xml',
        'assets/*.png',
        'assets/animations/*.xml',
        "assets/animations/${config.platform}/*.atf",
        'assets/sound/',
        'locales/*.xml',
        'config/*.xml'
    ]),
    fileTree(dir: "build/icons/${config.platform}", includes: ['icons/*.png', '*.png'])
]

The problem arises when I add the above sound folder to the file tree. Without it, everything works fine. With it, I get the following after the adt command (in --debug mode):

[DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Setting project property: adtOutput -> The input line is too long.
[DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Setting project property: adtResult -> 1

This is because we have a bunch of sound files. I used to be adding them to the file tree as assets/sound/**/*.mp3, but I read online that just adding the folder can fix the issue I'm seeing. However, it appears that GradleFx automatically converts a folder to list all the children in the adt command. Is there a way around this? We tried some logic where they all end up in ZIP file, but it takes an unacceptable amount of time to unpack them, so we really need them to add be added directly.

Thanks!

  1. 1 Posted by Miranda on 15 Jan, 2014 03:16 PM

    Miranda's Avatar

    I seem to have shrunk it enough to execute by doing this:

    includeFileTrees = [
        fileTree(dir: 'build', includes: [ 
            "${config.certName}.p12",
            "${config.provName}.mobileprovision",
            "${config.descName}.xml",
            '*.swf',
            'locales/*.xml',
            'config/*.xml'
        ]),
        fileTree(dir: 'build/assets', includes: [
            '*.xml',
            '*.png',
            'animations/*.xml',
            "animations/${config.platform}/*.atf"
        ]),
        fileTree(dir: 'build/assets/sound'),
        fileTree(dir: "build/icons/${config.platform}", includes: ['icons/*.png', '*.png'])
    ]
    

    However, it's still listing every single sound file, it just happens to be shorter enough. So if anyone knows of a fix for that, please let me know.

  2. 2 Posted by Miranda on 15 Jan, 2014 03:20 PM

    Miranda's Avatar

    I seem unable to edit my post, so I'm adding another. Sorry about that!

    I just wanted to add that we will definitely be adding more assets to this build command, so we do still need a way to shrink the command line.

  3. Support Staff 3 Posted by Yennick Trevels on 15 Jan, 2014 04:48 PM

    Yennick Trevels's Avatar

    At this moment there isn't a workaround for this since GradleFx traverses every folder that you've specified. What you can do however is create your own air packaging task, based on the one in GradleFx: https://github.com/GradleFx/GradleFx/blob/master/src/main/groovy/or...

    I'll create a ticket for this in our bugtracker.

  4. 4 Posted by Miranda on 15 Jan, 2014 04:49 PM

    Miranda's Avatar

    Thanks! Would you please link the ticket here after, so I can keep an eye on it?

  5. 5 Posted by Miranda on 15 Jan, 2014 06:08 PM

    Miranda's Avatar

    In the meantime, could someone help me figure out how to use a custom AirPackage.groovy? I'm not using any custom groovy tasks, so I'm unsure how to import it and use it. Thus far, my research is not helpful. Thanks!

  6. 6 Posted by Miranda on 15 Jan, 2014 06:33 PM

    Miranda's Avatar

    I created a ticket, since I didn't see one yet: https://github.com/GradleFx/GradleFx/issues/118

  7. Support Staff 7 Posted by Yennick Trevels on 15 Jan, 2014 08:04 PM

    Yennick Trevels's Avatar

    Thanks for creating the ticket, having a busy day today. I'll see if I can chop something up tomorrow.

  8. 8 Posted by Miranda on 23 Jan, 2014 03:08 PM

    Miranda's Avatar

    Hey, just wanted to check in on this, since I hadn't heard anything for a while. Thanks!

  9. Support Staff 9 Posted by Yennick Trevels on 23 Jan, 2014 03:11 PM

    Yennick Trevels's Avatar

    Hi, haven't forgotten this issue. Life's just been busy this last week :)
    Been thinking/experimenting for a real fix, but it's more difficult than I thought it would be.

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