Skip to content

Commit cf6126f

Browse files
chore: Publish v5.2.0 (#236)
1 parent 2005e63 commit cf6126f

File tree

332 files changed

+10268
-6529
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

332 files changed

+10268
-6529
lines changed

code/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<dependency>
66
<groupId>com.expediagroup</groupId>
77
<artifactId>rapid-sdk</artifactId>
8-
<version>5.1.0</version>
8+
<version>5.2.0</version>
99
</dependency>
1010
```
1111

code/pom.xml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.expediagroup</groupId>
66
<artifactId>rapid-sdk</artifactId>
7-
<version>5.1.0</version>
7+
<version>5.2.0</version>
88
<name>EG rapid-sdk for Java</name>
9-
<description>EG rapid-sdk v5.1.0</description>
9+
<description>EG rapid-sdk v5.2.0</description>
1010
<url>https://github.com/ExpediaGroup/test-sdk</url>
1111
<inceptionYear>2022</inceptionYear>
1212
<packaging>jar</packaging>
@@ -64,28 +64,28 @@
6464

6565
<!-- Plugin Versions -->
6666
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
67-
<maven-dependency-plugin.version>3.7.1</maven-dependency-plugin.version>
67+
<maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
6868
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
6969
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
7070
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
7171
<maven-shade-plugin.version>3.6.0</maven-shade-plugin.version>
7272
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
73-
<maven-surefire-plugin.version>3.3.0</maven-surefire-plugin.version>
73+
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
7474
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
75-
<ktlint-plugin.version>3.2.0</ktlint-plugin.version>
75+
<ktlint-plugin.version>3.4.0</ktlint-plugin.version>
7676
<jacoco-plugin.version>0.8.12</jacoco-plugin.version>
7777
<dokka-plugin.version>1.9.20</dokka-plugin.version>
7878
<dokka-old-versions.location/> <!-- passed as a property when running dokka:dokka-->
7979
<properties.maven.plugin.version>1.2.1</properties.maven.plugin.version>
80-
<maven.licence.plugin.version>4.5</maven.licence.plugin.version>
80+
<maven.licence.plugin.version>4.6</maven.licence.plugin.version>
8181
<flatten.maven.plugin.version>1.6.0</flatten.maven.plugin.version>
82-
<kotlin.version>2.0.0</kotlin.version>
83-
<kotlinx.coroutines.version>1.8.1</kotlinx.coroutines.version>
84-
<ktor.version>2.3.12</ktor.version>
85-
<kotlin-atomic.version>0.25.0</kotlin-atomic.version>
86-
<slf4j.version>2.0.13</slf4j.version>
82+
<kotlin.version>2.0.21</kotlin.version>
83+
<kotlinx.coroutines.version>1.9.0</kotlinx.coroutines.version>
84+
<ktor.version>2.3.13</ktor.version>
85+
<kotlin-atomic.version>0.26.0</kotlin-atomic.version>
86+
<slf4j.version>2.0.16</slf4j.version>
8787
<maven.nexus-staging.plugin.version>1.7.0</maven.nexus-staging.plugin.version>
88-
<maven.gpg.plugin.version>3.2.5</maven.gpg.plugin.version>
88+
<maven.gpg.plugin.version>3.2.7</maven.gpg.plugin.version>
8989
</properties>
9090

9191
<dependencyManagement>
@@ -131,19 +131,19 @@
131131
<dependency>
132132
<groupId>com.fasterxml.jackson</groupId>
133133
<artifactId>jackson-bom</artifactId>
134-
<version>2.17.2</version>
134+
<version>2.18.1</version>
135135
<type>pom</type>
136136
<scope>import</scope>
137137
</dependency>
138138
<dependency>
139139
<groupId>com.squareup.okio</groupId>
140140
<artifactId>okio-jvm</artifactId>
141-
<version>3.9.0</version>
141+
<version>3.9.1</version>
142142
</dependency>
143143
<dependency>
144144
<groupId>org.jetbrains</groupId>
145145
<artifactId>annotations</artifactId>
146-
<version>24.1.0</version>
146+
<version>26.0.1</version>
147147
</dependency>
148148
<dependency>
149149
<groupId>org.hibernate.validator</groupId>
@@ -153,7 +153,7 @@
153153
<dependency>
154154
<groupId>com.fasterxml.jackson.core</groupId>
155155
<artifactId>jackson-annotations</artifactId>
156-
<version>2.17.2</version>
156+
<version>2.18.1</version>
157157
</dependency>
158158
</dependencies>
159159
</dependencyManagement>

code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseRapidClient.kt

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import com.expediagroup.sdk.core.configuration.provider.RapidConfigurationProvid
2222
import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy
2323
import io.ktor.client.HttpClient
2424
import io.ktor.client.engine.HttpClientEngine
25+
import io.ktor.client.engine.okhttp.OkHttp
2526

2627
/**
2728
* The integration point between the SDK Core and the product SDKs.
@@ -32,15 +33,22 @@ import io.ktor.client.engine.HttpClientEngine
3233
abstract class BaseRapidClient(
3334
namespace: String,
3435
clientConfiguration: RapidClientConfiguration,
35-
httpClientEngine: HttpClientEngine = DEFAULT_HTTP_CLIENT_ENGINE,
36+
httpClientEngine: HttpClientEngine = DEFAULT_HTTP_CLIENT_ENGINE
3637
) : Client(namespace) {
3738
private val _configurationProvider: ConfigurationProvider =
3839
ConfigurationCollector.create(
3940
clientConfiguration.toProvider(),
40-
RapidConfigurationProvider,
41+
RapidConfigurationProvider
4142
)
42-
private val _httpClient: HttpClient =
43-
buildHttpClient(_configurationProvider, AuthenticationStrategy.AuthenticationType.SIGNATURE, httpClientEngine)
43+
44+
private val engine: HttpClientEngine =
45+
_configurationProvider.okHttpClient?.let {
46+
OkHttp.create {
47+
preconfigured = it
48+
}
49+
} ?: httpClientEngine
50+
51+
private val _httpClient: HttpClient = buildHttpClient(_configurationProvider, AuthenticationStrategy.AuthenticationType.SIGNATURE, engine)
4452

4553
init {
4654
finalize()
@@ -54,5 +62,9 @@ abstract class BaseRapidClient(
5462

5563
/** A [BaseRapidClient] builder. */
5664
@Suppress("unused", "UnnecessaryAbstractClass") // This is used by the generated SDK clients.
57-
abstract class Builder<SELF : Builder<SELF>> : Client.Builder<SELF>()
65+
abstract class Builder<SELF : Builder<SELF>> : HttpConfigurableBuilder<SELF>()
66+
67+
/** A [BaseRapidClient] builder with ability to pass a custom okhttp client. */
68+
@Suppress("unused", "UnnecessaryAbstractClass") // This is used by the generated SDK clients.
69+
abstract class BuilderWithHttpClient<SELF : Client.BuilderWithHttpClient<SELF>> : Client.BuilderWithHttpClient<SELF>()
5870
}

code/src/main/kotlin/com/expediagroup/sdk/core/client/BaseXapClient.kt

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import com.expediagroup.sdk.core.configuration.provider.XapConfigurationProvider
2222
import com.expediagroup.sdk.core.plugin.authentication.strategy.AuthenticationStrategy
2323
import io.ktor.client.HttpClient
2424
import io.ktor.client.engine.HttpClientEngine
25+
import io.ktor.client.engine.okhttp.OkHttp
2526

2627
/**
2728
* The integration point between the SDK Core and the product SDKs.
@@ -32,15 +33,22 @@ import io.ktor.client.engine.HttpClientEngine
3233
abstract class BaseXapClient(
3334
namespace: String,
3435
clientConfiguration: XapClientConfiguration,
35-
httpClientEngine: HttpClientEngine = DEFAULT_HTTP_CLIENT_ENGINE,
36+
httpClientEngine: HttpClientEngine = DEFAULT_HTTP_CLIENT_ENGINE
3637
) : Client(namespace) {
3738
private val _configurationProvider: ConfigurationProvider =
3839
ConfigurationCollector.create(
3940
clientConfiguration.toProvider(),
40-
XapConfigurationProvider,
41+
XapConfigurationProvider
4142
)
42-
private val _httpClient: HttpClient =
43-
buildHttpClient(_configurationProvider, AuthenticationStrategy.AuthenticationType.BASIC, httpClientEngine)
43+
44+
private val engine: HttpClientEngine =
45+
_configurationProvider.okHttpClient?.let {
46+
OkHttp.create {
47+
preconfigured = it
48+
}
49+
} ?: httpClientEngine
50+
51+
private val _httpClient: HttpClient = buildHttpClient(_configurationProvider, AuthenticationStrategy.AuthenticationType.BASIC, engine)
4452

4553
init {
4654
finalize()
@@ -54,5 +62,9 @@ abstract class BaseXapClient(
5462

5563
/** A [BaseXapClient] builder. */
5664
@Suppress("unused", "UnnecessaryAbstractClass") // This is used by the generated SDK clients.
57-
abstract class Builder<SELF : Builder<SELF>> : Client.Builder<SELF>()
65+
abstract class Builder<SELF : Builder<SELF>> : HttpConfigurableBuilder<SELF>()
66+
67+
/** A [BaseXapClient] builder with ability to pass a custom okhttp client. */
68+
@Suppress("unused", "UnnecessaryAbstractClass") // This is used by the generated SDK clients.
69+
abstract class BuilderWithHttpClient<SELF : Client.BuilderWithHttpClient<SELF>> : Client.BuilderWithHttpClient<SELF>()
5870
}

0 commit comments

Comments
 (0)