Search code examples
androidmavenandroid-maven-plugin

How set application label in maven by properties?


I build my apk file by maven. But I want change application label and I can't do it :(

I found manifest-update parameter manifestApplicationLabel, but don't understand how use it?

Can you help me?


Solution

  • I am not familiar with android development, nur the plugin. But this seems pretty straightforward.

    Add this section to your pom.xml:

    <build>
    <plugins>
    <plugin>
        <groupId>com.jayway.maven.plugins.android.generation2</groupId>
        <artifactId>android-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>update-manifest</id>
            <goals>
              <goal>manifest-update</goal>
            </goals>
            <configuration>
              <manifest>
                <applicationLabel>YOUR_APP_LABEL</applicationLabel>               
              </manifest>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    </build>