Index: README.md |
=================================================================== |
--- a/README.md |
+++ b/README.md |
@@ -10,16 +10,26 @@ |
./ensure_dependencies.py |
## Library |
An Android library that provides the core functionality of Adblock Plus. |
You can find it in the 'adblock-android' directory. |
+### Using as a Gradle dependency |
+ |
+Make sure you have `jcenter()` in the list of repositories and then add the following dependency: |
+ |
+```groovy |
+dependencies { |
+ implementation 'org.adblockplus:adblock-android:3.0' |
+} |
+``` |
+ |
### Building |
#### Requirements |
* [The Android SDK](https://developer.android.com/sdk) |
* Android SDK Build tools 25.0.0 |
* [The Android NDK, 16b](https://developer.android.com/ndk) |
@@ -81,46 +91,46 @@ |
Put prebuilt shared V8 library file(s) in ARCH directories and set `SHARED_V8_LIB_FILENAMES` |
environment variable and `SHARED_V8_LIB_DIR` before building. |
You can pass multiple filenames in `SHARED_V8_LIB_FILENAMES`, separated with space. |
Libadblockplus is required to be linked with that library file(s). |
For example: |
SHARED_V8_LIB_FILENAMES=libv8.cr.so SHARED_V8_LIB_DIR="/tmp/shared_v8" ./gradlew clean assembleAbi_arm |
- |
+ |
or |
SHARED_V8_LIB_FILENAMES="libv8.cr.so libv8_libbase.cr.so libv8_libplatform.cr.so" SHARED_V8_LIB_DIR="/tmp/shared_v8" ./gradlew clean assembleAbi_arm |
- |
+ |
for multiple library files. |
Note |
- |
+ |
[Configuration] Excluding shared v8 library libv8.cr.so from AAR |
... |
[Configuration] Linking dynamically with shared v8 library /tmp/shared_v8/release/libv8.cr.so |
... |
output while building. |
### Building for single ARCH |
By default adblock-android is built for both ARM and x86 and it can be filtered when |
building end-user android application. However sometimes it can be desired to build |
"adblock-android.aar" for single ARCH. |
Pass `abi_arm` or `abi_x86` to build it for single arch or `abi_all` for all ARCHs: |
`./gradlew clean assembleAbi_arm` |
- |
+ |
Note |
[Configuration] Using adblock-android ABI flavor: abi_arm |
- |
+ |
output while building. |
## Library tests |
Android tests for the library. |
You can find them in the 'adblock-android-tests' directory. |
### Requirements |
@@ -143,16 +153,26 @@ |
## Settings |
An Android library that provides a configuration interface for Adblock Plus. |
You can find it in the 'adblock-android-settings' directory: |
* GeneralSettingsFragment - main fragment |
* WhitelistedDomainsSettingsFragment - whitelisted domains fragment |
+### Using as a Gradle dependency |
+ |
+Make sure you have `jcenter()` in the list of repositories and then add the following dependency: |
+ |
+```groovy |
+dependencies { |
+ implementation 'org.adblockplus:adblock-android-settings:3.0' |
+} |
+``` |
+ |
### Usage |
Create `AdblockEngineProvider` instance and `AdblockSettingsStorage` instance. |
You can use `SharedPrefsStorage` implementation to store settings in `SharedPreferences`. |
Or you can use AdblockHelper: |
AdblockHelper |
.get() |
@@ -225,16 +245,26 @@ |
An Android library that provides a WebView component with Adblock Plus integrated. |
You can find it in the 'adblock-android-webview' directory. |
`AdblockWebView` class provides built-in ad blocking |
(both resource loading filtering and element hiding) and inherits from Android |
['WebView'](https://developer.android.com/reference/android/webkit/WebView.html). |
+### Using as a Gradle dependency |
+ |
+Make sure you have `jcenter()` in the list of repositories and then add the following dependency: |
+ |
+```groovy |
+dependencies { |
+ implementation 'org.adblockplus:adblock-android-webview:3.0' |
+} |
+``` |
+ |
### Usage |
In layout XML: |
<org.adblockplus.libadblockplus.android.webview.AdblockWebView |
android:id="@+id/main_webview" |
android:layout_width="match_parent" |
android:layout_height="match_parent"/> |