Last active
January 3, 2016 05:09
-
-
Save granoeste/8414107 to your computer and use it in GitHub Desktop.
[Android] Android Maven Configuration (pom.xml) with AppCompat and MediaRouter and GoogleCastSdkAndroid. Before that, build by changing the maven configure the GoogleCastSdkAndroid library project.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>com.google.cast</groupId> | |
<artifactId>com.google.cast</artifactId> | |
<version>1.0.6</version> | |
<packaging>apklib</packaging> | |
<name>com.google.cast</name> | |
<properties> | |
<platform.version>4.4.2_r2</platform.version> | |
<jar.path>${project.basedir}/libs/GoogleCastSdkAndroid.jar</jar.path> | |
</properties> | |
<dependencies> | |
<dependency> | |
<groupId>android</groupId> | |
<artifactId>android</artifactId> | |
<version>${platform.version}</version> | |
<scope>provided</scope> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>com.jayway.maven.plugins.android.generation2</groupId> | |
<artifactId>android-maven-plugin</artifactId> | |
<version>3.8.0</version> | |
<configuration> | |
<androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile> | |
<assetsDirectory>${project.basedir}/assets</assetsDirectory> | |
<resourceDirectory>${project.basedir}/res</resourceDirectory> | |
<sdk> | |
<platform>19</platform> | |
</sdk> | |
</configuration> | |
<extensions>true</extensions> | |
</plugin> | |
<plugin> | |
<artifactId>maven-install-plugin</artifactId> | |
<executions> | |
<execution> | |
<id>jar-file</id> | |
<phase>install</phase> | |
<goals><goal>install-file</goal></goals> | |
<configuration> | |
<groupId>${project.groupId}</groupId> | |
<artifactId>${project.artifactId}</artifactId> | |
<packaging>jar</packaging> | |
<version>${project.version}</version> | |
<file>${jar.path}</file> | |
</configuration> | |
</execution> | |
<execution> | |
<id>apklib-file</id> | |
<phase>install</phase> | |
<goals> | |
<goal>install-file</goal> | |
</goals> | |
<configuration> | |
<groupId>${project.groupId}</groupId> | |
<artifactId>${project.artifactId}</artifactId> | |
<packaging>apklib</packaging> | |
<version>${project.version}</version> | |
<file>${project.build.directory}/${project.artifactId}-${project.version}.apklib</file> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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>your.company</groupId> | |
<artifactId>my-android-application</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>apk</packaging> | |
<name>my-android-application</name> | |
<properties> | |
<platform.version>4.4.2_r2</platform.version> | |
<support.version>19.0.1</support.version> | |
</properties> | |
<dependencies> | |
<!-- Android Platform --> | |
<dependency> | |
<groupId>android</groupId> | |
<artifactId>android</artifactId> | |
<version>${platform.version}</version> | |
<scope>provided</scope> | |
</dependency> | |
<!-- Android Compatibility Extra V4 --> | |
<dependency> | |
<groupId>android.support</groupId> | |
<artifactId>compatibility-v4</artifactId> | |
<version>${support.version}</version> | |
</dependency> | |
<!-- Android Compatibility Extra V7 AppCompat Library --> | |
<dependency> | |
<groupId>android.support</groupId> | |
<artifactId>compatibility-v7-appcompat</artifactId> | |
<version>${support.version}</version> | |
<type>apklib</type> | |
</dependency> | |
<dependency> | |
<groupId>android.support</groupId> | |
<artifactId>compatibility-v7-appcompat</artifactId> | |
<version>${support.version}</version> | |
<type>jar</type> | |
</dependency> | |
<!-- Android Compatibility Extra V7 Mediarouter Library --> | |
<dependency> | |
<groupId>android.support</groupId> | |
<artifactId>compatibility-v7-mediarouter</artifactId> | |
<version>${support.version}</version> | |
<type>apklib</type> | |
</dependency> | |
<dependency> | |
<groupId>android.support</groupId> | |
<artifactId>compatibility-v7-mediarouter</artifactId> | |
<version>${support.version}</version> | |
<type>jar</type> | |
</dependency> | |
<!-- GoogleCastSdkAndroid Library --> | |
<dependency> | |
<groupId>com.google.cast</groupId> | |
<artifactId>com.google.cast</artifactId> | |
<version>1.0.6</version> | |
<type>apklib</type> | |
</dependency> | |
<dependency> | |
<groupId>com.google.cast</groupId> | |
<artifactId>com.google.cast</artifactId> | |
<version>1.0.6</version> | |
<type>jar</type> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>com.jayway.maven.plugins.android.generation2</groupId> | |
<artifactId>android-maven-plugin</artifactId> | |
<version>3.8.0</version> | |
<configuration> | |
<androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile> | |
<assetsDirectory>${project.basedir}/assets</assetsDirectory> | |
<resourceDirectory>${project.basedir}/res</resourceDirectory> | |
<nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory> | |
<sdk> | |
<platform>19</platform> | |
</sdk> | |
<undeployBeforeDeploy>true</undeployBeforeDeploy> | |
</configuration> | |
<extensions>true</extensions> | |
</plugin> | |
<plugin> | |
<artifactId>maven-compiler-plugin</artifactId> | |
<version>2.3.2</version> | |
<configuration> | |
<source>1.6</source> | |
<target>1.6</target> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should look here in advance: Maven Android SDK Deployer https://github.com/mosabua/maven-android-sdk-deployer