Files
2025-11-05 22:58:29 +00:00

29 lines
672 B
Kotlin

plugins {
id("langchain.java")
application
}
repositories {
mavenCentral()
}
dependencies {
implementation(project(":langchain-java"))
}
tasks.withType<JavaCompile>().configureEach {
// Allow using more modern APIs, like `List.of` and `Map.of`, in examples.
options.release.set(9)
}
application {
// Use `./gradlew :langchain-java-example:run` to run `Main`
// Use `./gradlew :langchain-java-example:run -Pexample=Something` to run `SomethingExample`
mainClass = "com.langchain.smith.example.${
if (project.hasProperty("example"))
"${project.property("example")}Example"
else
"Main"
}"
}