Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

ndkmapping

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

NDK Mapping

A tool for make class mapping between JVM (use kotlin) and JNI.

It makes the development of JNI much convenient.


Usage:

Generate JNI Code:

pascal
ndkmapping <options> <Kotlin Class File Path>

    options:
        -l language (cpp, pas)
        -b build option (mk, mksh)
        -m max array size (must >= 0)
        -o output path

Sample:

pascal
ndkmapping -l cpp -b mksh -m 100 -a kotlin -o ./out/ ./classes/

Generate Test Code:

pascal
ndktester <options> <Kotlin Class File Path>

  options:
    -l language (java, kotlin)
    -x exported JNI code language (cpp, pas)
    -b build option (mk, mkshcp)
    -p base package name
    -c copy path
    -o output path

Sample:

pascal
ndktester -l kotlin -x cpp -b mkshcp -p com.sample.ndk -c ./jniLibs/ -o ./out/ ./classes/

You may use the generated code directly in real project or try the sample project(Click Download).


Build:

To build the NDKMapping and NDKTester, download CodeTyphon and install it on your Linux or Mac.

You may open the lpr or lpi with CodeTyphon and compile it.