Multi-project, with modules, android build script for linux.

vinod777vinod777 Posts: 9Member
edited October 2016 in Resources

Hi,
Various android modules like GooglePlayServices require application ids to be added in AndroidManifest.xml file. This manifest is inside the modules directory. When managing multiple android projects, we may have to come back and copy old project's modules into the source dir, change the ids and compile again to get the export templates. But I found a way to ease all this process.

Let's say we have two projects - A and B.
We will create the project directory like this

/projectA
        /godot_project_dir
        /templates
                /modules

/projectB
        /godot_project_dir
        /templates
                /modules

So now each project has separate place for their own modules and export templates.
I have a script called generate.sh which can be run by passing the templates folder as an argument.
.generate.sh /projectA/templates

The script has to be in the Godot source directory and it will copy all modules into the godot source module directory. Then it compiles export templates for android and move it to the project's templates directory.
For the next project, we can repeat the same steps as above
.generate.sh /projectB/templates

This will remove all old modules copied for the projectA and compiles the templates with projectB modules.

The generate.sh script
https://gist.github.com/vinod8990/50c2a2248681063998d79e2ae69684bf

Let me know what you think of this.
I already posted this on my blog. You can read it here if you want.
http://codetuto.com/2016/10/automate-godot-android-build-process-5-easy-steps/
Thanks.


Tags :

Comments

  • KioriKiori Posts: 206Admin

    Hi there,
    I moved this to resources since in effect you are sharing a script. I also changed the title accordingly, if you didn't really like it, feel free to change it to something better or msg me if you need any assistance with it.

    This is really, interesting, being that it's a bash script this is pretty linux centric, maybe you should add a "linux" tag to it, it's your choice though.
    I've been thinking for a while that Godot could improve it's handling of multiple projects, I just don't really know what to suggest.
    If you have a fully formed idea, maybe open a github issue with something that might help this and other scenarios.

    Also, I just saw your resolutions switcher plugin, you should consider making a post about it in the resources section(like this one), to call attention to it. Something like that should come standard with Godot. Really.

    Good job!

  • vinod777vinod777 Posts: 9Member

    Thanks, I changed the title to include the word "linux" because this script is only for linux.

    I've already reported a suggestion in github for handling multiple projects with multiple modules separated. After that I came up with this, I will update the github thread with this.

    I will post a thread about the plugins soon.

Sign In or Register to comment.