Skip to content

Latest commit

 

History

History
53 lines (45 loc) · 1.28 KB

SETUP_GRADLE.md

File metadata and controls

53 lines (45 loc) · 1.28 KB

Steeps for GraalVM support with Gradle

  1. Add flamingock dependencies
implementation("io.flamingock:mongodb-sync-v4-driver:$flamingockVersion")
implementation("io.flamingock:flamingock-core:$flamingockVersion")
implementation("io.flamingock:flamingock-graalvm:$flamingockVersion")
  1. Add flamingock annotation processor
annotationProcessor("io.flamingock:flamingock-core:$flamingockVersion")
  1. Add plugin manager to settings.gradle.kts
pluginManagement {
    repositories {
        mavenLocal()
        gradlePluginPortal()
        mavenCentral()
    }
}
  1. Add the flamingock configuration file to resource-config.json
{
  "resources": {
    "includes": [
      {
        "pattern": "META-INF/flamingock-metadata.json"
      }
    ]
  }
}
  1. 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
  1. Run native image
./flamingock-graalvm-example-1.0-SNAPSHOT