Installation
Core Library
Section titled “Core Library”Gradle (Kotlin DSL)
Section titled “Gradle (Kotlin DSL)”dependencies { implementation("org.drivine:drivine4j:0.1.0")}Gradle (Groovy)
Section titled “Gradle (Groovy)”dependencies { implementation 'org.drivine:drivine4j:0.1.0'}<dependency> <groupId>org.drivine</groupId> <artifactId>drivine4j</artifactId> <version>0.1.0</version></dependency>Code Generation (For the Type-Safe Query DSL)
Section titled “Code Generation (For the Type-Safe Query DSL)”If you want to use the object manager with the type-safe query DSL, you need to add the code generation processor.
Note for Java Projects: Both Java and Kotlin are fully supported at runtime. The code generator (KSP) produces Kotlin DSL extensions, but a Java-friendly query builder API is also available. Define your
@GraphViewand@NodeFragmentclasses in either language. See the Java Interoperability section for details.
Gradle (Kotlin DSL)
Section titled “Gradle (Kotlin DSL)”plugins { id("com.google.devtools.ksp") version "2.2.20-2.0.4" kotlin("jvm") version "2.2.0"}
kotlin { compilerOptions { // Required for context parameters DSL freeCompilerArgs.addAll("-Xcontext-parameters") }}
dependencies { implementation("org.drivine:drivine4j:0.1.0") ksp("org.drivine:drivine4j-codegen:0.1.0")}<build> <plugins> <plugin> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-maven-plugin</artifactId> <version>2.2.0</version> <configuration> <compilerPlugins> <compilerPlugin>ksp</compilerPlugin> </compilerPlugins> <args> <!-- Required for context parameters DSL --> <arg>-Xcontext-parameters</arg> </args> </configuration> <dependencies> <!-- KSP extension for Maven --> <dependency> <groupId>com.dyescape</groupId> <artifactId>kotlin-maven-symbol-processing</artifactId> <version>1.6</version> </dependency>
<!-- Drivine code generator --> <dependency> <groupId>org.drivine</groupId> <artifactId>drivine4j-codegen</artifactId> <version>0.1.0</version> </dependency> </dependencies> </plugin> </plugins></build>Note: Maven support for KSP uses the third-party kotlin-maven-symbol-processing extension.

