Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update android build

  • Loading branch information...
commit 4784fd0d7b253745f45588cdd1de6e21d85aac51 1 parent 281be4e
Colin Edwards DDRBoxman authored
1  .gitignore
View
@@ -22,3 +22,4 @@ dep/libsoldout-1.3/mkd2html
dep/libsoldout-1.3/mkd2latex
dep/libsoldout-1.3/mkd2man
test/*.tst
+*.class
10 platform/android/jni/Android.mk
View
@@ -1,9 +1,17 @@
LOCAL_PATH := $(call my-dir)
+BYPASS_SRC := $(LOCAL_PATH)/../../../src/
+BYPASS_SORUCES := $(wildcard $(BYPASS_SRC)/*.cpp)
include $(CLEAR_VARS)
LOCAL_MODULE := bypass
-LOCAL_SRC_FILES := $(wildcard ../../../src/*.cpp) ../../../dep/libsoldout/markdown.c ../../../dep/libsoldout/buffer.c ../../../dep/libsoldout/array.c
+LOCAL_SRC_FILES := \
+ bypass.cpp \
+ $(subst jni/, , $(BYPASS_SORUCES)) \
+ ../../../dep/libsoldout/markdown.c \
+ ../../../dep/libsoldout/buffer.c \
+ ../../../dep/libsoldout/array.c
+
LOCAL_C_INCLUDES:= ../../dep/libsoldout ../../src
include $(BUILD_SHARED_LIBRARY)
2  platform/android/jni/Application.mk
View
@@ -0,0 +1,2 @@
+APP_ABI := all
+APP_STL := stlport_static
16 platform/android/jni/bypass.cpp
View
@@ -0,0 +1,16 @@
+#include "parser.h"
+#include "in_uncod_android_bypass_Bypass.h"
+
+JNIEXPORT jobject JNICALL Java_in_uncod_android_bypass_Bypass_processMarkdown
+ (JNIEnv *env, jobject o, jstring markdown) {
+
+ const char* str;
+ str = env->GetStringUTFChars(markdown, NULL);
+
+ Bypass::Parser parser;
+ Bypass::Document document = parser.parse(str);
+
+ env->ReleaseStringUTFChars(markdown, str);
+
+ return NULL;
+}
21 platform/android/jni/in_uncod_android_bypass_Bypass.h
View
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class in_uncod_android_bypass_Bypass */
+
+#ifndef _Included_in_uncod_android_bypass_Bypass
+#define _Included_in_uncod_android_bypass_Bypass
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class: in_uncod_android_bypass_Bypass
+ * Method: processMarkdown
+ * Signature: (Ljava/lang/String;)Lin/uncod/android/bypass/Document;
+ */
+JNIEXPORT jobject JNICALL Java_in_uncod_android_bypass_Bypass_processMarkdown
+ (JNIEnv *, jobject, jstring);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
9 platform/android/src/in/uncod/android/bypass/Bypass.java
View
@@ -0,0 +1,9 @@
+package in.uncod.android.bypass;
+
+public class Bypass {
+ static {
+ System.loadLibrary("spandown");
+ }
+
+ private native Document processMarkdown(String markdown);
+}
5 platform/android/src/in/uncod/android/bypass/Document.java
View
@@ -0,0 +1,5 @@
+package in.uncod.android.bypass;
+
+public class Document {
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.