| LEFT | RIGHT |
| 1 Adblock Plus for Android | 1 Adblock Plus Library for Android |
| 2 ======================== | 2 ======================== |
| 3 | 3 |
| 4 An Android app that runs a proxy to block ads. | 4 An Android library project that runs a proxy to block ads. |
| 5 | 5 |
| 6 Updating the dependencies | 6 Updating the dependencies |
| 7 ------------------------- | 7 ------------------------- |
| 8 | 8 |
| 9 Adblock Plus for Android has dependencies that aren't in this repository. | 9 Adblock Plus Library for Android has dependencies that aren't in this repository
. |
| 10 To update those, call: | 10 To update those, call: |
| 11 | 11 |
| 12 ./ensure_dependencies.py | 12 ./ensure_dependencies.py |
| 13 | 13 |
| 14 Buildling with Ant | 14 ## Library |
| 15 |
| 16 Building with Ant |
| 15 ------------------ | 17 ------------------ |
| 16 | 18 |
| 17 ### Requirements | 19 ### Requirements |
| 18 | 20 |
| 19 - [The Android SDK](http://developer.android.com/sdk) | 21 * [The Android SDK](http://developer.android.com/sdk) |
| 20 - [The Android NDK](https://developer.android.com/tools/sdk/ndk) | 22 * [The Android NDK](https://developer.android.com/tools/sdk/ndk) |
| 21 - [Ant](http://ant.apache.org) | 23 * [Ant](http://ant.apache.org) |
| 22 | 24 |
| 23 ### Building | 25 ### Building |
| 24 | 26 |
| 25 In the 'adblockplusandroid' and 'libadblockplus-android' directories create the
files _local.properties_ and set | 27 In the 'libadblockplus-android' directory create the file _local.properties_ and
set |
| 26 _sdk.dir_ and _ndk.dir_ to where you installed it, e.g.: | 28 _sdk.dir_ and _ndk.dir_ to where you installed it, e.g.: |
| 27 | 29 |
| 28 sdk.dir = /some/where/sdk | 30 sdk.dir = /some/where/sdk |
| 29 ndk.dir = /some/where/ndk | 31 ndk.dir = /some/where/ndk |
| 30 | 32 |
| 31 Then run: | 33 Then run: |
| 32 | 34 |
| 33 ant debug | 35 ant debug |
| 34 | 36 |
| 35 ### Running | 37 Building with Maven |
| 36 | 38 ------------------- |
| 37 Connect an Android device or start the Android Emulator, then run: | |
| 38 | |
| 39 ant debug install | |
| 40 | |
| 41 Finally, you can run _Adblock Plus_ from the launcher. | |
| 42 | |
| 43 Building with Maven (library only): | |
| 44 ----------------------------------- | |
| 45 | 39 |
| 46 ### Requirements | 40 ### Requirements |
| 47 | 41 |
| 48 Make sure all Ant requirements (above) are respected. | 42 All 'Building with Ant' requirements and additional requirements: |
| 43 |
| 44 * [Maven](https://maven.apache.org) |
| 49 | 45 |
| 50 ### Building | 46 ### Building |
| 51 | 47 |
| 48 Set environment variable ANDROID_HOME to your Android SDK directory or pass it i
n command-line (below). |
| 52 In the 'libadblockplus-android' directory run: | 49 In the 'libadblockplus-android' directory run: |
| 53 | 50 |
| 54 » mvn clean install | 51 » mvn clean install [-Dandroid.sdk.path=/some/where/sdk] |
| 55 | 52 |
| 56 This will generate *.aar library artifact in the 'target' directory. | 53 This will generate *.aar library artifact in the 'target' directory. |
| 57 | 54 |
| 58 Building with Eclipse | 55 ## Library tests |
| 59 --------------------- | |
| 60 | 56 |
| 61 ### Requirements | 57 ### Requirements |
| 62 | 58 |
| 63 - [The Android SDK](http://developer.android.com/sdk) | 59 Make sure _Library_ requirements are present. |
| 64 - [The Android NDK](https://developer.android.com/tools/sdk/ndk) | |
| 65 - [Eclipse](https://www.eclipse.org) | |
| 66 - [Android Developer Tools for Eclipse](http://developer.android.com/tools/sdk/e
clipse-adt.html) | |
| 67 (both _Developer Tools_ and _NDK Plugins_) | |
| 68 | 60 |
| 69 ### Building | 61 ### Building |
| 70 | 62 |
| 71 1. Ensure the `NDKROOT` environment variable points to your NDK directory. | 63 Set ANDROID_HOME environment variable to your Android SDK directory. |
| 72 2. Select _Import_ in the _File_ menu, then _Existing Android Projects Into Work
space_. | |
| 73 3. Select the project directory (_adblockplusandroid_) as _Root Directory_. | |
| 74 4. Select the projects _Adblock Plus_, _library_ and _android-switch-backport_. | |
| 75 5. Revert any local changes to _.classpath_ in _adblockplusandroid_ | |
| 76 and _adblockplusandroid/submodules/android-switch-backport_. | |
| 77 | 64 |
| 78 ### Running | 65 In the 'libadblockplus-android-tests' directory run: |
| 79 | 66 |
| 80 1. Connect an Android device or start the Android Emulator. | 67 ant instrument |
| 81 2. In Eclipse, select the _Adblock Plus_ project, then run it as an | |
| 82 _Android Application_. | |
| 83 | 68 |
| 84 ### Testing | 69 ### Testing |
| 85 | 70 |
| 86 1. Connect an Android device or start the Android Emulator. | 71 1. Connect an Android device or start the Android Emulator. |
| 87 2. In the 'libadblockplus-android-tests' directory run: | 72 2. In the 'libadblockplus-android-tests' directory run: |
| 88 | 73 |
| 89 ant instrument install test | 74 ant instrument install test |
| 90 | 75 |
| 91 to build instrumentation tests app and perform testing or run: | 76 to build instrumentation tests app and perform testing or run: |
| 92 | 77 |
| 93 ant test | 78 ant test |
| 94 | 79 |
| 95 to run installed instrumentation tests app | 80 to run installed instrumentation tests app. |
| LEFT | RIGHT |