Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
93 lines (81 loc) · 3.63 KB
/
Copy pathbuild.gradle
File metadata and controls
93 lines (81 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
plugins {
id 'java-library'
// Publishes to Maven Central through the Central Portal and signs every artifact, the same plugin
// elevenlabs-android uses. It applies maven-publish and signing itself.
id 'com.vanniktech.maven.publish' version '0.34.0'
}
repositories {
mavenCentral()
}
dependencies {
api 'com.fasterxml.jackson.core:jackson-databind:2.15.0'
compileOnly 'org.projectlombok:lombok:1.18.42'
annotationProcessor 'org.projectlombok:lombok:1.18.42'
api 'com.squareup.okhttp3:okhttp:4.12.0'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.0'
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
testImplementation 'org.junit.platform:junit-platform-launcher:1.10.2'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.12.0'
// Hand-written Speech Engine server (com.elevenlabs.api.speechengine). These are compileOnly
// so that the SDK's published dependencies do not change for anyone who does not host a Speech
// Engine server: SpeechEngineServer needs Java-WebSocket at runtime, and SpeechEngineJakarta
// uses the servlet container's own Jakarta Servlet/WebSocket APIs. All support Java 8.
compileOnly 'org.java-websocket:Java-WebSocket:1.5.7'
compileOnly 'jakarta.servlet:jakarta.servlet-api:5.0.0'
compileOnly 'jakarta.websocket:jakarta.websocket-api:2.0.0'
testImplementation 'org.java-websocket:Java-WebSocket:1.5.7'
// Tomcat 10.0 is the last Tomcat line that runs on Java 8; it provides the Jakarta APIs above.
testImplementation 'org.apache.tomcat.embed:tomcat-embed-core:10.0.27'
testImplementation 'org.apache.tomcat.embed:tomcat-embed-websocket:10.0.27'
}
test {
useJUnitPlatform()
}
tasks.withType(Javadoc) {
failOnError false
options.addStringOption('Xdoclint:none', '-quiet')
}
java {
// Gradle 9 removed these as project properties; the java extension is the form that works on
// both 8 and 9. Fern still emits the project-property form, so this is a deliberate divergence.
sourceCompatibility = JavaVersion.toVersion(8)
targetCompatibility = JavaVersion.toVersion(8)
}
group = 'io.elevenlabs'
version = '1.0.0'
jar {
archiveBaseName = 'elevenlabs-java'
}
mavenPublishing {
// The plugin builds the sources and javadoc jars Maven Central requires, so the java block no
// longer calls withSourcesJar()/withJavadocJar(): doing both registers the jars twice.
// Credentials and the signing key come from ORG_GRADLE_PROJECT_* environment variables set by
// .github/workflows/release.yml (mavenCentralUsername, mavenCentralPassword, signingInMemoryKey,
// signingInMemoryKeyId, signingInMemoryKeyPassword), the same names elevenlabs-android uses.
publishToMavenCentral(true)
signAllPublications()
coordinates('io.elevenlabs', 'elevenlabs-java', project.version.toString())
pom {
name = 'ElevenLabs'
description = 'The official Java SDK for ElevenLabs.'
url = 'https://github.com/elevenlabs/elevenlabs-java'
licenses {
license {
name = 'MIT'
url = 'https://opensource.org/licenses/MIT'
}
}
scm {
connection = 'scm:git:git://github.com/elevenlabs/elevenlabs-java.git'
developerConnection = 'scm:git:ssh://github.com/elevenlabs/elevenlabs-java.git'
url = 'https://github.com/elevenlabs/elevenlabs-java'
}
developers {
developer {
name = 'ElevenLabs'
email = 'developers@elevenlabs.io'
}
}
}
}