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

Unified Diff: libadblockplus-android/build.gradle

Issue 29349720: Issue 4324 - Add Gradle build config (Closed)
Patch Set: fixes in README Created Nov. 21, 2016, 8:14 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
« no previous file with comments | « libadblockplus-android-tests/build.gradle ('k') | settings.gradle » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libadblockplus-android/build.gradle
diff --git a/libadblockplus-android/build.gradle b/libadblockplus-android/build.gradle
new file mode 100644
index 0000000000000000000000000000000000000000..9cfcb2d04d18c4efd2519c12f83b9b9147a157c3
--- /dev/null
+++ b/libadblockplus-android/build.gradle
@@ -0,0 +1,72 @@
+apply plugin: 'com.android.model.library'
+
+model {
+
+ repositories {
+ libs(PrebuiltLibraries) {
+ libadblockplus {
+ headers.srcDir 'jni/libadblockplus-binaries/include/'
+ binaries.withType(SharedLibraryBinary) {
+ sharedLibraryFile = file("jni/libadblockplus-binaries/android_${targetPlatform.getName()}/libadblockplus.a")
+ }
+ }
+
+ v8_base {
+ headers.srcDir 'jni/libadblockplus-binaries/include/'
+ binaries.withType(SharedLibraryBinary) {
+ sharedLibraryFile = file("jni/libadblockplus-binaries/android_${targetPlatform.getName()}/libv8_base.a")
+ }
+ }
+
+ v8_snapshot {
+ headers.srcDir 'jni/libadblockplus-binaries/include/'
+ binaries.withType(SharedLibraryBinary) {
+ sharedLibraryFile = file("jni/libadblockplus-binaries/android_${targetPlatform.getName()}/libv8_snapshot.a")
+ }
+ }
+ }
+ }
+
+ android {
+ compileSdkVersion 16
+ buildToolsVersion "22.0.1"
+
+ ndk {
+ moduleName = "adblockplus-jni"
+ cppFlags.add("-std=c++11")
+ cppFlags.add("-fexceptions")
+ stl = "c++_static"
+
+ abiFilters.addAll(['armeabi-v7a', 'x86']) // supported abis only
+ }
+
+ defaultConfig {
+ minSdkVersion.apiLevel 9
+ targetSdkVersion.apiLevel 16
+ versionCode 359
+ versionName "1.3"
+ }
+
+ sources {
+ main {
+ manifest {
+ source {
+ srcDir '.'
+ include 'AndroidManifest.xml'
+ }
+ }
+ java { source { srcDirs = ['src'] } }
+ resources { source { srcDirs = ['src'] } }
+ res { source { srcDirs = ['res'] } }
+ jni {
+ source { srcDirs = ['jni'] }
+ dependencies {
+ library "libadblockplus"
+ library "v8_base"
+ library "v8_snapshot"
+ }
+ }
+ }
+ }
+ }
+}
« no previous file with comments | « libadblockplus-android-tests/build.gradle ('k') | settings.gradle » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld