Left: | ||
Right: |
LEFT | RIGHT |
---|---|
1 Adblock Plus Library for Android | 1 Adblock Plus Library for Android |
2 ======================== | 2 ======================== |
3 | 3 |
4 An Android library project 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 Library 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: |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 mvn clean install [-Dandroid.sdk.path=/some/where/sdk] | 51 mvn clean install [-Dandroid.sdk.path=/some/where/sdk] |
52 | 52 |
53 This will generate *.aar library artifact in the 'target' directory. | 53 This will generate *.aar library artifact in the 'target' directory. |
54 | 54 |
55 Building with Gradle/Android Studio | 55 Building with Gradle/Android Studio |
56 ----------------------------------- | 56 ----------------------------------- |
57 | 57 |
58 ### Requirements | 58 ### Requirements |
59 | 59 |
60 * [The Android SDK](http://developer.android.com/sdk) | 60 * [The Android SDK](http://developer.android.com/sdk) |
61 * Android SDK Build tools 22.0.1 | 61 * 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
| |
62 * [The Android NDK](https://developer.android.com/tools/sdk/ndk) | 62 * [The Android NDK](https://developer.android.com/tools/sdk/ndk) |
63 | 63 |
64 Edit 'buildToolsVersion' in 'build.gradle' files if necessary. | 64 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.
| |
65 | 65 |
66 ### Building from command-line | 66 ### Building from command-line |
67 | 67 |
68 In the project root directory create the file _local.properties_ and set | 68 In the project root directory create the file _local.properties_ and set |
69 _sdk.dir_ and _ndk.dir_ to where you installed it, e.g.: | 69 _sdk.dir_ and _ndk.dir_ to where you installed it, e.g.: |
70 | 70 |
71 sdk.dir = /some/where/sdk | 71 sdk.dir = /some/where/sdk |
72 ndk.dir = /some/where/ndk | 72 ndk.dir = /some/where/ndk |
73 | 73 |
74 In the project root directory run: | 74 In the project root directory run: |
75 | 75 |
76 ./gradlew assembleDebug | 76 ./gradlew assembleDebug |
77 | 77 |
78 This will generate *.aar library artifact in 'libadblockplus-android/build/outpu ts/aar/' directory. | 78 This will generate *.aar library artifact in the 'libadblockplus-android/build/o utputs/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
| |
79 | 79 |
80 ## Library tests | 80 ## Library tests |
81 | 81 |
82 ### Requirements | 82 ### Requirements |
83 | 83 |
84 Make sure _Library_ requirements are present. | 84 Make sure _Library_ requirements are present. |
85 | 85 |
86 ### Building with Ant | 86 ### Building with Ant |
87 | 87 |
88 Set ANDROID_HOME environment variable to your Android SDK directory. | 88 Set ANDROID_HOME environment variable to your Android SDK directory. |
(...skipping 26 matching lines...) Expand all Loading... | |
115 To run specific **test method** run: | 115 To run specific **test method** run: |
116 | 116 |
117 ant testOnly -DtestClass=full.test.class.name#testMethod | 117 ant testOnly -DtestClass=full.test.class.name#testMethod |
118 | 118 |
119 For example: | 119 For example: |
120 | 120 |
121 ant testOnly -DtestClass=org.adblockplus.libadblockplus.tests.NotificationTe st#testAddNotification | 121 ant testOnly -DtestClass=org.adblockplus.libadblockplus.tests.NotificationTe st#testAddNotification |
122 | 122 |
123 ### Building with Gradle/Android Studio | 123 ### Building with Gradle/Android Studio |
124 | 124 |
125 Make sure you've created _local.properties_ file to build the library (see above ). | 125 Make sure you've created the _local.properties_ file to build the library (see a bove). |
Felix Dahlke
2016/11/18 07:17:42
Wording nit: "you've created THE [...] file".
| |
126 In the project root directory run: | 126 In the project root directory run: |
127 | 127 |
128 ./gradlew assembleDebugAndroidTest | 128 ./gradlew assembleDebugAndroidTest |
129 | 129 |
130 This will generate *.apk in 'libadblockplus-android-tests/build/outputs/apk/' di rectory. | 130 This will generate *.apk in the 'libadblockplus-android-tests/build/outputs/apk/ ' directory. |
Felix Dahlke
2016/11/18 07:17:42
Wording nit: "in THE [...] directory"
| |
131 | 131 |
132 ### Testing with Gradle/Android Studio | 132 ### Testing with Gradle/Android Studio |
133 | 133 |
134 You can select test class/method and click 'Run ..Test'. The library and test ap p will be | 134 You can select test class/method and click 'Run ..Test'. The library and test ap p will be |
135 compiled, installed to emuator/device and launched automatically. | 135 compiled, installed to emulator/device and launched automatically. |
LEFT | RIGHT |