Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #65

Merged
merged 7 commits into from Apr 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
97 changes: 59 additions & 38 deletions README.md
Expand Up @@ -7,6 +7,11 @@ so it can directly be executed as a native application on the target platform.
[![Travis CI](https://api.travis-ci.org/gluonhq/client-gradle-plugin.svg?branch=master)](https://travis-ci.org/gluonhq/client-gradle-plugin)
[![BSD-3 license](https://img.shields.io/badge/license-BSD--3-%230778B9.svg)](https://opensource.org/licenses/BSD-3-Clause)

# Important Notice

Gluon releases the [Client plugin for Maven](https://github.com/gluonhq/client-maven-plugin), and this plugin is maintained and kept up to date by the community.

Use at your own risk.

## Getting started

Expand All @@ -18,7 +23,7 @@ Using the `plugins` DSL, add:


plugins {
id 'com.gluonhq.client-gradle-plugin' version '0.0.20'
id 'com.gluonhq.client-gradle-plugin' version '0.1.20'
}

This requires adding the plugin repository to the `settings.gradle` file:
Expand All @@ -28,6 +33,7 @@ This requires adding the plugin repository to the `settings.gradle` file:
maven {
url "https://nexus.gluonhq.com/nexus/content/repositories/releases"
}

gradlePluginPortal()
}
}
Expand All @@ -45,10 +51,11 @@ Alternatively, you can use the `buildscript` DSL:
}
}
dependencies {
classpath 'com.gluonhq:client-gradle-plugin:0.0.20'
classpath 'com.gluonhq:client-gradle-plugin:0.1.20'
}
}
apply plugin: 'com.gluonhq.client-gradle-plugin'


### 2. Tasks

Expand Down Expand Up @@ -104,63 +111,77 @@ It will create a distributable native application.

#### `nativePackage`

Create a package of the executable in the target platform
On mobile only, create a package of the executable in the target platform

Run:

./gradlew nativePackage

For instance, on iOS, this can be used to create an IPA
On iOS, this can be used to create an IPA, on Android it will create an APK.


#### `nativeInstall`

Installs the generated package that was created after `nativePackage`.
On mobile only, installs the generated package that was created after `nativePackage`.

Run:

./gradlew nativeInstall

### Requirements

#### Mac OS X and iOS

* Download this version of Graal VM: https://download2.gluonhq.com/substrate/graalvm/graalvm-svm-darwin-20.1.0-ea+28.zip and unpack it like you would any other JDK. (e.g. in `/opt`)

### 3. Specify plugin extensions

Only if you need to, you can modify the default settings, by specifying
the required extensions that the project uses in your `build.gradle` file:

gluonClient {
target = "host"
graalLibsVersion = "20.0.0-ea+12"
graalLibsPath = ""
javaStaticSdkVersion = "11-ea+6"
javafxStaticSdkVersion = "13-ea+7"
bundlesList = []
resourcesList = []
reflectionList = []
jniList = []
delayInitList = []
releaseSymbolsList = []
verbose = false
attachConfig {
version = "4.0.2"
services ''
configuration = "implementation"
}
}

### Requirements
* Configure the runtime environment. Set `GRAALVM_HOME` environment variable to the GraalVM installation directory.

For example:

export GRAALVM_HOME=/opt/graalvm-svm-darwin-20.1.0-ea+28

* Set `JAVA_HOME` to point to the GraalVM installation directory

For example:

export JAVA_HOME=$GRAALVM_HOME

By default `target` is set to `host`. To deploy to iOS, set the target:

```
gluonClient {
target = "ios"
}
```

#### Linux and Android

* Download this version of Graal VM: https://download2.gluonhq.com/substrate/graalvm/graalvm-svm-linux-20.1.0-ea+28.zip and unpack it like you would any other JDK. (e.g. in `/opt`)

* Configure the runtime environment. Set `GRAALVM_HOME` environment variable to the GraalVM installation directory.

For example:

export GRAALVM_HOME=/opt/graalvm-svm-linux-20.1.0-ea+28

At this moment the plugin is in beta, and supports Linux, Mac OS X and iOS platforms for now.
* Set `JAVA_HOME` to point to the GraalVM installation directory

To use the plugin to develop and deploy native applications on Mac or iOS platforms, you need a Mac with MacOS X 10.13.2 or superior, and Xcode 9.2 or superior, available from the Mac App Store. Once Xcode is downloaded and installed, open it and accept the license terms.
For example:

For now, only JDK 11 is supported. Any JDK 11 distribution that doesn't bundle JavaFX is valid, like:
export JAVA_HOME=$GRAALVM_HOME

- [OpenJDK 11.0.2](https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_osx-x64_bin.tar.gz)
By default `target` is set to `host`. To deploy to Android, set the target:

- [AdoptOpenJDK 11.0.3](https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.3%2B7/OpenJDK11U-jdk_x64_mac_hotspot_11.0.3_7.tar.gz)
```
gluonClient {
target = "android"
}
```

Once downloaded and installed, set `JAVA_HOME` pointing to that JDK 11.
## Issues and Contributions ##

Check the [documentation](https://docs.gluonhq.com/client) for more details about the plugin and running the [gradle samples](https://github.com/gluonhq/client-samples/tree/master/Gradle).
Issues can be reported to the [Issue tracker](https://github.com/gluonhq/client-gradle-plugin/issues)

Contributions can be submitted via [Pull requests](https://github.com/gluonhq/client-gradle-plugin/pulls),
providing you have signed the [Gluon Individual Contributor License Agreement (CLA)](https://docs.google.com/forms/d/16aoFTmzs8lZTfiyrEm8YgMqMYaGQl0J8wA0VJE2LCCY)
(See [What is a CLA and why do I care](https://www.clahub.com/pages/why_cla) in case of doubt).