92 lines
2.7 KiB
Groovy
92 lines
2.7 KiB
Groovy
apply plugin: 'java-library'
|
|
apply plugin: 'maven'
|
|
apply plugin: 'signing'
|
|
|
|
dependencies {
|
|
api project(":api")
|
|
api 'com.squareup.retrofit2:retrofit:2.9.0'
|
|
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'
|
|
implementation 'com.squareup.retrofit2:converter-jackson:2.9.0'
|
|
|
|
testImplementation(platform('org.junit:junit-bom:5.8.2'))
|
|
testImplementation('org.junit.jupiter:junit-jupiter')
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events "passed", "skipped", "failed"
|
|
}
|
|
}
|
|
|
|
ext {
|
|
libraryVersion = System.getProperty("libraryVersion")
|
|
ossrhUsername = System.getProperty("ossrhUsername")
|
|
ossrhPassword = System.getProperty("ossrhPassword")
|
|
}
|
|
|
|
version = libraryVersion
|
|
group = 'com.theokanning.openai-gpt3-java'
|
|
archivesBaseName = "client"
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
classifier = 'javadoc'
|
|
from javadoc.destinationDir
|
|
}
|
|
|
|
artifacts {
|
|
archives javadocJar, sourcesJar
|
|
}
|
|
|
|
signing {
|
|
sign configurations.archives
|
|
}
|
|
|
|
uploadArchives {
|
|
repositories {
|
|
mavenDeployer {
|
|
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
|
|
|
|
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
|
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
|
}
|
|
|
|
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
|
|
authentication(userName: ossrhUsername, password: ossrhPassword)
|
|
}
|
|
|
|
pom.project {
|
|
name = 'client'
|
|
packaging 'jar'
|
|
|
|
description = 'Basic retrofit client for OpenAI\'s GPT-3 API'
|
|
url = 'https://github.com/theokanning/openai-java'
|
|
developers {
|
|
developer {
|
|
id = "theokanning"
|
|
name = "Theo Kanning"
|
|
email = "theokanning@gmail.com"
|
|
}
|
|
}
|
|
scm {
|
|
connection "https://github.com/theokanning/openai-java.git"
|
|
developerConnection "https://github.com/theokanning/openai-java.git"
|
|
url = "https://github.com/theokanning/openai-java"
|
|
}
|
|
licenses {
|
|
license {
|
|
name = "The MIT License"
|
|
url = "https://www.mit.edu/~amini/LICENSE.md"
|
|
distribution = "repo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|