Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: README.md

Issue 29349720: Issue 4324 - Add Gradle build config (Closed)
Patch Set: now ignoring .gradle directory Created Nov. 7, 2016, 7:20 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« .hgignore ('K') | « .hgignore ('k') | build.gradle » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: README.md
diff --git a/README.md b/README.md
index 4a78cef4f72945bd29fd910cb68b89e41ec22c18..ce2d29c550de70be4b3c4cb51557e0fd95199477 100644
--- a/README.md
+++ b/README.md
@@ -52,13 +52,38 @@ In the 'libadblockplus-android' directory run:
This will generate *.aar library artifact in the 'target' directory.
+Building with Gradle/Android Studio
+-----------------------------------
+
+### Requirements
+
+* [The Android SDK](http://developer.android.com/sdk)
+* Android SDK Build tools 22.0.1
Felix Dahlke 2016/11/18 07:17:42 Any reason we refer to a specific build tools vers
anton 2016/11/21 08:15:39 It's a good question and honestly i don't remember
Felix Dahlke 2016/11/21 08:55:33 So how I understand that, it works just fine with
+* [The Android NDK](https://developer.android.com/tools/sdk/ndk)
+
+Edit 'buildToolsVersion' in 'build.gradle' files if necessary.
Felix Dahlke 2016/11/18 07:17:42 "files" - is there more than one? Also, does build
anton 2016/11/21 08:15:39 Yes, there are multiple `build.gradle` files - in
Felix Dahlke 2016/11/21 08:55:33 Acknowledged.
+
+### Building from command-line
+
+In the project root directory create the file _local.properties_ and set
+_sdk.dir_ and _ndk.dir_ to where you installed it, e.g.:
+
+ sdk.dir = /some/where/sdk
+ ndk.dir = /some/where/ndk
+
+In the project root directory run:
+
+ ./gradlew assembleDebug
+
+This will generate *.aar library artifact in 'libadblockplus-android/build/outputs/aar/' directory.
Felix Dahlke 2016/11/18 07:17:43 Unrelated, but I think it'd also be helpful to poi
Felix Dahlke 2016/11/18 07:17:43 Wording nit: "artifact in THE [...] directory."
anton 2016/11/21 08:15:39 Acknowledged.
anton 2016/11/21 08:15:39 Acknowledged.
anton 2016/11/21 12:29:51 When compiling with Ant no aar is created. It just
+
## Library tests
### Requirements
Make sure _Library_ requirements are present.
-### Building
+### Building with Ant
Set ANDROID_HOME environment variable to your Android SDK directory.
@@ -66,7 +91,7 @@ In the 'libadblockplus-android-tests' run:
ant instrument
-### Testing
+### Testing with Ant
1. Connect an Android device or start the Android Emulator.
2. In the 'libadblockplus-android-tests' directory run:
@@ -93,4 +118,18 @@ To run specific **test method** run:
For example:
- ant testOnly -DtestClass=org.adblockplus.libadblockplus.tests.NotificationTest#testAddNotification
+ ant testOnly -DtestClass=org.adblockplus.libadblockplus.tests.NotificationTest#testAddNotification
+
+### Building with Gradle/Android Studio
+
+Make sure you've created _local.properties_ file to build the library (see above).
Felix Dahlke 2016/11/18 07:17:42 Wording nit: "you've created THE [...] file".
+In the project root directory run:
+
+ ./gradlew assembleDebugAndroidTest
+
+This will generate *.apk in 'libadblockplus-android-tests/build/outputs/apk/' directory.
Felix Dahlke 2016/11/18 07:17:42 Wording nit: "in THE [...] directory"
+
+### Testing with Gradle/Android Studio
+
+You can select test class/method and click 'Run ..Test'. The library and test app will be
+compiled, installed to emuator/device and launched automatically.
« .hgignore ('K') | « .hgignore ('k') | build.gradle » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld