Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 217116b

Browse filesBrowse files
authored
Publish to OSSRH instead of Bintray (TheoKanning#4)
1 parent cdfceb0 commit 217116b
Copy full SHA for 217116b

File tree

Expand file treeCollapse file tree

5 files changed

+66
-90
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+66
-90
lines changed

‎.github/workflows/publish.yml

Copy file name to clipboardExpand all lines: .github/workflows/publish.yml
-24Lines changed: 0 additions & 24 deletions
This file was deleted.

‎.gitignore

Copy file name to clipboardExpand all lines: .gitignore
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ hs_err_pid*
3131

3232
# Ignore Gradle build output directory
3333
build
34+
35+
# ignore secrets in gradle.properties
36+
gradle.properties

‎api/build.gradle

Copy file name to clipboard
+30-30Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'java-library'
2-
apply plugin: 'com.jfrog.bintray'
3-
apply plugin: 'maven-publish'
2+
apply plugin: 'maven'
3+
apply plugin: 'signing'
44

55
dependencies {
66
compileOnly 'org.projectlombok:lombok:1.18.12'
@@ -13,6 +13,7 @@ ext {
1313

1414
version = libraryVersion
1515
group = 'com.theokanning.openai-gpt3-java'
16+
archivesBaseName = "api"
1617

1718
task sourcesJar(type: Jar, dependsOn: classes) {
1819
classifier = 'sources'
@@ -24,18 +25,32 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
2425
from javadoc.destinationDir
2526
}
2627

27-
publishing {
28-
publications {
29-
ApiPublication(MavenPublication) {
30-
from components.java
31-
artifact sourcesJar
32-
artifact javadocJar
33-
groupId project.group
34-
artifactId 'api'
35-
version libraryVersion
36-
pom {
37-
description = 'POJOs for the OpenAI GPT-3 API'
28+
artifacts {
29+
archives javadocJar, sourcesJar
30+
}
31+
32+
signing {
33+
sign configurations.archives
34+
}
35+
36+
uploadArchives {
37+
repositories {
38+
mavenDeployer {
39+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
40+
41+
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
42+
authentication(userName: ossrhUsername, password: ossrhPassword)
43+
}
44+
45+
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
46+
authentication(userName: ossrhUsername, password: ossrhPassword)
47+
}
48+
49+
pom.project {
3850
name = 'api'
51+
packaging 'jar'
52+
53+
description = 'POJOs for the OpenAI GPT-3 API'
3954
url = 'https://github.com/theokanning/openai-java'
4055
developers {
4156
developer {
@@ -45,6 +60,8 @@ publishing {
4560
}
4661
}
4762
scm {
63+
connection "https://github.com/theokanning/openai-java.git"
64+
developerConnection "https://github.com/theokanning/openai-java.git"
4865
url = "https://github.com/theokanning/openai-java"
4966
}
5067
licenses {
@@ -58,20 +75,3 @@ publishing {
5875
}
5976
}
6077
}
61-
62-
bintray {
63-
user = System.getenv("BINTRAY_USER")
64-
key = System.getenv("BINTRAY_KEY")
65-
66-
publications = ['ApiPublication']
67-
pkg {
68-
repo = 'openai-gpt3-java'
69-
name = 'api'
70-
vcsUrl = 'https://github.com/TheoKanning/openai-java.git'
71-
licenses = ["MIT"]
72-
publish = false
73-
version {
74-
name = libraryVersion
75-
}
76-
}
77-
}

‎build.gradle

Copy file name to clipboard
+3-6Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
buildscript {
22
repositories {
3-
jcenter()
4-
}
5-
dependencies {
6-
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
3+
mavenCentral()
74
}
85
}
96

107
allprojects {
118
repositories {
12-
jcenter()
9+
mavenCentral()
1310
}
14-
}
11+
}

‎client/build.gradle

Copy file name to clipboard
+30-30Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apply plugin: 'java-library'
2-
apply plugin: 'com.jfrog.bintray'
3-
apply plugin: 'maven-publish'
2+
apply plugin: 'maven'
3+
apply plugin: 'signing'
44

55
dependencies {
66
api project(":api")
@@ -15,6 +15,7 @@ ext {
1515

1616
version = libraryVersion
1717
group = 'com.theokanning.openai-gpt3-java'
18+
archivesBaseName = "client"
1819

1920
task sourcesJar(type: Jar, dependsOn: classes) {
2021
classifier = 'sources'
@@ -26,18 +27,32 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
2627
from javadoc.destinationDir
2728
}
2829

29-
publishing {
30-
publications {
31-
ClientPublication(MavenPublication) {
32-
from components.java
33-
artifact sourcesJar
34-
artifact javadocJar
35-
groupId project.group
36-
artifactId 'client'
37-
version libraryVersion
38-
pom {
39-
description = 'Basic retrofit client for OpenAI\'s GPT-3 API'
30+
artifacts {
31+
archives javadocJar, sourcesJar
32+
}
33+
34+
signing {
35+
sign configurations.archives
36+
}
37+
38+
uploadArchives {
39+
repositories {
40+
mavenDeployer {
41+
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
42+
43+
repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") {
44+
authentication(userName: ossrhUsername, password: ossrhPassword)
45+
}
46+
47+
snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") {
48+
authentication(userName: ossrhUsername, password: ossrhPassword)
49+
}
50+
51+
pom.project {
4052
name = 'client'
53+
packaging 'jar'
54+
55+
description = 'Basic retrofit client for OpenAI\'s GPT-3 API'
4156
url = 'https://github.com/theokanning/openai-java'
4257
developers {
4358
developer {
@@ -47,6 +62,8 @@ publishing {
4762
}
4863
}
4964
scm {
65+
connection "https://github.com/theokanning/openai-java.git"
66+
developerConnection "https://github.com/theokanning/openai-java.git"
5067
url = "https://github.com/theokanning/openai-java"
5168
}
5269
licenses {
@@ -60,20 +77,3 @@ publishing {
6077
}
6178
}
6279
}
63-
64-
bintray {
65-
user = System.getenv("BINTRAY_USER")
66-
key = System.getenv("BINTRAY_KEY")
67-
68-
publications = ['ClientPublication']
69-
pkg {
70-
repo = 'openai-gpt3-java'
71-
name = 'client'
72-
vcsUrl = 'https://github.com/TheoKanning/openai-java.git'
73-
licenses = ["MIT"]
74-
publish = false
75-
version {
76-
name = libraryVersion
77-
}
78-
}
79-
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.