openai/openai-java
Publicmirrored from https://github.com/openai/openai-javaAvailable
openai-java-example/build.gradle.kts
29lines · modeblame
ff05dec4Tomer Aberbach1 years ago | 1 | plugins { |
d6a37429stainless-app[bot]1 years ago | 2 | id("openai.java") |
7f960e72stainless-app[bot]1 years ago | 3 | application |
ff05dec4Tomer Aberbach1 years ago | 4 | } |
| 5 | | |
817fc11astainless-app[bot]1 years ago | 6 | repositories { |
| 7 | mavenCentral() | |
| 8 | } | |
| 9 | | |
7f960e72stainless-app[bot]1 years ago | 10 | dependencies { |
| 11 | implementation(project(":openai-java")) | |
817fc11astainless-app[bot]1 years ago | 12 | implementation("com.azure:azure-identity:1.15.0") |
ff05dec4Tomer Aberbach1 years ago | 13 | } |
| 14 | | |
d6a37429stainless-app[bot]1 years ago | 15 | tasks.withType<JavaCompile>().configureEach { |
7f960e72stainless-app[bot]1 years ago | 16 | // Allow using more modern APIs, like `List.of` and `Map.of`, in examples. |
d6a37429stainless-app[bot]1 years ago | 17 | options.release.set(11) |
7f960e72stainless-app[bot]1 years ago | 18 | } |
ff05dec4Tomer Aberbach1 years ago | 19 | |
7f960e72stainless-app[bot]1 years ago | 20 | application { |
067258e8stainless-app[bot]1 years ago | 21 | // Use `./gradlew :openai-java-example:run` to run `Main` |
d9e9bb99stainless-app[bot]12 months ago | 22 | // Use `./gradlew :openai-java-example:run -Pexample=Something` to run `SomethingExample` |
067258e8stainless-app[bot]1 years ago | 23 | mainClass = "com.openai.example.${ |
| 24 | if (project.hasProperty("example")) | |
| 25 | "${project.property("example")}Example" | |
| 26 | else | |
| 27 | "Main" | |
| 28 | }" | |
ff05dec4Tomer Aberbach1 years ago | 29 | } |