Skip to content

Commit 9ed1084

Browse files
committed
SDK regeneration
1 parent a6dfb93 commit 9ed1084

File tree

9 files changed

+56
-179
lines changed

9 files changed

+56
-179
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,3 @@ jobs:
3636

3737
- name: Test
3838
run: ./gradlew test
39-
publish:
40-
needs: [ compile, test ]
41-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
42-
runs-on: ubuntu-latest
43-
44-
steps:
45-
- name: Checkout repo
46-
uses: actions/checkout@v4
47-
48-
- name: Set up Java
49-
id: setup-jre
50-
uses: actions/setup-java@v1
51-
with:
52-
java-version: "11"
53-
architecture: x64
54-
55-
- name: Publish to maven
56-
run: |
57-
./gradlew sonatypeCentralUpload
58-
env:
59-
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
60-
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
61-
MAVEN_PUBLISH_REGISTRY_URL: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
62-
MAVEN_SIGNATURE_KID: ${{ secrets.MAVEN_SIGNATURE_KID }}
63-
MAVEN_SIGNATURE_SECRET_KEY: ${{ secrets.MAVEN_SIGNATURE_SECRET_KEY }}
64-
MAVEN_SIGNATURE_PASSWORD: ${{ secrets.MAVEN_SIGNATURE_PASSWORD }}

.publish/prepare.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Pipedream Java Library
22

