- Add flamingock dependencies
implementation("io.flamingock:mongodb-sync-v4-driver:$flamingockVersion")
implementation("io.flamingock:flamingock-core:$flamingockVersion")
implementation("io.flamingock:flamingock-graalvm:$flamingockVersion")
- Add flamingock annotation processor
annotationProcessor("io.flamingock:flamingock-core:$flamingockVersion")
- Add plugin manager to
settings.gradle.kts
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
mavenCentral()
}
}
- Add the flamingock configuration file to
resource-config.json
{
"resources": {
"includes": [
{
"pattern": "META-INF/flamingock-metadata.json"
}
]
}
}
- Build application
./gradlew clean build
6.Create native image
native-image --no-fallback --features=io.flamingock.graalvm.RegistrationFeature -H:ResourceConfigurationFiles=resource-config.json -H:+ReportExceptionStackTraces --initialize-at-build-time=org.slf4j.simple.SimpleLogger,org.slf4j.LoggerFactory,org.slf4j.impl.StaticLoggerBinder -jar build/libs/flamingock-graalvm-example-0.0.1-SNAPSHOT.jar
- Run native image
./flamingock-graalvm-example-1.0-SNAPSHOT