Runtime Java compiler plugin for DroidScript. It can also compile jar files to dex file.
Note
Minimum required Android version: 8 (SDK 26).
After installing the plugin, you can use the example in the documentation to get started.
These two libraries are mandatory:
Open and compile the project with AndroidIDE or Android Studio.
It can be imported into DroidScript with this example:
Start the terminal in the project folder: ~/AndroidStudioProjects/JavaCompiler
cd app/build/outputs/apk/debug
rm -r temp
mkdir temp
unzip app-debug.apk -d temp
cd temp
zip JavaCompiler.jar classes*.dex
cp -r assets/* .
zip JavaCompiler.ppk JavaCompiler* android.jar
adb push JavaCompiler.ppk /sdcard/Android/data/com.smartphoneremote.androidscriptfree/files/DroidScript/Plugins/JavaCompiler.ppk
echo COMPLETED
Now (re)open DroidScript and wait for the "plugin loaded" message.
- Unzip the APK.
- Add the
classes.dex
files to a zip file namedJavaCompiler.jar
. - Then add the
JavaCompiler.jar
file and the contents of theassets
folder to a zip file namedJavaCompiler.ppk
. - Open
JavaCompiler.ppk
with DroidScript.
The JavaCompiler.ppk
file should look like this
JavaCompiler.ppk/
- JavaCompiler.jar
- JavaCompiler.html
- JavaCompiler.inc
- android.jar
You can check this repo to create the document: DroidScript/Docs. The code for the current document is in document.js. After building the document you can drop it into the assets folder.