A Java JNI wrapper for libtidy.
Current: v0.2
- basic HTML / XML tiding, and not breaking things
- Android support and an example app
Next: v0.3
- Control over memory usage
Currently one need to copy code (lib/src/main), CMake configuration (lib/CMakeLists.txt),
and a few gradle tasks (in lib/build.gradle) to use from another Java project.
// I am not sure how should one "publish" native code for traditional Java, or how do Java developers consume them. (If you are familiar of this, creating a issue is more than welcome.)
Currently one need to copy related files to Android module. See android-demo/ for an example.
All public APIs of tidyj are thread-safe.
libtidy cares little about thread and concurrency stuff:
all code just run on caller thread, and do nothing after return. Not all its APIs are thread safe.
We handle that in tidyj.
Currently (before v0.3), underlying tidylib uses free / memory
to allocate memory in completely non-managed native heap.
To build the native code, CMake, make and configured C/C++ (both) compilers are required.
# after clone, fetch libtidy as dependcies
$ git submodule init
$ git submodule update
# `test` task will run cmake and make as needed
# If test runs, the build should be fine.
$ ./gradlew lib:testMIT
I am open to help of any kind. If you find something interesting (can | need) to be be done, feel free to create a issue.