Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] paho Android Service and Sample App with Gradle

Hey Everyone,

I have been playing around with the paho Android service the last days and wanted to build the Sample App with Gradle. For some reason the org.eclipse.paho.android.service available at [1] includes the android support library v4 as a dependency. 

$ gradle -q :app:dependencies

_debugApk - ## Internal use, do not manually configure ##
+--- com.android.support:support-v4:21.0.3
|    \--- com.android.support:support-annotations:21.0.3
\--- org.eclipse.paho:org.eclipse.paho.android.service:1.0.1-SNAPSHOT
     +--- org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.1-SNAPSHOT
     \--- com.google.android:support-v4:r7

_debugCompile - ## Internal use, do not manually configure ##
+--- com.android.support:support-v4:21.0.3
|    \--- com.android.support:support-annotations:21.0.3
\--- org.eclipse.paho:org.eclipse.paho.android.service:1.0.1-SNAPSHOT
     +--- org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.1-SNAPSHOT
     \--- com.google.android:support-v4:r7
....

compile - Classpath for compiling the main sources.
+--- com.android.support:support-v4:21.0.3
|    \--- com.android.support:support-annotations:21.0.3
\--- org.eclipse.paho:org.eclipse.paho.android.service:1.0.1-SNAPSHOT
     +--- org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.1-SNAPSHOT
     \--- com.google.android:support-v4:r7
     
....     


That is why I had to use 

compile (group: 'org.eclipse.paho', name: 'org.eclipse.paho.android.service', version: '1.0.1-SNAPSHOT') {
  exclude module: 'support-v4'

to properly build the sample App.

All changes I made to the App are available at [2]. 

Maybe this helps someone to build there Android Apps with Gradle and Paho :)

Sandro




Back to the top