Skinning Android app with Maven build profiles

前端 未结 2 1365
逝去的感伤
逝去的感伤 2020-12-03 16:10

I\'ve got mavenized Android application and customer wants support for the skinning at build time.

For example: mvn clean install -P Developer, mvn clean install -P

相关标签:
2条回答
  • 2020-12-03 16:28

    Based on the answer from yorkw, this solution works for me:

    For each profile, resourceDirectory needs to be added into to the configuration of the android maven plugin.

    For example:

    <resourceDirectory>${project.basedir}/res-customer1</resourceDirectory> <resourceDirectory>${project.basedir}/res-customer2</resourceDirectory>

    etc...

    0 讨论(0)
  • 2020-12-03 16:53

    If you want to use different assets or resources for different buid profiles and if you even want to merge multiple such directories of each build differently, you can follow this great blog post:

    https://ebuddytechblog.wordpress.com/2013/04/08/branded-android-builds-using-maven/

    0 讨论(0)
提交回复
热议问题