From 779be1d98f7376f9a58fad0abded5969591cd181 Mon Sep 17 00:00:00 2001 From: Theo Kanning Date: Sun, 4 Oct 2020 20:57:57 -0500 Subject: [PATCH] Add bintray publishing tasks to gradle --- build.gradle | 10 ++++++++++ openai-api/build.gradle | 25 +++++++++++++++++++++++++ openai-client/build.gradle | 25 +++++++++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/build.gradle b/build.gradle index 7617d83..85a20ae 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,13 @@ +buildscript { + repositories { + jcenter() + } + dependencies { + classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4" + } +} + + allprojects { repositories { jcenter() diff --git a/openai-api/build.gradle b/openai-api/build.gradle index e275327..259b357 100644 --- a/openai-api/build.gradle +++ b/openai-api/build.gradle @@ -1,6 +1,31 @@ apply plugin: 'java-library' +apply plugin: 'com.jfrog.bintray' dependencies { compileOnly 'org.projectlombok:lombok:1.18.12' annotationProcessor 'org.projectlombok:lombok:1.18.12' +} + +ext { + libraryVersion = '0.1.0' +} + +version = libraryVersion +group = 'com.theokanning.openai-gpt3-java' + +bintray { + user = System.getenv("BINTRAY_USER") + key = System.getenv("BINTRAY_KEY") + + configurations = ['archives'] + pkg { + repo = 'openai-gpt3-java' + name = 'api' + vcsUrl = 'https://github.com/TheoKanning/openai-java.git' + licenses = ["MIT"] + publish = true + version { + name = libraryVersion + } + } } \ No newline at end of file diff --git a/openai-client/build.gradle b/openai-client/build.gradle index b84fee6..72ef524 100644 --- a/openai-client/build.gradle +++ b/openai-client/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'java-library' +apply plugin: 'com.jfrog.bintray' dependencies { api project(":openai-api") @@ -6,3 +7,27 @@ dependencies { implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0' implementation 'com.squareup.retrofit2:converter-jackson:2.9.0' } + +ext { + libraryVersion = '0.1.0' +} + +version = libraryVersion +group = 'com.theokanning.openai-gpt3-java' + +bintray { + user = System.getenv("BINTRAY_USER") + key = System.getenv("BINTRAY_KEY") + + configurations = ['archives'] + pkg { + repo = 'openai-gpt3-java' + name = 'client' + vcsUrl = 'https://github.com/TheoKanning/openai-java.git' + licenses = ["MIT"] + publish = true + version { + name = libraryVersion + } + } +} \ No newline at end of file