openai/openai-java

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v0.14.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

buildSrc/src/main/kotlin/openai.java.gradle.kts

48lines · modecode

1import com.diffplug.gradle.spotless.SpotlessExtension
2import org.gradle.api.tasks.testing.logging.TestExceptionFormat
3
4plugins {
5 `java-library`
6 id("com.diffplug.spotless")
7}
8
9repositories {
10 mavenCentral()
11}
12
13configure<SpotlessExtension> {
14 java {
15 importOrder()
16 removeUnusedImports()
17 palantirJavaFormat()
18 toggleOffOn()
19 }
20}
21
22java {
23 toolchain {
24 languageVersion.set(JavaLanguageVersion.of(17))
25 }
26}
27
28tasks.withType<JavaCompile>().configureEach {
29 options.compilerArgs.add("-Werror")
30 options.release.set(8)
31}
32
33tasks.named<Jar>("jar") {
34 manifest {
35 attributes(mapOf(
36 "Implementation-Title" to project.name,
37 "Implementation-Version" to project.version
38 ))
39 }
40}
41
42tasks.named<Test>("test") {
43 useJUnitPlatform()
44
45 testLogging {
46 exceptionFormat = TestExceptionFormat.FULL
47 }
48}
49