add test-build profile

This commit is contained in:
Anthony Calosa
2024-10-17 19:43:17 +08:00
parent 24638ecfce
commit 97f9ce6b43
3 changed files with 170 additions and 1 deletions

View File

@@ -527,5 +527,116 @@
</plugins>
</build>
</profile>
<profile>
<!-- test build signed with embedded debug.keystore from uber-signer -->
<id>android-test-build</id>
<properties>
<packaging.type>apk</packaging.type>
</properties>
<build>
<plugins>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<version>3.4.1</version>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>SignV2</id>
<phase>verify</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<workingDirectory>${pom.basedir}</workingDirectory>
<executable>java</executable>
<arguments>
<argument>-jar</argument>
<argument>${pom.basedir}/tools/uber-apk-signer.jar</argument>
<argument>-a</argument>
<argument>${pom.basedir}/target/</argument>
<argument>--debug</argument>
</arguments>
</configuration>
</plugin>
<plugin>
<groupId>com.simpligility.maven.plugins</groupId>
<artifactId>android-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.4</version>
</dependency>
<dependency>
<groupId>sun</groupId>
<artifactId>misc</artifactId>
<version>1</version>
<scope>system</scope>
<systemPath>${pom.basedir}/libs/sun-misc.jar</systemPath>
</dependency>
</dependencies>
<version>4.6.2</version>
<extensions>true</extensions>
<configuration>
<sign>
<debug>false</debug>
</sign>
<sdk>
<platform>35</platform>
<buildTools>35.0.0</buildTools>
</sdk>
<zipalign>
<verbose>false</verbose>
</zipalign>
<dexForceJumbo>true</dexForceJumbo>
<assetsDirectory>${project.basedir}/assets</assetsDirectory>
<resourceDirectory>${project.basedir}/res</resourceDirectory>
<nativeLibrariesDirectory>${project.basedir}/libs</nativeLibrariesDirectory>
<extractDuplicates>true</extractDuplicates>
<proguard>
<skip>false</skip>
<config>${project.basedir}/proguard.cfg</config>
</proguard>
<proguardProguardJarPath>${pom.basedir}/tools/proguard.jar</proguardProguardJarPath>
<release>true</release>
<dexCompiler>d8</dexCompiler>
<d8>
<minApi>26</minApi>
<jvmArguments>
<argument>${build.min.memory}</argument>
<argument>${build.max.memory}</argument>
</jvmArguments>
</d8>
<dex>
<multi-dex>true</multi-dex>
<jvmArguments>
<argument>${build.min.memory}</argument>
<argument>${build.max.memory}</argument>
</jvmArguments>
<dexArguments>--min-sdk-version=26</dexArguments>
</dex>
</configuration>
<executions>
<execution>
<id>update-manifest</id>
<goals>
<goal>manifest-merger</goal>
</goals>
<configuration>
<manifestVersionName>${snapshot-version}</manifestVersionName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>