Created
December 6, 2012 12:32
-
-
Save rkistner/4224133 to your computer and use it in GitHub Desktop.
Android library project + lightweight application using it with Maven
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/xsd/maven-4.0.0.xsd"> | |
<parent> | |
<artifactId>myproject</artifactId> | |
<groupId>com.example</groupId> | |
<version>1.0.0-SNAPSHOT</version> | |
</parent> | |
<modelVersion>4.0.0</modelVersion> | |
<artifactId>myapp</artifactId> | |
<packaging>apk</packaging> | |
<dependencies> | |
<dependency> | |
<groupId>com.example</groupId> | |
<artifactId>mylib</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<scope>compile</scope> | |
<type>apklib</type> | |
</dependency> | |
</dependencies> | |
<build> | |
<finalName>${project.artifactId}</finalName> | |
<sourceDirectory>src</sourceDirectory> | |
<plugins> | |
<plugin> | |
<groupId>com.jayway.maven.plugins.android.generation2</groupId> | |
<artifactId>android-maven-plugin</artifactId> | |
<version>3.4.1</version> | |
<configuration> | |
<sdk> | |
<platform>16</platform> | |
</sdk> | |
<mergeManifests>true</mergeManifests> | |
</configuration> | |
<extensions>true</extensions> | |
</plugin> | |
<plugin> | |
<artifactId>maven-resources-plugin</artifactId> | |
<version>2.6</version> | |
<executions> | |
<execution> | |
<phase>initialize</phase> | |
<goals> | |
<goal>resources</goal> | |
</goals> | |
</execution> | |
<execution> | |
<id>default-resources</id> | |
<phase>DISABLED</phase> | |
</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/xsd/maven-4.0.0.xsd"> | |
<parent> | |
<artifactId>myproject</artifactId> | |
<groupId>com.example</groupId> | |
<version>1.0.0-SNAPSHOT</version> | |
</parent> | |
<modelVersion>4.0.0</modelVersion> | |
<artifactId>mylib</artifactId> | |
<packaging>apklib</packaging> | |
<dependencies> | |
<dependency> | |
<groupId>com.google.android</groupId> | |
<artifactId>android</artifactId> | |
<version>4.1.1.4</version> | |
<scope>provided</scope> | |
</dependency> | |
</dependencies> | |
<build> | |
<finalName>${project.artifactId}</finalName> | |
<sourceDirectory>src</sourceDirectory> | |
<plugins> | |
<plugin> | |
<!-- See http://code.google.com/p/maven-android-plugin/ --> | |
<groupId>com.jayway.maven.plugins.android.generation2</groupId> | |
<artifactId>android-maven-plugin</artifactId> | |
<version>3.4.1</version> | |
<configuration> | |
<sdk> | |
<platform>16</platform> | |
</sdk> | |
</configuration> | |
<extensions>true</extensions> | |
</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
<!-- The parent project --> | |
<?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.example</groupId> | |
<artifactId>myproject</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<packaging>pom</packaging> | |
<modules> | |
<module>mylib</module> | |
<module>myapp</module> | |
</modules> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is great dude, thanks. Just used this in https://github.com/christopherperry/RoboBillingLibrary