Collection of Gradle plugins for Jooby applications.
Run, debug and reload applications.
buildscript {
repositories {
mavenCentral()
}
dependencies {
/** joobyRun */
classpath group: 'org.jooby', name: 'jooby-gradle-plugin', version: '1.0.0'
}
}
apply plugin: 'jooby'
}gradle joobyRunPrints something similar to:
>>> jooby:run[info|main]: Hotswap available on: /my-app
>>> jooby:run[info|main]: includes: [**/*.class,**/*.conf,**/*.properties,*.js, src/*.js]
>>> jooby:run[info|main]: excludes: []
INFO [2015-03-31 17:47:33,000] [dev@netty]: App server started in 401ms
GET /assets/** [*/*] [*/*] (anonymous)
GET / [*/*] [*/*] (anonymous)
listening on:
http://localhost:8080/The joobyRun tool restart the application every time a change is detected on:
- classes (*.class)
- config files (*.conf and *.properties)
Changes on templates and/or static files (*.html, *.js, *.css) wont restart the application, because they are not compiled or cached while running on application.env = dev.
It's worth to mention that dynamic reload of classes is done via JBoss Modules.
joobyRun {
mainClassName = 'com.mycompany.App'
compiler = 'on'
includes = ['**/*.class', '**/*.conf', '**/*.properties']
excludes = []
logLevel = 'info'
}A Gradle property that contains the fully qualified name of the main class. Required.
The compiler is on by default, unless:
-
A
.classpathfile is present in the project directory. If present, means you're a Eclipse user and we turn off the compiler and let Eclipse recompiles the code on save. -
The compiler is set to
off.
On compilation success, the application is effectively reloaded.
On compilation error, the application won't reload.
Compilation success or error messages are displayed in the console (not at the browser).
List of file patterns to listen for file changes.
This is a Gradle task for the [asset module](assets module). The [asset module](assets module) validate, concatenate, minify or compress JavaScript and CSS assets.
buildscript {
repositories {
mavenCentral()
}
dependencies {
/** jooby:run */
classpath group: 'org.jooby', name: 'jooby-gradle-plugin', version: '1.0.0.CR7'
}
}
apply plugin: 'jooby'
}gradle joobyAssetsjoobyAssets {
maxAge = '365d'
}Specify the max age cache header, default is: `365d```
This is a Gradle task for the route spec module. The route spec module allows you to export your API/microservices outside a Jooby application.
buildscript {
repositories {
mavenCentral()
}
dependencies {
/** jooby:run */
classpath group: 'org.jooby', name: 'jooby-gradle-plugin', version: '1.0.0.CR7'
}
}
apply plugin: 'jooby'gradle joobySpecThis task has no options, the .spec file can found at the build/classes/main