|
| 1 | +plugins { |
| 2 | + id 'java' |
| 3 | +} |
| 4 | + |
| 5 | +java { |
| 6 | + toolchain { |
| 7 | + languageVersion = JavaLanguageVersion.of(17) |
| 8 | + } |
| 9 | +} |
| 10 | + |
| 11 | +repositories { |
| 12 | + mavenCentral() |
| 13 | + mavenLocal() |
| 14 | +} |
| 15 | + |
| 16 | +dependencies { |
| 17 | + // Braintrust SDK (local project dependencies) |
| 18 | + testImplementation project(':braintrust-sdk') |
| 19 | + testImplementation project(':braintrust-sdk:instrumentation:openai_2_8_0') |
| 20 | + testImplementation project(':braintrust-sdk:instrumentation:anthropic_2_2_0') |
| 21 | + testImplementation project(':braintrust-sdk:instrumentation:genai_1_18_0') |
| 22 | + testImplementation project(':braintrust-sdk:instrumentation:langchain_1_8_0') |
| 23 | + testImplementation project(':braintrust-sdk:instrumentation:springai_1_0_0') |
| 24 | + |
| 25 | + // Jackson for JSON processing |
| 26 | + testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.16.1' |
| 27 | + |
| 28 | + // OpenAI SDK |
| 29 | + testImplementation 'com.openai:openai-java:2.8.1' |
| 30 | + |
| 31 | + // Anthropic SDK |
| 32 | + testImplementation 'com.anthropic:anthropic-java:2.10.0' |
| 33 | + |
| 34 | + // Gemini SDK |
| 35 | + testImplementation 'org.springframework.ai:spring-ai-google-genai:1.1.0' |
| 36 | + |
| 37 | + // Spring AI (OpenAI + Anthropic providers) |
| 38 | + testImplementation 'org.springframework.ai:spring-ai-openai:1.1.3' |
| 39 | + testImplementation 'org.springframework.ai:spring-ai-anthropic:1.1.3' |
| 40 | + testRuntimeOnly 'org.springframework:spring-webflux:6.2.3' |
| 41 | + testRuntimeOnly 'io.projectreactor.netty:reactor-netty-http:1.2.3' |
| 42 | + testImplementation 'org.apache.httpcomponents.client5:httpclient5:5.3.1' |
| 43 | + |
| 44 | + // LangChain4j |
| 45 | + testImplementation 'dev.langchain4j:langchain4j:1.9.1' |
| 46 | + testImplementation 'dev.langchain4j:langchain4j-http-client:1.9.1' |
| 47 | + testImplementation 'dev.langchain4j:langchain4j-open-ai:1.9.1' |
| 48 | + |
| 49 | + // OpenTelemetry |
| 50 | + testImplementation 'io.opentelemetry:opentelemetry-api:1.54.1' |
| 51 | + |
| 52 | + // YAML parsing for spec files |
| 53 | + testImplementation 'org.yaml:snakeyaml:2.3' |
| 54 | + |
| 55 | + // Test framework |
| 56 | + testImplementation(testFixtures(project(":test-harness"))) |
| 57 | + testImplementation "org.junit.jupiter:junit-jupiter:${rootProject.ext.junitVersion}" |
| 58 | + testImplementation "org.junit.jupiter:junit-jupiter-params:${rootProject.ext.junitVersion}" |
| 59 | + testImplementation "io.opentelemetry:opentelemetry-sdk:${rootProject.ext.otelVersion}" |
| 60 | + testRuntimeOnly 'org.slf4j:slf4j-simple:2.0.17' |
| 61 | + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' |
| 62 | +} |
| 63 | + |
| 64 | +test { |
| 65 | + useJUnitPlatform() |
| 66 | + workingDir = rootProject.projectDir |
| 67 | + testLogging { |
| 68 | + events "passed", "skipped", "failed" |
| 69 | + showStandardStreams = true |
| 70 | + exceptionFormat "full" |
| 71 | + } |
| 72 | + |
| 73 | + // Pass -Pbtx.spec.filter=<glob> to pre-filter which specs are executed before JUnit runs. |
| 74 | + // Example: ./gradlew btx:test -Pbtx.spec.filter=openai |
| 75 | + if (project.hasProperty('btx.spec.filter')) { |
| 76 | + systemProperty 'btx.spec.filter', project.property('btx.spec.filter') |
| 77 | + } |
| 78 | +} |
0 commit comments