Skip to content

deontologic/javafxmobile-plugin

 
 

Repository files navigation

javafxmobile-plugin Build Status Maven Central

The javafxmobile-plugin is a gradle plugin that unifies the building of Java and JavaFX applications for different target platforms:

  • desktop
  • android
  • ios

Getting started

The easiest way to get started is by using the Gluon IDE plugin for your IDE:

Once the IDE plugin is installed, you can create a new Gluon Mobile project.

Prerequisites

General

Building your project requires Java 9. Make sure to set the source and target compatibility to Java 8 to make your applications deployable on Android.

sourceCompatibility = 1.8
targetCompatibility = 1.8

Android

  1. The Android SDK command line tools, available here

  2. Use the sdkmanager command line tool to install the following packages:

    ANDROID_SDK/tools/bin/sdkmanager "platform-tools" "build-tools;27.0.3" "platforms;android-25" "extras;android;m2repository" "extras;google;m2repository"
    
  3. Define a global gradle property named ANDROID_HOME inside ~/.gradle/gradle.properties that points to the location of the Android SDK:

    ANDROID_HOME=/path/to/android-sdk-directory
    

iOS

  1. A Mac with MacOS X 10.13.2 or superior

  2. Xcode 9.2 or superior, available from the Mac App Store

  3. To deploy on an iOS device, the usbmuxd library, a cross-platform software library that talks the protocols to support iOS devices. Install it with the use of Homebrew:

    brew install usbmuxd
    
  4. It is highly recommended to increase the Java stack size, by adding the following option to the ~/.gradle/gradle.properties file:

    org.gradle.jvmargs=-Xms256m -Xmx4096m -Xss2m
    

Usage

If you create your project without the use of the IDE plugins, add the following to your build.gradle:

buildscript {
    repositories {
        jcenter()
        google()
        maven {
            url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
        }
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:2.0.0'
    }
}

apply plugin: 'org.javafxports.jfxmobile'

Java 9

Full Java 9 support is in an experimental phase and is currently only supported on iOS.

License

This project is licensed under the 3-Clause BSD license.

About

A gradle plugin for building mobile applications in java.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 67.1%
  • Groovy 32.9%