From 7236f2cd019d655be16ce70375db25c530d646f4 Mon Sep 17 00:00:00 2001 From: Josh Guilfoyle Date: Mon, 2 Feb 2015 11:29:59 -0800 Subject: [PATCH] Add README instructions for using JAR files from Stetho's build system Without Maven repository support, the integration steps are a little more involved, requiring developers to build the artifacts locally and copy/rename them into their project's `libs/` directory. It is also required to reference `commons-cli` manually because there is no dependency resolution when dealing with jar files. This can be simplified greatly once the project is fully open by uploading artifacts to Maven central or BinTray's jcenter. --- README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/README.md b/README.md index 998bf5d5..4005933c 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,34 @@ easily create your own! ![dumpapp prefs Screenshot](https://github.com/facebook/stetho/raw/master/docs/images/dumpapp-prefs.png) ## Integration + +### Add library code +Assemble the JAR files locally using: + +```shell +./gradlew assemble +``` + +Copy the relevant jar files to your `libs/` directory. Only the main `stetho` +jar file is strictly required, however you may wish to copy +`stetho-urlconnection` or `stetho-okhttp` for simplified network integration. +Also take note that you will need to rename the jar files to avoid conflicts. +The jar files are located in their respective `build` directories: + +```shell +./stetho/build/intermediates/bundles/debug/classes.jar +./stetho-urlconnection/build/intermediates/bundles/debug/classes.jar +./stetho-okhttp/build/intermediates/bundles/debug/classes.jar +``` + +You will also need Apache's `commons-cli` library, which you can access from +`build.gradle`: + +```groovy +compile 'commons-cli:commons-cli:1.2' +``` + +### Set-up Integrating with Stetho is intended to be seamless and straightforward for most existing Android applications. There is a simple initialization step which occurs in your `Application` class: