Skip to main content

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

Hi Benjamin,

even with Android Studio 1.0 released and using Gradle as an Android build makes dependency management much easier. There is currently no direkt Gradle support for ADT [1] but ADT can be configured to build Android Gradle projects. So I am not sure how to go with that.

Sandro


Am 12.12.2014 um 11:09 schrieb Benjamin Cabé <benjamin@xxxxxxxxxxx>:

Hi Sandro,

Cool, thanks!
Actually, I think it’d be great if you’d directly contribute your version of the sample using Gerrit? [1] I don’t know though if it’d make sense to try and maintain a sample compatible with both ADT and Android Studio/Gradle, or just go for a Gradle only version…

Benjamin –




De : Sandro Kock <sandro.kock@xxxxxxxxx>
Répondre à : General development discussions for paho project <paho-dev@xxxxxxxxxxx>
Date : vendredi 12 décembre 2014 10:58
À : <paho-dev@xxxxxxxxxxx>
Objet : [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



_______________________________________________ paho-dev mailing list paho-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/paho-dev
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev


Back to the top