maven+scala+android 爱被打了一巴掌 2022-06-04 05:14 146阅读 0赞 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>brant.pro.scala</groupId> <artifactId>ScalaAndroid</artifactId> <version>1.0</version> <packaging>apk</packaging> <name>ScalaAndroid</name> <properties> <android-platform>8</android-platform> <android-version>2.2.1</android-version> <android-emulator>Android</android-emulator> <maven-android-plugin-version>3.0.0</maven-android-plugin-version> <maven-compiler-plugin-version>2.3</maven-compiler-plugin-version> <scala.version>2.9.2</scala.version> <android.scala.plugin.version>2.13.1</android.scala.plugin.version> <proguard-maven-plugin-version>2.0.4</proguard-maven-plugin-version> <rt.jar.path>${env.JAVA_HOME}/Classes/classes.jar</rt.jar.path> <jsse.jar.path>${env.JAVA_HOME}/Classes/jsse.jar</jsse.jar.path> </properties> <repositories> <repository> <id>scala-tools.org</id> <name>Scala-tools Maven2 Repository</name> <url>http://scala-tools.org/repo-releases</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>scala-tools.org</id> <name>Scala-tools Maven2 Repository</name> <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url> </pluginRepository> </pluginRepositories> <dependencies> <dependency> <groupId>com.google.android</groupId> <artifactId>android</artifactId> <version>${android-version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.google.android</groupId> <artifactId>android-test</artifactId> <version>${android-version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.scala-lang</groupId> <artifactId>scala-library</artifactId> <version>${scala.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>org.scalatest</groupId> <artifactId>scalatest_2.9.0</artifactId> <version>1.6.1</version> <scope>test</scope> </dependency> </dependencies> <build> <sourceDirectory>src</sourceDirectory> <plugins> <plugin> <groupId>org.scala-tools</groupId> <artifactId>maven-scala-plugin</artifactId> <version>${android.scala.plugin.version}</version> <executions> <execution> <id>scala-compile-first</id> <phase>process-resources</phase> <goals> <goal>add-source</goal> <goal>compile</goal> <goal>testCompile</goal> </goals> <configuration> <includes> <include>**/*.scala</include> <include>**/*.java</include> </includes> </configuration> </execution> <execution> <id>scala-test-compile</id> <phase>process-test-resources</phase> <goals> <goal>testCompile</goal> </goals> <configuration> <includes> <include>**/*.scala</include> </includes> </configuration> </execution> </executions> <configuration> <testSourceDir>jtest</testSourceDir> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>com.pyx4me</groupId> <artifactId>proguard-maven-plugin</artifactId> <version>${proguard-maven-plugin-version}</version> <executions> <execution> <phase>process-classes</phase> <goals> <goal>proguard</goal> </goals> </execution> </executions> <configuration> <maxMemory>2048m</maxMemory> <injar>classes</injar> <libs> <lib>/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar</lib> </libs> <obfuscate>false</obfuscate> <options> <option>-keep public class * extends android.app.Activity</option> <option>-keep public class * extends android.app.Application</option> <option>-keep public class * extends android.app.Service</option> <option>-keep public class * extends android.content.BroadcastReceiver</option> <option>-keep public class * extends android.content.ContentProvider</option> <option>-dontskipnonpubliclibraryclasses</option> <option>-dontoptimize</option> <option>-ignorewarnings</option> <!-- <option>-keep public class com.example.androidjava.*</option> <option>-keep public class com.example.androidjava.*$*</option> <option>-dontskipnonpubliclibraryclasses</option> <option>-dontoptimize</option> <option>-ignorewarnings</option> <option>-keep public class brant.pro.scala.*</option> <option>-keep public class brant.pro.scala.*$*</option> <option>-dontskipnonpubliclibraryclasses</option> <option>-dontoptimize</option> <option>-ignorewarnings</option> <option>-dontwarn</option> <option>-dontpreverify</option> <option>-optimizationpasses 7</option> <option>-dontusemixedcaseclassnames</option> <option>-dontskipnonpubliclibraryclasses</option> --> </options> </configuration> </plugin> <plugin> <groupId>com.jayway.maven.plugins.android.generation2</groupId> <artifactId>android-maven-plugin</artifactId> <version>3.2.0</version> <configuration> <androidManifestFile>AndroidManifest.xml</androidManifestFile> <assetsDirectory>assets</assetsDirectory> <resourceDirectory>res</resourceDirectory> <dex> <jvmArguments> <argument>-Xms512m</argument> <argument>-Xmx1024m</argument> </jvmArguments> </dex> <sdk> <path>/Users/brantyan/program/lib/android-sdk-macosx</path> <platform>${android-platform}</platform> </sdk> <emulator> <avd>${android-emulator}</avd> </emulator> <deleteConflictingFiles>true</deleteConflictingFiles> <undeployBeforeDeploy>true</undeployBeforeDeploy> </configuration> <extensions>true</extensions> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin-version}</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> </project>
还没有评论,来说两句吧...