📜 ⬆️ ⬇️

Android - Continuous Integration. Part 2

The first part, telling why all this is needed here .

Content




The post is designed for readers already familiar with the basics of maven and in the course of the article the emphasis will be placed on some specific, specifically for android, points, and not on the general issues of the maven itself. If you have never worked with maven before, you can read here and here for a start.
')
Also, I will not consider the installation and basic configuration tools - JDK, Android SDK, Maven and IntelliJ IDEA must be installed and working. You must have JAVA_HOME, M2, M2_HOME and ANDROID_HOME environment variables set accordingly. Also, for convenience, I recommend adding to the Path the %ANDROID_HOME%/tools and %ANDROID_HOME%/platform-tools directories.

It is always more convenient for me to first see the whole picture, and then understand its individual details. Therefore, I suggest you pick up a project template from github. All further narration will be conducted on his example.


Training


Before proceeding with the review of the POM files themselves, let's start by organizing the structure of the project and set it up to work in IntelliJ IDEA. This will give us the opportunity to continue to use the standard IDE tools for running and debugging applications, and indeed, to fully enjoy all its benefits. IDEA right out of the box has built-in plug-ins for Maven and Android, and the setup doesn’t cause almost any problems. Just open the Maven plug-in panel and select the appropriate root POM file. Based on data from it, IDEA will create project files that you may have to tweak a little manually.



The project consists of four modules:

 Root
  | ---- App
  |  | ---- src
  |  | ---- test
  |  | ---- JUnit
  |  | ---- Robolectric
  |
  | ---- Lib
  |  | ---- src
  |  | ---- test
  |  | ---- JUnit
  |  | ---- Robolectric
  |
  | ---- Test
       | ---- src
            | ---- Instrumentation
            | ---- Robotium 



In addition to a separate module with tests, each module in the project has a folder test , in which unit tests (JUnit or Robolectric ) are stored .

Maven


For me, one of the incentives to try maven was the smaller size of the XML app compared to Ant, and as a result, greater readability and maintainability. However, as is usually the case, what looks compact in a tutorial in practice grows to unrecognizable sizes. So this time, the scripts are overgrown with all Wishlist and become no less Antov. But despite this, in my subjective opinion, reading them is much easier than Ant. In addition, maven, unlike the script-like Ant, offers a declarative paradigm. Those. we do not describe “how” we want to get something, but “what” exactly, but we don’t care how it is received.

Also, in practice, the possibility of dependency management turned out to be a rather tangible advantage, although in Ant it, in principle, is also solved using Ivy. Well, one more jolt towards the ant, as one of the famous ones said: “To program in XML is a strange idea” =)

Go through the POM-files of our modules

Root

Root module of the project. Contains all other modules and configuration pieces common to all modules. Default type of packaging for such modules

 <packaging>pom</packaging> 

Further, various trivia such as the address of the bug tracker, repository addresses, project description, etc. are announced.

Then comes the blocking unit:

  <properties> <project.version.name.number>1.0.0</project.version.name.number> <project.version.code>1</project.version.code> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.emulator.name><!-- TODO emulator name --></project.emulator.name> <project.version.name>${project.version.name.number}-${project.version.name.qualifier}</project.version.name> <project.verbosity>true</project.verbosity> </properties> 




Then a block declaring dependent modules: App, Test and Lib. And then the profile ads section.

Build profiles

As noted in the previous section, an application can be built in several different configurations: production, test and development . Profiles and manage this process. Each profile allows you to overlap the values ​​of various property, plugin settings and other build options. When compiling the project, depending on the active profile, the corresponding build settings will be taken and used in the application. For example, using the processing of resources, thus, you can change the link to the server, which may be different for production and test configurations (more on this below).

You can activate the required profile in IDEA using the Maven plugin.



Or, if the POM is launched from the console or a build server, then the value of the active profile can be passed by specifying an additional parameter. For example, you can build a production application build from the command line with the following command:

mvn install -P production

By default, the development profile is active, so if nothing is added, the dev configuration will be collected.

In addition to the specific settings of the application, such as the settings for connecting to a server or database, the profile determines whether the apk-file is optimized and signed, whether debug mode is enabled and which qualifier will receive the final artifact.

