mttkay / replicant

A REPL for the Android Debug Bridge (ADB)
MIT License
123 stars 9 forks source link

Add application id suffix command #35

Open futtetennista opened 9 years ago

futtetennista commented 9 years ago

Adds the possibility to append an application id suffix to the current application id. The suffix must start with a '.' character, in order to reflect the way it is declared in the gradle build file.

mttkay commented 9 years ago

Cool! I'm wondering if this could be automatically detected, since there is only ever one suffix active at a time? I would find it annoying to have to set this manually every time, I feel it should be automatic.

futtetennista commented 9 years ago

The suffix - if any - depends on the build variant you want to build. So you might want to built the debug one using ./gradlew assembleDebug with a ".debug" suffix and then the release one using ./gradlew assembleRelease for example. That said, I don't see how replicant can easily be aware of it. One way I can think of it being possible is that it could look in the apk folder and identify the latest apk built, parse its name, then parse the app build file to check the config blocks for that variant and determine if there's a suffix defined for it. That's maybe a bit overkill.

Thinking about it, this command isn't so useful after all. It merely saves you some typing (!package "app.debug" vs. !suffix ".debug").