This project provides a Gradle plugin for RIFE2 applications.
Using this plugin in your project can be done by adding the following to your
Gradle build.gradle.kts
file:
plugins {
application
id("com.uwyn.rife2") version "1.2.0"
// ...
}
NOTE: the RIFE2 Gradle plugin relies on the presence of the
application
plugin
Afterwards, the rife2
extension becomes available, and you can use it like
this:
rife2 {
version.set("1.8.0") // set the RIFE2 version to use
useAgent.set(true) // set whether to run with the RIFE2 agent
uberMainClass.set("hello.AppUber") // set a different main class to use for the UberJar
precompiledTemplateTypes.add(HTML) // template types that should be pre-compiled
templateDirectories.from(file("src/main/templates")) // additional template directories to use
includeServerDependencies.set(true) // set whether to include the embedded server deps
}
The usual run
, test
, jar
tasks are still available, the RIFE2 plugins adds
the following:
precompileTemplates
: performs the template pre-compilation of the activated typesuberJar
: creates an Uber Jar with everything to run your application standalone
When your project uses the GraalVM Gradle plugin, the RIFE2 Gradle plugin will automatically configure the GraalVM plugin to properly include the web application resources into the native image.
Thanks for using RIFE2!
If you have any questions, suggestions, ideas or just want to chat, feel free to post on the forums, to join me on Discord or to connect with me on Mastodon.