diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-03-30 17:49:04 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-03-31 13:00:41 +0200 |
commit | d68576c3785572c1f5d41f83015b8fe6bbcbe9e8 (patch) | |
tree | 431a86edfac640864ba7f406611e8fe9929908cd /platform/android/build.gradle | |
parent | 32cdb2246eeb9e8109a712ec2a5dd2938e30e9b6 (diff) | |
download | mupdf-d68576c3785572c1f5d41f83015b8fe6bbcbe9e8.tar.xz |
Reorganize java and android source.
platform/java and platform/android are reorganized:
platform/java
The new JNI Java classes, mupdf_native.{c,h}, Makefile and Makejar.
platform/java/example
The example desktop viewer classes.
platform/android/viewer
The original demo viewer.
ndk-build is used to build libmupdf_java.so,
making reference to mupdf_native.{c,h} in platform/java.
Diffstat (limited to 'platform/android/build.gradle')
-rw-r--r-- | platform/android/build.gradle | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/platform/android/build.gradle b/platform/android/build.gradle deleted file mode 100644 index 7c1a1ed5..00000000 --- a/platform/android/build.gradle +++ /dev/null @@ -1,89 +0,0 @@ -import org.apache.tools.ant.taskdefs.condition.Os - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:1.2.3' - } -} - -allprojects { - repositories { - jcenter() - } -} - -apply plugin: 'com.android.application' - -dependencies { - compile fileTree(dir: 'libs', include: '*.so') -} - -android { - - compileSdkVersion 17 - buildToolsVersion '21.1.2' - - /* this stops gradle from making it's own Android.mk file */ - sourceSets.main.jni.srcDirs = [] - - sourceSets { - main { - manifest { - srcFile 'AndroidManifest.xml' - } - java { - srcDir 'src' - exclude 'com/artifex/mupdf/fitz/AndroidDrawDevice.java' - } - res { - srcDir 'res' - } - assets { - srcDir 'assets' - } - resources { - srcDir 'src' - } - jniLibs { - srcDir 'libs' - } - } - } - - /* This is important, it will run lint checks but won't abort build */ - lintOptions { - abortOnError false - } - -} - -/* This defines the path to Android's ndk-build. */ -def ndkBuildPath = plugins.getPlugin('com.android.application').sdkHandler.getNdkFolder().absolutePath + File.separator + 'ndk-build' -if (Os.isFamily(Os.FAMILY_WINDOWS)) { - ndkBuildPath +='.cmd' -} - -/* This task builds the native part */ -task buildNative(type: Exec,description: 'Compile JNI source via NDK') { - println('executing buildNative') - commandLine ndkBuildPath, '-C', file('.').absolutePath, ' SUPPORT_GPROOF=1' - //'NDK_PROJECT_PATH=build','APP_BUILD_SCRIPT=src/main/jni/Android.mk'//force using appropriate Makefile -} - -/* This task cleans the native part */ -task cleanNative(type: Exec, description: 'Clean JNI object files') { - println('executing cleanNative') - commandLine ndkBuildPath, '-C', file('.').absolutePath, 'clean' -} - -/* cleaning should also include cleaning native */ -clean.dependsOn 'cleanNative' - -/* building should include native */ -tasks.withType(JavaCompile){ - compileTask -> compileTask.dependsOn buildNative -} - |