Skip to content

release: 0.244.2 #997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/increase-kotlin' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v4
Expand All @@ -39,6 +40,7 @@ jobs:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/increase-kotlin' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.244.1"
".": "0.244.2"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 201
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a027ea8bf72e85055306ceaf380c0311b8ed5e6e83962de0ccf48f62c85403fc.yml
openapi_spec_hash: 5a69ed697dee32af7deae0c6ebf27377
openapi_spec_hash: 4e35ead65a06ac0783945b2b213ce83c
config_hash: 97774f946585cecb19181a1817870d0b
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.244.2 (2025-06-29)

Full Changelog: [v0.244.1...v0.244.2](https://github.com/Increase/increase-kotlin/compare/v0.244.1...v0.244.2)

### Bug Fixes

* **client:** don't close client on `withOptions` usage when original is gc'd ([1e698b7](https://github.com/Increase/increase-kotlin/commit/1e698b774c046087907252b149a28248bcbb57e9))


### Chores

* **ci:** only run for pushes and fork pull requests ([01c32e5](https://github.com/Increase/increase-kotlin/commit/01c32e5b1a1e65cebe7268f0ac3b4d6fa24b600b))

## 0.244.1 (2025-06-26)

Full Changelog: [v0.244.0...v0.244.1](https://github.com/Increase/increase-kotlin/compare/v0.244.0...v0.244.1)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-kotlin)](https://central.sonatype.com/artifact/com.increase.api/increase-kotlin/0.244.1)
[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-kotlin/0.244.1/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-kotlin/0.244.1)
[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-kotlin)](https://central.sonatype.com/artifact/com.increase.api/increase-kotlin/0.244.2)
[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-kotlin/0.244.2/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-kotlin/0.244.2)

<!-- x-release-please-end -->

Expand All @@ -13,7 +13,7 @@ The Increase Kotlin SDK is similar to the Increase Java SDK but with minor diffe

<!-- x-release-please-start-version -->

The REST API documentation can be found on [increase.com](https://increase.com/documentation). KDocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-kotlin/0.244.1).
The REST API documentation can be found on [increase.com](https://increase.com/documentation). KDocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-kotlin/0.244.2).

<!-- x-release-please-end -->

Expand All @@ -24,7 +24,7 @@ The REST API documentation can be found on [increase.com](https://increase.com/d
### Gradle

```kotlin
implementation("com.increase.api:increase-kotlin:0.244.1")
implementation("com.increase.api:increase-kotlin:0.244.2")
```

### Maven
Expand All @@ -33,7 +33,7 @@ implementation("com.increase.api:increase-kotlin:0.244.1")
<dependency>
<groupId>com.increase.api</groupId>
<artifactId>increase-kotlin</artifactId>
<version>0.244.1</version>
<version>0.244.2</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.increase.api"
version = "0.244.1" // x-release-please-version
version = "0.244.2" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ private constructor(
webhookSecret = clientOptions.webhookSecret
}

fun httpClient(httpClient: HttpClient) = apply { this.httpClient = httpClient }
fun httpClient(httpClient: HttpClient) = apply {
this.httpClient = PhantomReachableClosingHttpClient(httpClient)
}

fun checkJacksonVersionCompatibility(checkJacksonVersionCompatibility: Boolean) = apply {
this.checkJacksonVersionCompatibility = checkJacksonVersionCompatibility
Expand Down Expand Up @@ -234,14 +236,12 @@ private constructor(

return ClientOptions(
httpClient,
PhantomReachableClosingHttpClient(
RetryingHttpClient.builder()
.httpClient(httpClient)
.clock(clock)
.maxRetries(maxRetries)
.idempotencyHeader("Idempotency-Key")
.build()
),
RetryingHttpClient.builder()
.httpClient(httpClient)
.clock(clock)
.maxRetries(maxRetries)
.idempotencyHeader("Idempotency-Key")
.build(),
checkJacksonVersionCompatibility,
jsonMapper,
clock,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// File generated from our OpenAPI spec by Stainless.

package com.increase.api.core

import com.increase.api.core.http.HttpClient
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.mockito.junit.jupiter.MockitoExtension
import org.mockito.kotlin.mock
import org.mockito.kotlin.never
import org.mockito.kotlin.verify

@ExtendWith(MockitoExtension::class)
internal class ClientOptionsTest {

@Test
fun toBuilder_whenOriginalClientOptionsGarbageCollected_doesNotCloseOriginalClient() {
val httpClient = mock<HttpClient>()
var clientOptions =
ClientOptions.builder().httpClient(httpClient).apiKey("My API Key").build()
verify(httpClient, never()).close()

// Overwrite the `clientOptions` variable so that the original `ClientOptions` is GC'd.
clientOptions = clientOptions.toBuilder().build()
System.gc()
Thread.sleep(100)

verify(httpClient, never()).close()
// This exists so that `clientOptions` is still reachable.
assertThat(clientOptions).isEqualTo(clientOptions)
}
}