Get APK version code when packaging

33 views
Skip to first unread message

Martynas Jurkus

unread,
Apr 24, 2013, 8:41:07 AM4/24/13
to maven-androi...@googlegroups.com

I'm doing my releases with android-maven-plugin 3.5.3I would love to get my final apk in specific naming:

App-v${project.version}-${android.manifest.versionCode}.apk

I can't get version code from manifest. Is there a way to do that?

    <plugin>

        <groupId>com.jayway.maven.plugins.android.generation2</groupId>

        <artifactId>android-maven-plugin</artifactId>

        <inherited>true</inherited>

            <configuration>

                <sign>

                    <debug>false</debug>

                </sign>

                <zipalign>

                    <verbose>true</verbose>

                    <inputApk>${project.build.directory}/${project.artifactId}-${project.version}.apk</inputApk>

                    <outputApk>${project.build.directory}/App-v${project.version}-${android.manifest.versionCode}.apk</outputApk>

                </zipalign>

                <manifest>

                    <debuggable>false</debuggable>

                    <versionName>${project.version.name}</versionName>

                    <versionCodeAutoIncrement>${version.code.increment}</versionCodeAutoIncrement>

                </manifest>

            </configuration>

    </plugin>

Reply all
Reply to author
Forward
0 new messages