Files
keycloak-webjar-provider/build-theme-example.gradle

33 lines
998 B
Groovy
Raw Normal View History

2025-06-27 17:14:25 +02:00
/**
* This is an example Gradle build file for demonstrating how to use the plugin in a theme project
*
* You can use this as a base when building your Keycloak theme with webjars
*/
apply plugin: 'java-library'
configurations {
webjar
}
dependencies {
// Examples of how to include webjars (these are not required to build the extension)
webjar 'org.webjars.npm:hyperscript.org:0.9.8'
webjar 'org.webjars.npm:htmx.org:1.9.2'
webjar 'org.webjars:uikit:3.17.9'
}
/**
* Example task to compose the provider plugin and all webjars into a single directory that can be mounted (or copy &
* pasted) into the Keycloak docker image. See docker-compose.yml for example.
*/
tasks.register("composeProviders", Copy) {
group = 'keycloak'
from project.configurations.webjar
from project.tasks.jar
into project.layout.buildDirectory.dir("providers")
duplicatesStrategy "exclude"
doFirst{
delete project.layout.buildDirectory.dir("providers")
}
}