obfusk/reproducible-apk-tools

gradle integration?

obfusk opened this issue · 7 comments

Making a gradle plugin is probably too much effort, but it would be nice to have a snippet of code one can customise and add to build.gradle to integrate these tools (and maybe zipalign as well) into the build process if that's easily doable.

Do you want to call command line tool in gradle or port these tools to gradle? Maybe it's cleaner to re-package the apk file in gradle.

Do you want to call command line tool in gradle or port these tools to gradle?

Call the existing tools (maybe expecting them to be in the repo as a submodule).
That should be doable with a few lines of code, e.g. something like:

project.afterEvaluate {
    exec {
        commandLine "./reproducible-apk-tools/sort-apk.py", ...
    }
}

Just needs to get the output APK file path as well, maybe shuffle some files around.

If someone wants to port the tools to gradle (maybe make an actual plugin in that case), great.
But I'm not doing that.

I'm barely familiar with gradle though. And I can't really test it properly myself. So I could use some help.

Being able to integrate it in such a way that it runs before signing would be especially nice, might just work with existing android studio setups then.