ApplicationId with Maven plugin?

47 views
Skip to first unread message

maven-androi...@io7m.com

unread,
Sep 11, 2015, 12:32:47 PM9/11/15
to maven-androi...@googlegroups.com
Hello.

I noticed this, recently:

http://tools.android.com/tech-docs/new-build-system/applicationid-vs-packagename

I have a situation where I want to produce a fork of my application
with some different branding and a different externally visible package
name, but do not want to have to propagate all of the package name
changes throughout the entire codebase (as future merges would become
extremely painful).

The ApplicationId looks as though it was designed to facilitate this,
but is there any way to use this from the Maven Android plugin?

M

maven-androi...@io7m.com

unread,
Sep 14, 2015, 7:11:12 AM9/14/15
to maven-androi...@googlegroups.com
On 2015-09-11T16:32:33 +0000
OK, failing that, is there a way to achieve something similar with Maven
in general?

M

Manfred Moser

unread,
Sep 15, 2015, 1:18:49 AM9/15/15
to maven-androi...@googlegroups.com
You can e.g. create an aar that has most of your application code and two apk projects that use the aar with different manifests (and therefore top level package). Or you can use profiles.

I have not looked at this any closer so we migh also be able to extend the android maven plugin to support this more. Probably would have to be you or some other interested developer though...

Manfred
> --
> You received this message because you are subscribed to the Google Groups
> "Maven Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to maven-android-deve...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

maven-androi...@io7m.com

unread,
Sep 15, 2015, 5:23:06 AM9/15/15
to maven-androi...@googlegroups.com
On 2015-09-15T07:18:46 +0200
"Manfred Moser" <man...@mosabuam.com> wrote:

> You can e.g. create an aar that has most of your application code and two apk projects that use the aar with different manifests (and therefore top level package). Or you can use profiles.
>
> I have not looked at this any closer so we migh also be able to extend the android maven plugin to support this more. Probably would have to be you or some other interested developer though...

Hello.

The aar suggestion is pretty good, actually. It requires no build
system additions and I think it better reflects the reality of the
situation: The "fork" is actually just another frontend to the core of
the application.

I'll try implementing it today!

Thanks,
M
Reply all
Reply to author
Forward
0 new messages