test and development profiles are small in size and their content only sets the application settings (server connection settings). A bit larger in size is the definition of a production profile. It includes setting up the process of signing an application with a certificate.

  <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jarsigner-plugin</artifactId> <executions> <execution> <id>signing</id> <goals> <goal>sign</goal> <goal>verify</goal> </goals> <phase>package</phase> <inherited>true</inherited> <configuration> <archiveDirectory/> <includes> <include>${project.build.directory}/*.apk</include> </includes> <keystore>${project.basedir}/keystore</keystore> <!-- TODO add keystore to project --> <storepass><!-- TODO --></storepass> <keypass><!-- TODO --></keypass> <alias><!-- TODO --></alias> <removeExistingSignatures>true</removeExistingSignatures> <verbose>true</verbose> </configuration> </execution> </executions> </plugin> 


In the settings of the maven-jarsigner-plugin indicated at what point the package will be signed, the path to our keystore and its parameters. By the way, for debugging a script it is very convenient to run it with the -X parameter, for example, mvn install -X . At the same time, maven gives a large amount of debug information, analyzing which you can deal with the problem.

Further in the android-maven-plugin 'e, the debug-mode for the production build is disabled. And the final touch - maven-compiler-plugin includes optimization code production version.

In the build-section of POM, the name of the resulting apk-file is set and various plugins are configured.

Plugins

Then come the plugin settings. The plugin for processing resources, specifying maven-compiler-plugin 'to use Java 6th version, setting up the android-maven-plugin and setting up maven-idea-plugin ' as well.

maven-idea-plugin allows you to download the documentation and source code of project dependencies, which gives us the opportunity to look inside the source code of a platform or library or quickly get acquainted with javadoc (Ctrl + Q). Trifle, but nice! =)

Android maven-plugin

Consider in more detail the setting of the android plugin. The plugin is configured in the same way as all other maven-plugins in the section. //.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
  //. 

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
  //. 

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
  //. 

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
  //. 

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
  //. 

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
  //. 

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
  //. 

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
  //. 

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
  //. 

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
  //. 

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
  //. 

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image

//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image

//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image

//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image

//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image
//.

API .
<sdk> <platform>14</platform> </sdk>


, , ( ).
<manifest> <versionName>${project.version.name}</versionName> <versionCode>${project.version.code}</versionCode> <debuggable>${project.debug.mode}</debuggable> </manifest>

: , . .. TeamCity "" , -no-window .
<emulator> <avd>${project.emulator.name}</avd> <wait>300000</wait><!-- 5 min --> <options>-no-window</options> </emulator>

.
<undeployBeforeDeploy>true</undeployBeforeDeploy>

apk- , -signed-aligned
<zipalign> <skip>false</skip> <verbose>${project.verbosity}</verbose> <outputApk>${project.build.directory}/${project.build.finalName}-signed-aligned.apk</outputApk> </zipalign>

.
<executions> <execution> <id>zipalign</id> <phase>package</phase> <goals> <goal>zipalign</goal> </goals> </execution> <execution> <id>update-manifest</id> <goals> <goal>manifest-update</goal> </goals> </execution> </executions>


POM- App, Test Lib , .

App
. - APK . maven-central, , , .

maven-central Android SDK. , , compatibility package, AdMob SDK .. . Manfried Moser, maven-android-plugin 'a, - Maven Android SDK Deployer , .

. Lib
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-lib</artifactId> <version>1.0.0</version> <type>apklib</type> </dependency>

apklib - Android , . IntelliJ IDEA apklib IDEA- ~ .

, apklib- . IDEA 2- apklib-. maven- , IDEA apk . JetBrains stackoverflow . workaround' maven .



, maven , , , . JetBrains .

.
<sourceDirectory>src</sourceDirectory> <testSourceDirectory>test</testSourceDirectory>


.

Resource filtering
, ( application.properties /assets , XML- /res java /src ), ${property.name} , Maven' POM-. , , . , .

. android-maven-plugin versionName versionCode , . , , , AndroidManifest.xml . resource filtering. .

, Root , APKLIB . Root App , .

/asstets .
<assetsDirectory>${project.build.directory}/filtered-assets</assetsDirectory>

, (. Resource filtering).

, .
<androidManifestFile>${project.build.directory}/AndroidManifest.xml</androidManifestFile>

Lib
APKLIB . jar . . java-, jar, (, , ..), .. Android Library Project , APKLIB .

, .

Test
, . apk . . , .
<dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>apk</type> </dependency> <dependency> <groupId>com.devoxy.android</groupId> <artifactId>template-project-app</artifactId> <version>${project.version}</version> <scope>provided</scope> <type>jar</type> </dependency>


.. -, , , . Maven . pom- AndroidManifest.xml . maven-release-plugin - (ant- ).

, , , - =)

version.properties . ant-target POM- .

test-scopes . Android Testing Framework @SmallTest @MediumTest @LargeTest , instrumentation- . .. integration-, , , TeamCity , . , development @SmallTest ', production . , , maven-android-plugin scope , .. small , medium , large , small medium. . testSize

obfuscating ProGuard


, , Android Maven'

Maven Tutorial Android-maven-plugin: Getting Started Plugin Doc Maven: The Complete Reference from Sonatype. Android Maven Android Archetypes Android-maven-plugin Samples . , NDK Gaug.es "-", , maven'a GitHub for Android GitHub, maven'

UPDATE
serso " APKLIB ". IDEA Android "Run 'process-resources' Maven task before Make" "Compile resources by IDE".

image

Source: https://habr.com/ru/post/152279/


All Articles