Files
java-sdk/hanzo-java-example/build.gradle.kts
2026-09-11 17:55:27 +00:00

30 lines
711 B
Kotlin

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