openai/openai-java

Public

mirrored from https://github.com/openai/openai-javaAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v4.20.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

openai-java-core/build.gradle.kts

64lines · modecode

1plugins {
2 id("java")
3 id("openai.kotlin")
4 id("openai.publish")
5}
6
7configurations.all {
8 resolutionStrategy {
9 // Compile and test against a lower Jackson version to ensure we're compatible with it. Note that
10 // we generally support 2.13.4, but test against 2.14.0 because 2.13.4 has some annoying (but
11 // niche) bugs (users should upgrade if they encounter them). We publish with a higher version
12 // (see below) to ensure users depend on a secure version by default.
13 force("com.fasterxml.jackson.core:jackson-core:2.14.0")
14 force("com.fasterxml.jackson.core:jackson-databind:2.14.0")
15 force("com.fasterxml.jackson.core:jackson-annotations:2.14.0")
16 force("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.14.0")
17 force("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.0")
18 force("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.0")
19 }
20}
21
22dependencies {
23 api("com.fasterxml.jackson.core:jackson-core:2.18.2")
24 api("com.fasterxml.jackson.core:jackson-databind:2.18.2")
25 api("com.google.errorprone:error_prone_annotations:2.33.0")
26 api("io.swagger.core.v3:swagger-annotations:2.2.31")
27
28 implementation("com.fasterxml.jackson.core:jackson-annotations:2.18.2")
29 implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.18.2")
30 implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.18.2")
31 implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.18.2")
32 implementation("org.apache.httpcomponents.core5:httpcore5:5.2.4")
33 implementation("org.apache.httpcomponents.client5:httpclient5:5.3.1")
34 implementation("com.github.victools:jsonschema-generator:4.38.0")
35 implementation("com.github.victools:jsonschema-module-jackson:4.38.0")
36 implementation("com.github.victools:jsonschema-module-swagger-2:4.38.0")
37
38 testImplementation(kotlin("test"))
39 testImplementation(project(":openai-java-client-okhttp"))
40 testImplementation("com.github.tomakehurst:wiremock-jre8:2.35.2")
41 testImplementation("org.assertj:assertj-core:3.27.7")
42 testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.3")
43 testImplementation("org.junit.jupiter:junit-jupiter-params:5.9.3")
44 testImplementation("org.junit-pioneer:junit-pioneer:1.9.1")
45 testImplementation("org.mockito:mockito-core:5.14.2")
46 testImplementation("org.mockito:mockito-junit-jupiter:5.14.2")
47 testImplementation("org.mockito.kotlin:mockito-kotlin:4.1.0")
48}
49
50if (project.hasProperty("graalvmAgent")) {
51 java {
52 toolchain {
53 languageVersion.set(JavaLanguageVersion.of(21))
54 vendor.set(JvmVendorSpec.GRAAL_VM)
55 }
56 }
57
58 tasks.test {
59 maxParallelForks = 1
60 forkEvery = 0
61 jvmArgs =
62 listOf("-agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image")
63 }
64}
65