33
[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPipedreamHQ%2Fpipedream-sdk-java)
4-
[![Maven Central](https://img.shields.io/maven-central/v/com.pipedream/pipedream)](https://central.sonatype.com/artifact/com.pipedream/pipedream)
54

65
The Pipedream Java library provides convenient access to the Pipedream API from Java.
76

build.gradle

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@ plugins {
22
id 'java-library'
33
id 'maven-publish'
44
id 'com.diffplug.spotless' version '6.11.0'
5-
id 'signing'
6-
id 'cl.franciscosolis.sonatype-central-upload' version '1.0.3'
75
}
86

97
repositories {
108
mavenCentral()
119
maven {
12-
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
10+
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
1311
}
1412
}
1513

@@ -19,7 +17,6 @@ dependencies {
1917
api 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.17.2'
2018
api 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2'
2119
api 'org.apache.commons:commons-text:1.13.1'
22-
api 'org.immutables:value:2.10.1'
2320
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
2421
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
2522
}
@@ -46,87 +43,10 @@ java {
4643
}
4744

4845

49-
group = 'com.pipedream'
50-
51-
version = '0.0.256'
52-
53-
jar {
54-
dependsOn(":generatePomFileForMavenPublication")
55-
archiveBaseName = "pipedream"
56-
}
57-
58-
sourcesJar {
59-
archiveBaseName = "pipedream"
60-
}
61-
62-
javadocJar {
63-
archiveBaseName = "pipedream"
64-
}
65-
66-
signing {
67-
sign(publishing.publications)
68-
}
69-
7046
test {
7147
useJUnitPlatform()
7248
testLogging {
7349
showStandardStreams = true
7450
}
7551
}
7652

77-
publishing {
78-
publications {
79-
maven(MavenPublication) {
80-
groupId = 'com.pipedream'
81-
artifactId = 'pipedream'
82-
version = '0.0.256'
83-
from components.java
84-
pom {
85-
name = 'pipedream'
86-
description = 'The official SDK of pipedream'
87-
url = 'https://buildwithfern.com'
88-
licenses {
89-
license {
90-
name = 'The MIT License (MIT)'
91-
url = 'https://mit-license.org/'
92-
}
93-
}
94-
developers {
95-
developer {
96-
name = 'pipedream'
97-
email = 'developers@pipedream.com'
98-
}
99-
}
100-
scm {
101-
connection = 'scm:git:git://github.com/PipedreamHQ/pipedream-sdk-java.git'
102-
developerConnection = 'scm:git:git://github.com/PipedreamHQ/pipedream-sdk-java.git'
103-
url = 'https://github.com/PipedreamHQ/pipedream-sdk-java'
104-
}
105-
}
106-
}
107-
}
108-
}
109-
110-
sonatypeCentralUpload {
111-
username = "$System.env.MAVEN_USERNAME"
112-
password = "$System.env.MAVEN_PASSWORD"
113-
114-
archives = files(
115-
"$buildDir/libs/pipedream-" + version + ".jar",
116-
"$buildDir/libs/pipedream-" + version + "-sources.jar",
117-
"$buildDir/libs/pipedream-" + version + "-javadoc.jar"
118-
)
119-
120-
pom = file("$buildDir/publications/maven/pom-default.xml")
121-
signingKey = "$System.env.MAVEN_SIGNATURE_SECRET_KEY"
122-
signingKeyPassphrase = "$System.env.MAVEN_SIGNATURE_PASSWORD"
123-
}
124-
125-
signing {
126-
def signingKeyId = "$System.env.MAVEN_SIGNATURE_SECRET_KEY"
127-
def signingPassword = "$System.env.MAVEN_SIGNATURE_PASSWORD"
128-
useInMemoryPgpKeys(signingKeyId, signingPassword)
129-
sign publishing.publications.maven
130-
}
131-
132-
sonatypeCentralUpload.dependsOn build

gradle.properties

Whitespace-only changes.

settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
rootProject.name = 'pipedream'
2-
31
include 'sample-app'

src/main/java/com/pipedream/api/AsyncBaseClientBuilder.java

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import java.util.Optional;
1111
import okhttp3.OkHttpClient;
1212

13-
public class AsyncBaseClientBuilder<T extends AsyncBaseClientBuilder<T>> {
13+
public class AsyncBaseClientBuilder {
1414
private Optional<Integer> timeout = Optional.empty();
1515

1616
private Optional<Integer> maxRetries = Optional.empty();
@@ -29,68 +29,65 @@ public class AsyncBaseClientBuilder<T extends AsyncBaseClientBuilder<T>> {
2929
* Sets clientId.
3030
* Defaults to the PIPEDREAM_CLIENT_ID environment variable.
3131
*/
32-
@SuppressWarnings("unchecked")
33-
public T clientId(String clientId) {
32+
public AsyncBaseClientBuilder clientId(String clientId) {
3433
this.clientId = clientId;
35-
return (T) this;
34+
return this;
3635
}
3736

3837
/**
3938
* Sets clientSecret.
4039
* Defaults to the PIPEDREAM_CLIENT_SECRET environment variable.
4140
*/
42-
@SuppressWarnings("unchecked")
43-
public T clientSecret(String clientSecret) {
41+
public AsyncBaseClientBuilder clientSecret(String clientSecret) {
4442
this.clientSecret = clientSecret;
45-
return (T) this;
43+
return this;
4644
}
4745

4846
/**
4947
* Sets projectEnvironment
5048
*/
51-
@SuppressWarnings("unchecked")
52-
public T projectEnvironment(String projectEnvironment) {
49+
public AsyncBaseClientBuilder projectEnvironment(String projectEnvironment) {
5350
this.projectEnvironment = projectEnvironment;
54-
return (T) this;
51+
return this;
5552
}
5653

57-
@SuppressWarnings("unchecked")
58-
public T environment(Environment environment) {
54+
public AsyncBaseClientBuilder environment(Environment environment) {
5955
this.environment = environment;
60-
return (T) this;
56+
return this;
6157
}
6258

63-
@SuppressWarnings("unchecked")
64-
public T url(String url) {
59+
public AsyncBaseClientBuilder url(String url) {
6560
this.environment = Environment.custom(url);
66-
return (T) this;
61+
return this;
6762
}
6863

6964
/**
7065
* Sets the timeout (in seconds) for the client. Defaults to 60 seconds.
7166
*/
72-
@SuppressWarnings("unchecked")
73-
public T timeout(int timeout) {
67+
public AsyncBaseClientBuilder timeout(int timeout) {
7468
this.timeout = Optional.of(timeout);
75-
return (T) this;
69+
return this;
7670
}
7771

7872
/**
7973
* Sets the maximum number of retries for the client. Defaults to 2 retries.
8074
*/
81-
@SuppressWarnings("unchecked")
82-
public T maxRetries(int maxRetries) {
75+
public AsyncBaseClientBuilder maxRetries(int maxRetries) {
8376
this.maxRetries = Optional.of(maxRetries);
84-
return (T) this;
77+
return this;
8578
}
8679

8780
/**
8881
* Sets the underlying OkHttp client
8982
*/
90-
@SuppressWarnings("unchecked")
91-
public T httpClient(OkHttpClient httpClient) {
83+
public AsyncBaseClientBuilder httpClient(OkHttpClient httpClient) {
9284
this.httpClient = httpClient;
93-
return (T) this;
85+
return this;
86+
}
87+
88+
public AsyncBaseClientBuilder projectId(String projectId) {
89+
clientOptionsBuilder.projectId(projectId);
90+
return this;
9491
}
9592

9693
protected ClientOptions buildClientOptions() {
@@ -124,7 +121,7 @@ protected void setEnvironment(ClientOptions.Builder builder) {
124121
*
125122
* Example:
126123
* <pre>{@code
127-
* @Override
124+
* &#64;Override
128125
* protected void setAuthentication(ClientOptions.Builder builder) {
129126
* super.setAuthentication(builder); // Keep existing auth
130127
* builder.addHeader("X-API-Key", this.apiKey);
@@ -149,7 +146,7 @@ protected void setAuthentication(ClientOptions.Builder builder) {
149146
*
150147
* Example:
151148
* <pre>{@code
152-
* @Override
149+
* &#64;Override
153150
* protected void setCustomHeaders(ClientOptions.Builder builder) {
154151
* super.setCustomHeaders(builder); // Keep existing headers
155152
* builder.addHeader("X-Trace-ID", generateTraceId());
@@ -215,9 +212,9 @@ protected void setHttpClient(ClientOptions.Builder builder) {
215212
*
216213
* Example:
217214
* <pre>{@code
218-
* @Override
215+
* &#64;Override
219216
* protected void setAdditional(ClientOptions.Builder builder) {
220-
* builder.addHeader("X-Request-ID", () -> UUID.randomUUID().toString());
217+
* builder.addHeader("X-Request-ID", () -&gt; UUID.randomUUID().toString());
221218
* builder.addHeader("X-Client-Version", "1.0.0");
222219
* }
223220
* }</pre>
@@ -231,7 +228,7 @@ protected void setAdditional(ClientOptions.Builder builder) {}
231228
*
232229
* Example:
233230
* <pre>{@code
234-
* @Override
231+
* &#64;Override
235232
* protected void validateConfiguration() {
236233
* super.validateConfiguration(); // Run parent validations
237234
* if (tenantId == null || tenantId.isEmpty()) {

0 commit comments

Comments
 (0)