简体   繁体   English

与org.javafxports有什么区别?jfxmobile-plugin 1.3.16和2.0.30

[英]what is the diference over org.javafxports » jfxmobile-plugin 1.3.16 and 2.0.30

与org.javafxports jfxmobile-plugin 1.3.16和2.0.30的区别是什么?我尝试将1.3.16版本更新为2.0.30,但未编译项目

The jfxmobile-plugin is a gradle plugin that unifies the building of Java and JavaFX applications for different target platforms: jfxmobile-plugin是一个gradle插件,用于统一针对不同目标平台的Java和JavaFX应用程序的构建:

  • desktop 桌面
  • android 安卓
  • ios ios
  • embedded 嵌入式的

JFXMobile plugin comes in two flavors: JFXMobile插件有两种形式:

jfxmobile 1.3.16 jfxmobile 1.3.16

See Maven central , and its repository . 请参阅Maven Central及其存储库

Samples: See Gluon Mobile samples 样本:请参阅Gluon Mobile 样本

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 jfxmobile 2.0.30

See Maven central , and its repository . 请参阅Maven Central及其存储库

Samples for Gluon VM: See Gluon Mobile with Gluon VM samples . Gluon VM的样本 :请参阅带有Gluon VM 样本的 Gluon Mobile。

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: 如您在插件2.x的自述文件中所看到的:

javafxmobile-plugin version 1.x brought Java 8 to mobile development. javafxmobile-plugin版本1.x将Java 8带入了移动开发。 Version 2.x is an upgrade of the plugin that enables Java 9 development by leveraging Gluon VM. 版本2.x是该插件的升级,可以通过利用Gluon VM来进行Java 9开发。

And: 和:

Gluon VM is still in active development and is at the moment only supported on iOS devices. Gluon VM仍在积极开发中,目前仅在iOS设备上受支持。

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). 如果您要开发用于生产的应用程序,请使用稳定的1.x版本以及Java 8(适用于Android和iOS),其中大多数Java 7 SE API都可用,并且还支持一些Java 8 API(像lambdas)。 Streams are not supported though. 虽然不支持流。

If you want to experiment with Java 9 features, use the new 2.x version. 如果要尝试Java 9功能,请使用新的2.x版本。 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. 它支持Streams和Java9。请注意,在Android上,不支持Java 9 API,它必须与Java 8兼容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM