Skip to content

Instantly share code, notes, and snippets.

@ashokgelal
Last active December 14, 2015 00:59
Show Gist options
  • Save ashokgelal/5002448 to your computer and use it in GitHub Desktop.
Save ashokgelal/5002448 to your computer and use it in GitHub Desktop.

Installation

Clone this Gist, copy in dropbox-android-sdk.jar file from Dropbox SDK. Change version in POMs if you need it, then run mvn clean install.

Usage

<dependency>
  <artifactId>android-sdk</artifactId>
  <version>1.5</version>
  <groupId>com.dropbox</groupId>
</dependency>

Dependencies

Version 1.5 of Dropbox Android SDK includes a list of libraries that seems to be in the Android dependency:

  • commons-logging;
  • httpclient;
  • httpcore.

Also I have no idea how JUnit could be a dependency of a runtime library (and even then Android uses JUnit 3 for testing, not JUnit 4).

I set these dependencies for the Dropbox Android SDK (both of them have newer versions, but I looked at versions from SDK):

  • httpmime;
  • json-simple.
<?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>
<prerequisites>
<maven>3.0.0</maven>
</prerequisites>
<name>Dropbox Android SDK Deployer</name>
<artifactId>dropbox-android-sdk-deployer</artifactId>
<version>1.0</version>
<groupId>com.dropbox</groupId>
<packaging>pom</packaging>
<properties>
<dropbox.android.sdk.artifactId>android-sdk</dropbox.android.sdk.artifactId>
<dropbox.android.sdk.version>1.5.3</dropbox.android.sdk.version>
<dropbox.android.sdk.groupId>com.dropbox</dropbox.android.sdk.groupId>
<dropbox.android.sdk.jar.path>dropbox-android-sdk.jar</dropbox.android.sdk.jar.path>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<artifactId>${dropbox.android.sdk.artifactId}</artifactId>
<version>${dropbox.android.sdk.version}</version>
<groupId>${dropbox.android.sdk.groupId}</groupId>
<packaging>jar</packaging>
<file>${dropbox.android.sdk.jar.path}</file>
<generatePom>false</generatePom>
<pomFile>sdk-pom.xml</pomFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Dropbox Android SDK</name>
<artifactId>android-sdk</artifactId>
<version>1.5.3</version>
<groupId>com.dropbox</groupId>
<dependencies>
<dependency>
<artifactId>httpmime</artifactId>
<version>4.0.3</version>
<groupId>org.apache.httpcomponents</groupId>
<exclusions>
<exclusion>
<artifactId>httpclient</artifactId>
<groupId>org.apache.httpcomponents</groupId>
</exclusion>
<exclusion>
<artifactId>httpcore</artifactId>
<groupId>org.apache.httpcomponents</groupId>
</exclusion>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>json-simple</artifactId>
<version>1.1</version>
<groupId>com.googlecode.json-simple</groupId>
</dependency>
</dependencies>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment