diff --git a/modules/juce_audio_devices/native/java/com/roli/juce/JuceMidiSupport.java b/modules/juce_audio_devices/native/java/app/com/roli/juce/JuceMidiSupport.java similarity index 100% rename from modules/juce_audio_devices/native/java/com/roli/juce/JuceMidiSupport.java rename to modules/juce_audio_devices/native/java/app/com/roli/juce/JuceMidiSupport.java diff --git a/modules/juce_core/native/java/README.txt b/modules/juce_core/native/java/README.txt index 88be61c18a..612d87cefd 100644 --- a/modules/juce_core/native/java/README.txt +++ b/modules/juce_core/native/java/README.txt @@ -1,19 +1,42 @@ -The java code in the module's native/java subfolders were used to generate dex byte-code in various places in the JUCE framework. These are the steps required to re-generate the dex byte-code from any java source code inside the native/java subfolders: +The Java code in the module's native/java subfolders have been used to generate +dex byte-code in various places in the JUCE framework. These are the steps +required to re-generate the dex byte-code from any Java source code inside the +native/java subfolders: -1. Create a new JUCE android project with the minimal sdk version which is required for the java source code you wish to compile. -2. Move the the .java files that you wish to create source code for, into the module's native/javacore/app folder. Remember that .java files need to be in nested sub-folders which resemble their package, i.e. a Java class com.roli.juce.HelloWorld.java should be in the module's native/javacore/app/com/roli/juce folder. -3. Build your project with AS and run. The app will now use the source code in the folder creates in step 2 - so you can debug your java code this way. -4. Once everything is working, rebuild your app in release mode. -5. Go to your app's Builds/Android folder. Inside there you will find app/build/intermediates/classes/release_/release. Inside of that folder, you will find all your java byte-code compiled classes. Remove any classes that you are not interested in (typically you'll find Java.class, JuceApp.class and JuceSharingContentProvider.class which you will probably want to remove). -6. Inside of app/build/intermediates/classes/release_/release execute the following dx command: +1. Create a new JUCE android project with the minimal sdk version which is +required for the Java source code you wish to compile. - /build-tools//dx --dex --verbose --min-sdk-version= --output /tmp/JavaDexByteCode.dex . +2. If you are creating byte-code for new .java files, move the new files into +the native/javacore/app folder of the module, or create one if it doesn't +exist. Remember that .java files need to be in nested sub-folders which +resemble their package, i.e. a Java class com.roli.juce.HelloWorld.java +should be in the module's native/javacore/app/com/roli/juce folder. +If you wish to modify existing .java files in the JUCE modules then just rename +native/java to native/javacore. +3. Build your project with AS and run. The app will now use the source code in +the folder created in step 2 so you can debug your Java code this way. - Replace with the minimal sdk version you used in step 1. +4. Once everything is working rebuild your app in release mode. + +5. Go to your app's Builds/Android folder. Inside there you will find +build/intermediates/javac/release_Release/compileRelease_ReleaseJavaWithJavac/classes. +Inside of that folder, you will find all your Java byte-code compiled classes. +Remove any classes that you are not interested in (typically you'll find +Java.class, JuceApp.class and JuceSharingContentProvider.class which you will +probably want to remove). + +6. Inside of app/build/intermediates/classes/release_/release execute the +following dx command: + + /build-tools//dx --dex --verbose --min-sdk-version= --output /tmp/JavaDexByteCode.dex . + + (Replace with the minimal sdk version you used in step 1.) 7. gzip the output: -gzip /tmp/JavaDexByteCode.dex + gzip /tmp/JavaDexByteCode.dex -8. The output /tmp/JavaDexByteCode.dex.gz is now the byte code that can be included into JUCE. You can use the Projucer's BinaryData generator functionality to get this into a convenient char array like form. +8. The output /tmp/JavaDexByteCode.dex.gz is now the byte code that can be +included into JUCE. You can use the Projucer's BinaryData generator +functionality to get this into a convenient char array like form. diff --git a/modules/juce_core/native/java/com/roli/juce/FragmentOverlay.java b/modules/juce_core/native/java/app/com/roli/juce/FragmentOverlay.java similarity index 100% rename from modules/juce_core/native/java/com/roli/juce/FragmentOverlay.java rename to modules/juce_core/native/java/app/com/roli/juce/FragmentOverlay.java diff --git a/modules/juce_core/native/java/com/roli/juce/JuceHTTPStream.java b/modules/juce_core/native/java/app/com/roli/juce/JuceHTTPStream.java similarity index 100% rename from modules/juce_core/native/java/com/roli/juce/JuceHTTPStream.java rename to modules/juce_core/native/java/app/com/roli/juce/JuceHTTPStream.java diff --git a/modules/juce_gui_basics/native/java/com/roli/juce/ComponentPeerView.java b/modules/juce_gui_basics/native/java/app/com/roli/juce/ComponentPeerView.java similarity index 100% rename from modules/juce_gui_basics/native/java/com/roli/juce/ComponentPeerView.java rename to modules/juce_gui_basics/native/java/app/com/roli/juce/ComponentPeerView.java diff --git a/modules/juce_gui_extra/native/java/com/roli/juce/JuceWebView.java b/modules/juce_gui_extra/native/java/app/com/roli/juce/JuceWebView.java similarity index 100% rename from modules/juce_gui_extra/native/java/com/roli/juce/JuceWebView.java rename to modules/juce_gui_extra/native/java/app/com/roli/juce/JuceWebView.java diff --git a/modules/juce_opengl/native/java/com/roli/juce/JuceOpenGLView.java b/modules/juce_opengl/native/java/app/com/roli/juce/JuceOpenGLView.java similarity index 100% rename from modules/juce_opengl/native/java/com/roli/juce/JuceOpenGLView.java rename to modules/juce_opengl/native/java/app/com/roli/juce/JuceOpenGLView.java diff --git a/modules/juce_video/native/java/com/roli/juce/CameraCaptureSessionCaptureCallback.java b/modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionCaptureCallback.java similarity index 100% rename from modules/juce_video/native/java/com/roli/juce/CameraCaptureSessionCaptureCallback.java rename to modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionCaptureCallback.java diff --git a/modules/juce_video/native/java/com/roli/juce/CameraCaptureSessionStateCallback.java b/modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionStateCallback.java similarity index 100% rename from modules/juce_video/native/java/com/roli/juce/CameraCaptureSessionStateCallback.java rename to modules/juce_video/native/java/app/com/roli/juce/CameraCaptureSessionStateCallback.java diff --git a/modules/juce_video/native/java/com/roli/juce/CameraDeviceStateCallback.java b/modules/juce_video/native/java/app/com/roli/juce/CameraDeviceStateCallback.java similarity index 100% rename from modules/juce_video/native/java/com/roli/juce/CameraDeviceStateCallback.java rename to modules/juce_video/native/java/app/com/roli/juce/CameraDeviceStateCallback.java diff --git a/modules/juce_video/native/java/com/roli/juce/JuceOrientationEventListener.java b/modules/juce_video/native/java/app/com/roli/juce/JuceOrientationEventListener.java similarity index 100% rename from modules/juce_video/native/java/com/roli/juce/JuceOrientationEventListener.java rename to modules/juce_video/native/java/app/com/roli/juce/JuceOrientationEventListener.java diff --git a/modules/juce_video/native/java/com/roli/juce/MediaControllerCallback.java b/modules/juce_video/native/java/app/com/roli/juce/MediaControllerCallback.java similarity index 100% rename from modules/juce_video/native/java/com/roli/juce/MediaControllerCallback.java rename to modules/juce_video/native/java/app/com/roli/juce/MediaControllerCallback.java diff --git a/modules/juce_video/native/java/com/roli/juce/MediaSessionCallback.java b/modules/juce_video/native/java/app/com/roli/juce/MediaSessionCallback.java similarity index 100% rename from modules/juce_video/native/java/com/roli/juce/MediaSessionCallback.java rename to modules/juce_video/native/java/app/com/roli/juce/MediaSessionCallback.java diff --git a/modules/juce_video/native/java/com/roli/juce/SystemVolumeObserver.java b/modules/juce_video/native/java/app/com/roli/juce/SystemVolumeObserver.java similarity index 100% rename from modules/juce_video/native/java/com/roli/juce/SystemVolumeObserver.java rename to modules/juce_video/native/java/app/com/roli/juce/SystemVolumeObserver.java