Moved install-android-sdk-windows to it's own Maven module

This causes the install not to be triggered for every module but only
once. In addition we don't need to comment the activation condition and
uncomment it on the release branch.
This commit is contained in:
Steffen Schaefer committed 2015-11-26 16:45:41 +01:00
1 parent 3d996854ca
commit d549d23ef4
4 files changed
+127 -92

No files matched your search

+107
View File
@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>workspace</artifactId>
<groupId>com.sap.sailing</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>install-android-sdk</artifactId>
<packaging>pom</packaging>
<profiles>
<profile>
<id>install-android-sdk-windows</id>
<activation>
<file>
<missing>${ldi.android.sdk.location}/platform-tools/adb.exe</missing>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>install-android-sdk</id>
<phase>initialize</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>android-sdk-windows</artifactId>
<version>${ldi.download.android.sdk.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.parent.location}</outputDirectory>
<includes>**/*</includes>
</artifactItem>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>platform-tools-windows</artifactId>
<version>${ldi.download.android.platform-tools.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.location}</outputDirectory>
<includes>**/*</includes>
</artifactItem>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>build-tools-windows</artifactId>
<version>${ldi.download.android.build-tools.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.location}/build-tools</outputDirectory>
<includes>**/*</includes>
</artifactItem>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>android</artifactId>
<version>${ldi.download.android.platform.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.location}/platforms</outputDirectory>
<includes>**/*</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>move_platform_dir</id>
<phase>initialize</phase>
<configuration>
<tasks>
<move file="${ldi.android.sdk.location}/platforms/android-${android.api.version}"
tofile="${ldi.android.sdk.location}/platforms/android-${android.platform.version}"/>
<move file="${ldi.android.sdk.location}/build-tools/android-${ldi.android.build-tools.version}"
tofile="${ldi.android.sdk.location}/build-tools/${ldi.download.android.build-tools.version}"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
+8
View File
@@ -265,6 +265,14 @@
<properties>
<p2-target>race-analysis-p2-empty</p2-target>
</properties>
<dependencies>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>install-android-sdk</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
+8
View File
@@ -286,6 +286,14 @@
<properties>
<build.tag>${env.BUILD_TAG} (${env.GIT_BRANCH} : ${env.GIT_COMMIT})</build.tag>
</properties>
<dependencies>
<dependency>
<groupId>com.sap.sailing</groupId>
<artifactId>install-android-sdk</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
<profile>
+4 -92
View File
@@ -32,98 +32,7 @@
<module>ios</module>
</modules>
</profile>
<profile>
<id>install-android-sdk-windows</id>
<activation>
<!-- TODO activate on release build branch -->
<!-- <file>
<missing>${ldi.android.sdk.location}/platform-tools/adb.exe</missing>
</file> -->
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>install-android-sdk</id>
<phase>initialize</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>android-sdk-windows</artifactId>
<version>${ldi.download.android.sdk.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.parent.location}</outputDirectory>
<includes>**/*</includes>
</artifactItem>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>platform-tools-windows</artifactId>
<version>${ldi.download.android.platform-tools.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.location}</outputDirectory>
<includes>**/*</includes>
</artifactItem>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>build-tools-windows</artifactId>
<version>${ldi.download.android.build-tools.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.location}/build-tools</outputDirectory>
<includes>**/*</includes>
</artifactItem>
<artifactItem>
<groupId>com.google.download.android</groupId>
<artifactId>android</artifactId>
<version>${ldi.download.android.platform.version}</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${ldi.android.sdk.location}/platforms</outputDirectory>
<includes>**/*</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>move_platform_dir</id>
<phase>initialize</phase>
<configuration>
<tasks>
<move file="${ldi.android.sdk.location}/platforms/android-${android.api.version}"
tofile="${ldi.android.sdk.location}/platforms/android-${android.platform.version}"/>
<move file="${ldi.android.sdk.location}/build-tools/android-${ldi.android.build-tools.version}"
tofile="${ldi.android.sdk.location}/build-tools/${ldi.download.android.build-tools.version}"/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>leandi</id>
<activation>
@@ -131,6 +40,9 @@
<name>ldi.releaseBuild</name>
</property>
</activation>
<modules>
<module>install-android-sdk</module>
</modules>
<properties>
<android.api.groupId>com.google.download.android</android.api.groupId>
<android.api.version>5.1.1</android.api.version>