问题
what is the diference over org.javafxports jfxmobile-plugin 1.3.16 and 2.0.30 I try update the version 1.3.16 to 2.0.30 but not compile project
回答1:
The jfxmobile-plugin is a gradle plugin that unifies the building of Java and JavaFX applications for different target platforms:
- desktop
- android
- ios
- embedded
JFXMobile plugin comes in two flavors:
jfxmobile 1.3.16
See Maven central, and its repository.
Samples: See Gluon Mobile samples
A typical build:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.16'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
dependencies {
compile 'com.gluonhq:charm:5.0.0'
}
jfxmobile 2.0.30
See Maven central, and its repository.
Samples for Gluon VM: See Gluon Mobile with Gluon VM samples.
A typical build:
buildscript {
repositories {
google()
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:2.0.30'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
compile 'com.gluonhq:charm:5.0.0-jdk9'
androidRuntime 'com.gluonhq:charm:5.0.0'
}
Differences
As you can see in the readme for plugin 2.x:
javafxmobile-plugin version 1.x brought Java 8 to mobile development. Version 2.x is an upgrade of the plugin that enables Java 9 development by leveraging Gluon VM.
And:
Gluon VM is still in active development and is at the moment only supported on iOS devices.
Currently it is under developer preview.
Summary
If you want to develop an application for production, use the stable 1.x version, with Java 8, for both Android and iOS, where most of the Java 7 SE APIs are available, and a few Java 8 APIs are supported as well (like lambdas). Streams are not supported though.
If you want to experiment with Java 9 features, use the new 2.x version. It supports Streams, and Java 9. Note that on Android Java 9 APIs are not supported and it has to be compatible with Java 8.
来源:https://stackoverflow.com/questions/53889358/what-is-the-diference-over-org-javafxports-jfxmobile-plugin-1-3-16-and-2-0-30