gradle-javaee-plugin
is a Gradle plugin to automate the process of generating the optimized jar bundle.
The generated jar bundle can be used for deployment to ICON networks that support the Java SCORE execution environment (a.k.a. JavaEE).
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'foundation.icon:gradle-javaee-plugin:0.7.8'
}
}
repositories {
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'foundation.icon.javaee'
The optimizedJar
task type extends from Gradle's Jar
type.
This means that all attributes and methods available on Jar
are also available on optimizedJar
.
Refer the Gradle User Guide for Jar for details.
mainClassName
property is required to indicate the entry point that is used for the initial execution.
This property will be included into the generated jar bundle with the Main-Class
header in the manifest.
optimizedJar {
mainClassName = 'com.iconloop.score.example.HelloWorld'
}
The deployJar
extension can be used to deploy the optimized jar to local or remote ICON networks that support the Java SCORE execution environment.
deployJar {
endpoints {
local {
uri = 'http://localhost:9082/api/v3'
nid = 3
}
}
keystore = './mykey.json'
password = 'keypass'
parameters {
arg('name', 'Alice')
}
}
The above extension creates deployToLocal
task automatically based on the container name of the given endpoints property.
This project is available under the Apache License, Version 2.0.