From d0b6a464d8f660941a47b40fb8ed67508550921c Mon Sep 17 00:00:00 2001 From: Jesse Wilson Date: Sun, 28 Apr 2024 20:33:04 -0400 Subject: [PATCH 01/26] Start fewer threads in TaskRunner (#8391) We've got a race where we'll start a thread when we need one, even if we've already started a thread. This changes TaskRunner's behavior to never add a thread if we're still waiting for a recently-added one to start running. This is intended to reduce the number of threads contenting for the TaskRunner lock as reported in this issue: https://github.com/square/okhttp/issues/8388 --- .../okhttp3/internal/concurrent/TaskFaker.kt | 16 ++-- .../okhttp3/internal/concurrent/TaskRunner.kt | 33 ++++++- .../internal/concurrent/TaskRunnerTest.kt | 90 +++++++++++++++++++ 3 files changed, 129 insertions(+), 10 deletions(-) diff --git a/okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt b/okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt index 88dfd7936742..1874cd9ca8e0 100644 --- a/okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt +++ b/okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt @@ -63,29 +63,32 @@ class TaskFaker : Closeable { /** * True if this task faker has ever had multiple tasks scheduled to run concurrently. Guarded by - * [taskRunner]. + * [TaskRunner.lock]. */ var isParallel = false + /** Number of calls to [TaskRunner.Backend.execute]. Guarded by [TaskRunner.lock]. */ + var executeCallCount = 0 + /** Guarded by [taskRunner]. */ var nanoTime = 0L private set - /** Backlog of tasks to run. Only one task runs at a time. Guarded by [taskRunner]. */ + /** Backlog of tasks to run. Only one task runs at a time. Guarded by [TaskRunner.lock]. */ private val serialTaskQueue = ArrayDeque() - /** The task that's currently executing. Guarded by [taskRunner]. */ + /** The task that's currently executing. Guarded by [TaskRunner.lock]. */ private var currentTask: SerialTask = TestThreadSerialTask - /** The coordinator task if it's waiting, and how it will resume. Guarded by [taskRunner]. */ + /** The coordinator task if it's waiting, and how it will resume. Guarded by [TaskRunner.lock]. */ private var waitingCoordinatorTask: SerialTask? = null private var waitingCoordinatorInterrupted = false private var waitingCoordinatorNotified = false - /** How many times a new task has been started. Guarded by [taskRunner]. */ + /** How many times a new task has been started. Guarded by [TaskRunner.lock]. */ private var contextSwitchCount = 0 - /** Guarded by [taskRunner]. */ + /** Guarded by [TaskRunner.lock]. */ private var activeThreads = 0 /** A task runner that posts tasks to this fake. Tasks won't be executed until requested. */ @@ -100,6 +103,7 @@ class TaskFaker : Closeable { val queuedTask = RunnableSerialTask(runnable) serialTaskQueue += queuedTask + executeCallCount++ isParallel = serialTaskQueue.size > 1 } diff --git a/okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt b/okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt index 6acc7b24e774..60143b3c40f8 100644 --- a/okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt +++ b/okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt @@ -52,6 +52,17 @@ class TaskRunner( private var coordinatorWaiting = false private var coordinatorWakeUpAt = 0L + /** + * When we need a new thread to run tasks, we call [Backend.execute]. A few microseconds later we + * expect a newly-started thread to call [Runnable.run]. We shouldn't request new threads until + * the already-requested ones are in service, otherwise we might create more threads than we need. + * + * We use [executeCallCount] and [runCallCount] to defend against starting more threads than we + * need. Both fields are guarded by [lock]. + */ + private var executeCallCount = 0 + private var runCallCount = 0 + /** Queues with tasks that are currently executing their [TaskQueue.activeTask]. */ private val busyQueues = mutableListOf() @@ -61,9 +72,14 @@ class TaskRunner( private val runnable: Runnable = object : Runnable { override fun run() { + var incrementedRunCallCount = false while (true) { val task = this@TaskRunner.lock.withLock { + if (!incrementedRunCallCount) { + incrementedRunCallCount = true + runCallCount++ + } awaitTaskToRun() } ?: return @@ -76,7 +92,7 @@ class TaskRunner( // If the task is crashing start another thread to service the queues. if (!completedNormally) { lock.withLock { - backend.execute(this@TaskRunner, this) + startAnotherThread() } } } @@ -99,7 +115,7 @@ class TaskRunner( if (coordinatorWaiting) { backend.coordinatorNotify(this@TaskRunner) } else { - backend.execute(this@TaskRunner, runnable) + startAnotherThread() } } @@ -157,7 +173,7 @@ class TaskRunner( * Returns an immediately-executable task for the calling thread to execute, sleeping as necessary * until one is ready. If there are no ready queues, or if other threads have everything under * control this will return null. If there is more than a single task ready to execute immediately - * this will launch another thread to handle that work. + * this will start another thread to handle that work. */ fun awaitTaskToRun(): Task? { lock.assertHeld() @@ -207,7 +223,7 @@ class TaskRunner( // Also start another thread if there's more work or scheduling to do. if (multipleReadyTasks || !coordinatorWaiting && readyQueues.isNotEmpty()) { - backend.execute(this@TaskRunner, runnable) + startAnotherThread() } return readyTask @@ -238,6 +254,15 @@ class TaskRunner( } } + /** Start another thread, unless a new thread is already scheduled to start. */ + private fun startAnotherThread() { + lock.assertHeld() + if (executeCallCount > runCallCount) return // A thread is still starting. + + executeCallCount++ + backend.execute(this@TaskRunner, runnable) + } + fun newQueue(): TaskQueue { val name = lock.withLock { nextQueueName++ } return TaskQueue(this, "Q$name") diff --git a/okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt b/okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt index 5f343b5632c7..36b0c4c72b00 100644 --- a/okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt +++ b/okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt @@ -680,6 +680,96 @@ class TaskRunnerTest { assertThat(idleLatch2).isSameAs(idleLatch1) } + @Test fun cancelAllWhenEmptyDoesNotStartWorkerThread() { + redQueue.execute("red task", 100.µs) { + error("expected to be canceled") + } + assertThat(taskFaker.executeCallCount).isEqualTo(1) + + blueQueue.execute("task", 100.µs) { + error("expected to be canceled") + } + assertThat(taskFaker.executeCallCount).isEqualTo(1) + + redQueue.cancelAll() + assertThat(taskFaker.executeCallCount).isEqualTo(1) + + blueQueue.cancelAll() + assertThat(taskFaker.executeCallCount).isEqualTo(1) + } + + @Test fun noMoreThanOneWorkerThreadWaitingToStartAtATime() { + // Enqueueing the red task starts a thread because the head of the queue changed. + redQueue.execute("red task") { + log += "red:starting@${taskFaker.nanoTime}" + taskFaker.sleep(100.µs) + log += "red:finishing@${taskFaker.nanoTime}" + } + assertThat(taskFaker.executeCallCount).isEqualTo(1) + + // Enqueueing the blue task doesn't start a thread because the red one is still starting. + blueQueue.execute("blue task") { + log += "blue:starting@${taskFaker.nanoTime}" + taskFaker.sleep(100.µs) + log += "blue:finishing@${taskFaker.nanoTime}" + } + assertThat(taskFaker.executeCallCount).isEqualTo(1) + + // Running the red task starts another thread, so the two can run in parallel. + taskFaker.runNextTask() + assertThat(log).containsExactly("red:starting@0") + assertThat(taskFaker.executeCallCount).isEqualTo(2) + + // Next the blue task starts. + taskFaker.runNextTask() + assertThat(log).containsExactly( + "red:starting@0", + "blue:starting@0", + ) + assertThat(taskFaker.executeCallCount).isEqualTo(2) + + // Advance time until the tasks complete. + taskFaker.advanceUntil(100.µs) + assertThat(log).containsExactly( + "red:starting@0", + "blue:starting@0", + "red:finishing@100000", + "blue:finishing@100000", + ) + taskFaker.assertNoMoreTasks() + assertThat(taskFaker.executeCallCount).isEqualTo(2) + } + + @Test fun onlyOneCoordinatorWaitingToStartFutureTasks() { + // Enqueueing the red task starts a coordinator thread. + redQueue.execute("red task", 100.µs) { + log += "red:run@${taskFaker.nanoTime}" + } + assertThat(taskFaker.executeCallCount).isEqualTo(1) + + // Enqueueing the blue task doesn't need a 2nd coordinator yet. + blueQueue.execute("blue task", 200.µs) { + log += "blue:run@${taskFaker.nanoTime}" + } + assertThat(taskFaker.executeCallCount).isEqualTo(1) + + // Nothing to do. + taskFaker.runTasks() + assertThat(log).isEmpty() + + // At 100.µs, the coordinator runs the red task and starts a thread for the new coordinator. + taskFaker.advanceUntil(100.µs) + assertThat(log).containsExactly("red:run@100000") + assertThat(taskFaker.executeCallCount).isEqualTo(2) + + // At 200.µs, the blue task runs. + taskFaker.advanceUntil(200.µs) + assertThat(log).containsExactly("red:run@100000", "blue:run@200000") + assertThat(taskFaker.executeCallCount).isEqualTo(2) + + taskFaker.assertNoMoreTasks() + } + private val Int.µs: Long get() = this * 1_000L } From 2f618f76a7ad3864284790edce167ebb309df1bf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 06:06:52 +0100 Subject: [PATCH 02/26] Update dependency com.google.guava:guava to v33.2.0-jre (#8397) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f263e7c25b39..32ee29a32ef4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -48,7 +48,7 @@ gradlePlugin-kotlinSerialization = { module = "org.jetbrains.kotlin:kotlin-seria gradlePlugin-mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.28.0" gradlePlugin-shadow = "gradle.plugin.com.github.johnrengelman:shadow:8.0.0" gradlePlugin-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.25.0" -guava-jre = "com.google.guava:guava:33.1.0-jre" +guava-jre = "com.google.guava:guava:33.2.0-jre" hamcrestLibrary = "org.hamcrest:hamcrest-library:2.2" httpClient5 = "org.apache.httpcomponents.client5:httpclient5:5.3" jettyClient = "org.eclipse.jetty:jetty-client:9.4.54.v20240208" From 62031cd8f4a04600c11a4b294a6f786581ff6069 Mon Sep 17 00:00:00 2001 From: Endeavour233 <43426962+Endeavour233@users.noreply.github.com> Date: Mon, 13 May 2024 21:42:37 +0800 Subject: [PATCH 03/26] fix UTF-32 BOM (#8407) --- okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt | 6 +++--- okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt | 10 +++++++--- okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt | 10 +++++----- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt b/okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt index 3db8d43a9c2a..16d1321b5afb 100644 --- a/okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt +++ b/okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt @@ -55,12 +55,12 @@ internal val UNICODE_BOMS = "efbbbf".decodeHex(), // UTF-16BE. "feff".decodeHex(), + // UTF-32LE. + "fffe0000".decodeHex(), // UTF-16LE. "fffe".decodeHex(), // UTF-32BE. - "0000ffff".decodeHex(), - // UTF-32LE. - "ffff0000".decodeHex(), + "0000feff".decodeHex(), ) /** diff --git a/okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt b/okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt index 1f1c4f4e3a1f..71014a703f3f 100644 --- a/okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt +++ b/okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt @@ -94,14 +94,18 @@ internal fun format( return String.format(Locale.US, format, *args) } +/** + * will also strip BOM from the source + */ @Throws(IOException::class) internal fun BufferedSource.readBomAsCharset(default: Charset): Charset { return when (select(UNICODE_BOMS)) { + // a mapping from the index of encoding methods in UNICODE_BOMS to its corresponding encoding method 0 -> UTF_8 1 -> UTF_16BE - 2 -> UTF_16LE - 3 -> UTF_32BE - 4 -> UTF_32LE + 2 -> UTF_32LE + 3 -> UTF_16LE + 4 -> UTF_32BE -1 -> default else -> throw AssertionError() } diff --git a/okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt b/okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt index a7967e92f3f1..730a77bed562 100644 --- a/okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt +++ b/okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt @@ -62,7 +62,7 @@ class ResponseBodyJvmTest { @Test fun stringBomOverridesExplicitCharset() { - val body = body("0000ffff00000068000000650000006c0000006c0000006f", "utf-8") + val body = body("0000feff00000068000000650000006c0000006c0000006f", "utf-8") assertThat(body.string()).isEqualTo("hello") } @@ -86,13 +86,13 @@ class ResponseBodyJvmTest { @Test fun stringBomUtf32Be() { - val body = body("0000ffff00000068000000650000006c0000006c0000006f") + val body = body("0000feff00000068000000650000006c0000006c0000006f") assertThat(body.string()).isEqualTo("hello") } @Test fun stringBomUtf32Le() { - val body = body("ffff000068000000650000006c0000006c0000006f000000") + val body = body("fffe000068000000650000006c0000006c0000006f000000") assertThat(body.string()).isEqualTo("hello") } @@ -168,13 +168,13 @@ class ResponseBodyJvmTest { @Test fun readerBomUtf32Be() { - val body = body("0000ffff00000068000000650000006c0000006c0000006f") + val body = body("0000feff00000068000000650000006c0000006c0000006f") assertThat(exhaust(body.charStream())).isEqualTo("hello") } @Test fun readerBomUtf32Le() { - val body = body("ffff000068000000650000006c0000006c0000006f000000") + val body = body("fffe000068000000650000006c0000006c0000006f000000") assertThat(exhaust(body.charStream())).isEqualTo("hello") } From bd611089c2f07ab0d9a7eae610d9f7383139a5a3 Mon Sep 17 00:00:00 2001 From: Evan Nelson Date: Tue, 14 May 2024 10:48:07 -0700 Subject: [PATCH 04/26] Fix an environment-specific bug in RouteFailureTest (#8409) InetSocketAddress's constructor will try to resolve the host to an IP address. As a result, if you're on a network that happens to have a resolvable `myproxy` host, this test would fail -- and as it turns out, my home network does. Instead, use InetSocketAddress.createUnresolved(). --- okhttp/src/test/java/okhttp3/RouteFailureTest.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/okhttp/src/test/java/okhttp3/RouteFailureTest.kt b/okhttp/src/test/java/okhttp3/RouteFailureTest.kt index 4ced615788da..c0884a454d02 100644 --- a/okhttp/src/test/java/okhttp3/RouteFailureTest.kt +++ b/okhttp/src/test/java/okhttp3/RouteFailureTest.kt @@ -316,7 +316,8 @@ class RouteFailureTest { fun proxyMoveTest(cleanShutdown: Boolean) { // Define a single Proxy at myproxy:8008 that will artificially move during the test val proxySelector = RecordingProxySelector() - proxySelector.proxies.add(Proxy(Proxy.Type.HTTP, InetSocketAddress("myproxy", 8008))) + val socketAddress = InetSocketAddress.createUnresolved("myproxy", 8008) + proxySelector.proxies.add(Proxy(Proxy.Type.HTTP, socketAddress)) // Define two host names for the DNS routing of fake proxy servers val proxyServer1 = InetAddress.getByAddress("proxyServer1", byteArrayOf(127, 0, 0, 2)) From 54238b4c713080c3fd32fb1a070fb5d6814c9a09 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 19 May 2024 00:34:57 +0100 Subject: [PATCH 05/26] Update mcr.microsoft.com/devcontainers/java Docker tag to v21 (#8398) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index e356659135f2..8ade6e48f023 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "mcr.microsoft.com/devcontainers/java:17-bookworm", + "image": "mcr.microsoft.com/devcontainers/java:21-bookworm", "features": { "ghcr.io/devcontainers/features/java:1": { "version": "17" From 60de813ea55b0aba7b2d5df73c6e07ca8c2a5ee2 Mon Sep 17 00:00:00 2001 From: Leo Lin Date: Thu, 20 Jun 2024 09:10:53 -0500 Subject: [PATCH 06/26] Allow Nullable ExecutorService Parameter in Dispatcher Constructor (#8401) Allow Nullable ExecutorService Parameter in Dispatcher Constructor to maintain backwards compatibility with OkHttp3 3.x migration to 4.x and beyond --- okhttp/src/main/kotlin/okhttp3/Dispatcher.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/okhttp/src/main/kotlin/okhttp3/Dispatcher.kt b/okhttp/src/main/kotlin/okhttp3/Dispatcher.kt index 57d0ab29a4f9..9e012a7907d5 100644 --- a/okhttp/src/main/kotlin/okhttp3/Dispatcher.kt +++ b/okhttp/src/main/kotlin/okhttp3/Dispatcher.kt @@ -123,7 +123,7 @@ class Dispatcher() { /** Running synchronous calls. Includes canceled calls that haven't finished yet. */ private val runningSyncCalls = ArrayDeque() - constructor(executorService: ExecutorService) : this() { + constructor(executorService: ExecutorService?) : this() { this.executorServiceOrNull = executorService } From db291df7628c3a89479fb538d0ae7f50eae4c0ce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 10:05:16 +0100 Subject: [PATCH 07/26] Update dependency net.ltgt.gradle:gradle-errorprone-plugin to v4 (#8444) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 32ee29a32ef4..d695d1895c4a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -41,7 +41,7 @@ gradlePlugin-animalsniffer = "ru.vyarus:gradle-animalsniffer-plugin:1.7.1" gradlePlugin-binaryCompatibilityValidator = "org.jetbrains.kotlinx.binary-compatibility-validator:org.jetbrains.kotlinx.binary-compatibility-validator.gradle.plugin:0.14.0" gradlePlugin-bnd = { module = "biz.aQute.bnd:biz.aQute.bnd.gradle", version.ref = "biz-aQute-bnd" } gradlePlugin-dokka = "org.jetbrains.dokka:dokka-gradle-plugin:1.9.20" -gradlePlugin-errorprone = "net.ltgt.gradle:gradle-errorprone-plugin:3.1.0" +gradlePlugin-errorprone = "net.ltgt.gradle:gradle-errorprone-plugin:4.0.1" gradlePlugin-graal = "com.palantir.graal:gradle-graal:0.12.0" gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "org-jetbrains-kotlin" } gradlePlugin-kotlinSerialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "org-jetbrains-kotlin" } From b4d1ffd36bd585cf8a2c01a50cfcaafb14b03b97 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 16:54:10 +0100 Subject: [PATCH 08/26] Update dependency org.robolectric:robolectric to v4.12.2 (#8422) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d695d1895c4a..1959b37ef7c0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -82,7 +82,7 @@ nativeImageSvm = { module = "org.graalvm.nativeimage:svm", version.ref = "graalv openjsse = "org.openjsse:openjsse:1.1.14" playservices-safetynet = "com.google.android.gms:play-services-safetynet:18.0.1" robolectric-android = "org.robolectric:android-all:14-robolectric-10818077" -robolectric = "org.robolectric:robolectric:4.12.1" +robolectric = "org.robolectric:robolectric:4.12.2" signature-android-apilevel21 = "net.sf.androidscents.signature:android-api-level-21:5.0.1_r2" signature-android-apilevel24 = "net.sf.androidscents.signature:android-api-level-24:7.0_r2" squareup-moshi = { module = "com.squareup.moshi:moshi", version.ref = "com-squareup-moshi" } From b38dda707c904ad25dba59f3be87746b7bdb399a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 16:58:02 +0100 Subject: [PATCH 09/26] Update dependency androidx.annotation:annotation to v1.8.0 (#8425) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1959b37ef7c0..d91cf8be4be9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,7 +17,7 @@ testcontainers = "1.19.7" [libraries] amazonCorretto = "software.amazon.cryptools:AmazonCorrettoCryptoProvider:2.3.3" androidx-activity = "androidx.activity:activity-ktx:1.9.0" -androidx-annotation = "androidx.annotation:annotation:1.7.1" +androidx-annotation = "androidx.annotation:annotation:1.8.0" androidx-espresso-core = "androidx.test.espresso:espresso-core:3.5.1" androidx-junit = "androidx.test.ext:junit:1.1.5" androidx-test-runner = "androidx.test:runner:1.5.2" From 7b3b7566e57ec93faf61b7d1dfc4e7ebf6840f14 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:04:09 +0100 Subject: [PATCH 10/26] Update testcontainers-java monorepo to v1.19.8 (#8424) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d91cf8be4be9..572bdaff3873 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,7 +12,7 @@ org-conscrypt = "2.5.2" org-jetbrains-coroutines = "1.8.0" org-jetbrains-kotlin = "1.9.23" org-junit-jupiter = "5.10.2" -testcontainers = "1.19.7" +testcontainers = "1.19.8" [libraries] amazonCorretto = "software.amazon.cryptools:AmazonCorrettoCryptoProvider:2.3.3" From c624cafbe7115741013fc651ee1e0ad51b496314 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:04:27 +0100 Subject: [PATCH 11/26] Update dependency com.google.guava:guava to v33.2.1-jre (#8435) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 572bdaff3873..b2cc55b75b98 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -48,7 +48,7 @@ gradlePlugin-kotlinSerialization = { module = "org.jetbrains.kotlin:kotlin-seria gradlePlugin-mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.28.0" gradlePlugin-shadow = "gradle.plugin.com.github.johnrengelman:shadow:8.0.0" gradlePlugin-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.25.0" -guava-jre = "com.google.guava:guava:33.2.0-jre" +guava-jre = "com.google.guava:guava:33.2.1-jre" hamcrestLibrary = "org.hamcrest:hamcrest-library:2.2" httpClient5 = "org.apache.httpcomponents.client5:httpclient5:5.3" jettyClient = "org.eclipse.jetty:jetty-client:9.4.54.v20240208" From 45c470a1fd1b299898d4b97bf541286b8653656a Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Sat, 22 Jun 2024 17:06:35 +0100 Subject: [PATCH 12/26] Disable connectionPreWarmingHttp2 for now (#8452) --- .../java/okhttp3/internal/connection/ConnectionPoolTest.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt b/okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt index b9b4f5354258..7ecceb09f3ea 100644 --- a/okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt +++ b/okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt @@ -35,6 +35,7 @@ import okhttp3.internal.http2.Http2ConnectionTest import okhttp3.internal.http2.MockHttp2Peer import okhttp3.internal.http2.Settings import org.junit.jupiter.api.AfterEach +import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test class ConnectionPoolTest { @@ -229,7 +230,9 @@ class ConnectionPoolTest { assertThat(pool.connectionCount()).isEqualTo(1) } - @Test fun connectionPreWarmingHttp2() { + @Disabled("https://github.com/square/okhttp/issues/8451") + @Test + fun connectionPreWarmingHttp2() { taskFaker.advanceUntil(System.nanoTime()) val expireSooner = taskFaker.nanoTime + 1_000_000_000_000 val expireLater = taskFaker.nanoTime + 2_000_000_000_000 From dd7bbf4098633e3b0b749e29ffdd74ff7ff63d26 Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Sat, 22 Jun 2024 17:18:31 +0100 Subject: [PATCH 13/26] Update renovate rules --- .github/renovate.json | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index 36df25c9d60b..6774ca1bbcf4 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -12,6 +12,18 @@ "com.squareup.okhttp3:mockwebserver" ], "packageRules": [ + { + "matchPackagePatterns": [ + "biz.*" + ], + "groupName": "bnd" + }, + { + "matchPackagePatterns": [ + "org.graalvm.*" + ], + "groupName": "graalvm" + }, { "matchPackageNames": ["org.objenesis:objenesis"], "allowedVersions": "<=2.6" @@ -25,16 +37,6 @@ "matchPackageNames": ["org.junit-pioneer:junit-pioneer"], "allowedVersions": "<2.0.0", "description": "JDK 11 requirement" - }, - { - "matchPackageNames": ["gradle"], - "allowedVersions": "<8.0", - "description": "Recent release, not compatible with pinned AGP and Kotlin versions yet. Wait for AGP 8?" - }, - { - "matchPackageNames": ["com.android.tools.build:gradle"], - "allowedVersions": "<7.4", - "description": "Recent release, no compatible Intellij stable release (2023.1)" } ] } From d3ab47f7520b759667c4ec97e1b08b1deaa4c729 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:21:54 +0100 Subject: [PATCH 14/26] Update dependency com.google.android.gms:play-services-safetynet to v18.1.0 (#8438) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b2cc55b75b98..b78c9d2a1c37 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -80,7 +80,7 @@ mockserver = { module = "org.testcontainers:mockserver", version.ref = "testcont mockserver-client = { module = "org.mock-server:mockserver-client-java-no-dependencies", version.ref = "mockserverClient" } nativeImageSvm = { module = "org.graalvm.nativeimage:svm", version.ref = "graalvm" } openjsse = "org.openjsse:openjsse:1.1.14" -playservices-safetynet = "com.google.android.gms:play-services-safetynet:18.0.1" +playservices-safetynet = "com.google.android.gms:play-services-safetynet:18.1.0" robolectric-android = "org.robolectric:android-all:14-robolectric-10818077" robolectric = "org.robolectric:robolectric:4.12.2" signature-android-apilevel21 = "net.sf.androidscents.signature:android-api-level-21:5.0.1_r2" From d596eee060fa4e610abb13faef04896bbc20cbd1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:22:22 +0100 Subject: [PATCH 15/26] Update dependency com.puppycrawl.tools:checkstyle to v10.17.0 (#8393) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b78c9d2a1c37..a61638da97d8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] biz-aQute-bnd = "6.4.0" -checkStyle = "10.15.0" +checkStyle = "10.17.0" com-squareup-moshi = "1.15.1" com-squareup-okio = "3.9.0" de-mannodermaus-junit5 = "1.4.0" From 182324bd7a6378d40f99a0e786cb9afcccdd044f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:22:31 +0100 Subject: [PATCH 16/26] Update dependency com.github.ajalt.clikt:clikt to v4.4.0 (#8392) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a61638da97d8..fe36acc85946 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -29,7 +29,7 @@ bouncycastle-bcprov = { module = "org.bouncycastle:bcprov-jdk15to18", version.re bouncycastle-bctls = { module = "org.bouncycastle:bctls-jdk15to18", version.ref = "org-bouncycastle" } brotli-dec = "org.brotli:dec:0.1.2" checkStyle = { module = "com.puppycrawl.tools:checkstyle", version.ref = "checkStyle" } -clikt = "com.github.ajalt.clikt:clikt:4.3.0" +clikt = "com.github.ajalt.clikt:clikt:4.4.0" codehaus-signature-java18 = "org.codehaus.mojo.signature:java18:1.0" conscrypt-android = { module = "org.conscrypt:conscrypt-android", version.ref = "org-conscrypt" } conscrypt-openjdk = { module = "org.conscrypt:conscrypt-openjdk-uber", version.ref = "org-conscrypt" } From aa302d2db6175d6c9e2e8bfe546f29170630ed9b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:22:42 +0100 Subject: [PATCH 17/26] Update dependency com.willowtreeapps.assertk:assertk to v0.28.1 (#8381) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fe36acc85946..3bfdd0fd59e2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -23,7 +23,7 @@ androidx-junit = "androidx.test.ext:junit:1.1.5" androidx-test-runner = "androidx.test:runner:1.5.2" animalsniffer-annotations = "org.codehaus.mojo:animal-sniffer-annotations:1.23" aqute-resolve = { module = "biz.aQute.bnd:biz.aQute.resolve", version.ref = "biz-aQute-bnd" } -assertk = "com.willowtreeapps.assertk:assertk:0.28.0" +assertk = "com.willowtreeapps.assertk:assertk:0.28.1" bouncycastle-bcpkix = { module = "org.bouncycastle:bcpkix-jdk15to18", version.ref = "org-bouncycastle" } bouncycastle-bcprov = { module = "org.bouncycastle:bcprov-jdk15to18", version.ref = "org-bouncycastle" } bouncycastle-bctls = { module = "org.bouncycastle:bctls-jdk15to18", version.ref = "org-bouncycastle" } From af40263b7beb35188aaae420a8079ac1c9ad9350 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:22:52 +0100 Subject: [PATCH 18/26] Update dependency org.apache.httpcomponents.client5:httpclient5 to v5.3.1 (#8436) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3bfdd0fd59e2..5d63f1d9c8e4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -50,7 +50,7 @@ gradlePlugin-shadow = "gradle.plugin.com.github.johnrengelman:shadow:8.0.0" gradlePlugin-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.25.0" guava-jre = "com.google.guava:guava:33.2.1-jre" hamcrestLibrary = "org.hamcrest:hamcrest-library:2.2" -httpClient5 = "org.apache.httpcomponents.client5:httpclient5:5.3" +httpClient5 = "org.apache.httpcomponents.client5:httpclient5:5.3.1" jettyClient = "org.eclipse.jetty:jetty-client:9.4.54.v20240208" jnr-unixsocket = "com.github.jnr:jnr-unixsocket:0.38.22" jsoup = "org.jsoup:jsoup:1.17.2" From 1c2d31f0d2c7b02cd81efdd96e0dcdb63c63a352 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:23:03 +0100 Subject: [PATCH 19/26] Update dependency com.squareup:kotlinpoet to v1.17.0 (#8439) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5d63f1d9c8e4..e5fb9bfe6d1e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -89,7 +89,7 @@ squareup-moshi = { module = "com.squareup.moshi:moshi", version.ref = "com-squar squareup-moshi-compiler = { module = "com.squareup.moshi:moshi-kotlin-codegen", version.ref = "com-squareup-moshi" } squareup-moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "com-squareup-moshi" } squareup-okhttp-icu = "com.squareup.okhttpicu:okhttp-icu:0.2.0" -squareup-kotlinPoet = "com.squareup:kotlinpoet:1.16.0" +squareup-kotlinPoet = "com.squareup:kotlinpoet:1.17.0" squareup-okio = { module = "com.squareup.okio:okio", version.ref = "com-squareup-okio" } squareup-okio-fakefilesystem = { module = "com.squareup.okio:okio-fakefilesystem", version.ref = "com-squareup-okio" } squareup-okio-nodefilesystem = { module = "com.squareup.okio:okio-nodefilesystem", version.ref = "com-squareup-okio" } From 3c0697d97d6abbe046f489c8c259960d54eb56b8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:24:52 +0100 Subject: [PATCH 20/26] Update dependency org.eclipse.platform:org.eclipse.osgi to v3.20.0 (#8454) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e5fb9bfe6d1e..629631f38d75 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -33,7 +33,7 @@ clikt = "com.github.ajalt.clikt:clikt:4.4.0" codehaus-signature-java18 = "org.codehaus.mojo.signature:java18:1.0" conscrypt-android = { module = "org.conscrypt:conscrypt-android", version.ref = "org-conscrypt" } conscrypt-openjdk = { module = "org.conscrypt:conscrypt-openjdk-uber", version.ref = "org-conscrypt" } -eclipseOsgi = "org.eclipse.platform:org.eclipse.osgi:3.19.0" +eclipseOsgi = "org.eclipse.platform:org.eclipse.osgi:3.20.0" findbugs-jsr305 = "com.google.code.findbugs:jsr305:3.0.2" gradlePlugin-android = "com.android.tools.build:gradle:8.2.0" gradlePlugin-androidJunit5 = "de.mannodermaus.gradle.plugins:android-junit5:1.10.0.0" From 821ac849ea4ed6e002ade97314d54384356924f9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:25:07 +0100 Subject: [PATCH 21/26] Update org.jetbrains.coroutines to v1.8.1 (#8406) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 629631f38d75..2440f1a86292 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,7 +9,7 @@ kotlinx-serialization = "1.6.3" mockserverClient = "5.15.0" org-bouncycastle = "1.76" org-conscrypt = "2.5.2" -org-jetbrains-coroutines = "1.8.0" +org-jetbrains-coroutines = "1.8.1" org-jetbrains-kotlin = "1.9.23" org-junit-jupiter = "5.10.2" testcontainers = "1.19.8" From 717aea70482dbff08d6eacafd1c8e6376f461a9c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:25:15 +0100 Subject: [PATCH 22/26] Update dependency com.vanniktech:gradle-maven-publish-plugin to v0.29.0 (#8453) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2440f1a86292..07c7bf25c3e7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -45,7 +45,7 @@ gradlePlugin-errorprone = "net.ltgt.gradle:gradle-errorprone-plugin:4.0.1" gradlePlugin-graal = "com.palantir.graal:gradle-graal:0.12.0" gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "org-jetbrains-kotlin" } gradlePlugin-kotlinSerialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "org-jetbrains-kotlin" } -gradlePlugin-mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.28.0" +gradlePlugin-mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.29.0" gradlePlugin-shadow = "gradle.plugin.com.github.johnrengelman:shadow:8.0.0" gradlePlugin-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.25.0" guava-jre = "com.google.guava:guava:33.2.1-jre" From ad4c4f02860565e7217f23713f22c215f3bfce75 Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Sun, 23 Jun 2024 18:02:02 +0100 Subject: [PATCH 23/26] Maven dependency checks (#8431) * Testing maven dependency checks * Bump to 1.9.24 --- build.gradle.kts | 2 ++ gradle/libs.versions.toml | 7 ++++++- samples/tlssurvey/build.gradle.kts | 8 ++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 9c4702f37d57..befab1665954 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -26,6 +26,7 @@ buildscript { classpath(libs.gradlePlugin.spotless) classpath(libs.gradlePlugin.mavenPublish) classpath(libs.gradlePlugin.binaryCompatibilityValidator) + classpath(libs.gradlePlugin.mavenSympathy) } repositories { @@ -88,6 +89,7 @@ subprojects { apply(plugin = "checkstyle") apply(plugin = "ru.vyarus.animalsniffer") apply(plugin = "biz.aQute.bnd.builder") + apply(plugin = "io.github.usefulness.maven-sympathy") tasks.withType { options.encoding = Charsets.UTF_8.toString() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 07c7bf25c3e7..e6c01abf22d8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,12 +6,14 @@ com-squareup-okio = "3.9.0" de-mannodermaus-junit5 = "1.4.0" graalvm = "22.3.2" kotlinx-serialization = "1.6.3" +ksp = "1.9.24-1.0.20" mockserverClient = "5.15.0" org-bouncycastle = "1.76" org-conscrypt = "2.5.2" org-jetbrains-coroutines = "1.8.1" -org-jetbrains-kotlin = "1.9.23" +org-jetbrains-kotlin = "1.9.24" org-junit-jupiter = "5.10.2" +retrofit = "2.11.0" testcontainers = "1.19.8" [libraries] @@ -33,6 +35,7 @@ clikt = "com.github.ajalt.clikt:clikt:4.4.0" codehaus-signature-java18 = "org.codehaus.mojo.signature:java18:1.0" conscrypt-android = { module = "org.conscrypt:conscrypt-android", version.ref = "org-conscrypt" } conscrypt-openjdk = { module = "org.conscrypt:conscrypt-openjdk-uber", version.ref = "org-conscrypt" } +converter-moshi = { module = "com.squareup.retrofit2:converter-moshi", version.ref = "retrofit" } eclipseOsgi = "org.eclipse.platform:org.eclipse.osgi:3.20.0" findbugs-jsr305 = "com.google.code.findbugs:jsr305:3.0.2" gradlePlugin-android = "com.android.tools.build:gradle:8.2.0" @@ -46,6 +49,7 @@ gradlePlugin-graal = "com.palantir.graal:gradle-graal:0.12.0" gradlePlugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "org-jetbrains-kotlin" } gradlePlugin-kotlinSerialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "org-jetbrains-kotlin" } gradlePlugin-mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.29.0" +gradlePlugin-mavenSympathy = "io.github.usefulness.maven-sympathy:io.github.usefulness.maven-sympathy.gradle.plugin:0.3.0" gradlePlugin-shadow = "gradle.plugin.com.github.johnrengelman:shadow:8.0.0" gradlePlugin-spotless = "com.diffplug.spotless:spotless-plugin-gradle:6.25.0" guava-jre = "com.google.guava:guava:33.2.1-jre" @@ -81,6 +85,7 @@ mockserver-client = { module = "org.mock-server:mockserver-client-java-no-depend nativeImageSvm = { module = "org.graalvm.nativeimage:svm", version.ref = "graalvm" } openjsse = "org.openjsse:openjsse:1.1.14" playservices-safetynet = "com.google.android.gms:play-services-safetynet:18.1.0" +retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } robolectric-android = "org.robolectric:android-all:14-robolectric-10818077" robolectric = "org.robolectric:robolectric:4.12.2" signature-android-apilevel21 = "net.sf.androidscents.signature:android-api-level-21:5.0.1_r2" diff --git a/samples/tlssurvey/build.gradle.kts b/samples/tlssurvey/build.gradle.kts index aa1c1192a297..37400b86988c 100644 --- a/samples/tlssurvey/build.gradle.kts +++ b/samples/tlssurvey/build.gradle.kts @@ -1,7 +1,7 @@ plugins { kotlin("jvm") application - id("com.google.devtools.ksp").version("1.9.23-1.0.20") + id("com.google.devtools.ksp").version(libs.versions.ksp) } application { @@ -13,12 +13,12 @@ dependencies { implementation(projects.okhttpCoroutines) implementation(libs.conscrypt.openjdk) - implementation("com.squareup.retrofit2:retrofit:2.11.0") - implementation("com.squareup.retrofit2:converter-moshi:2.11.0") + implementation(libs.retrofit) + implementation(libs.converter.moshi) implementation(libs.squareup.moshi) implementation(libs.squareup.moshi.kotlin) - ksp("com.squareup.moshi:moshi-kotlin-codegen:1.15.1") + ksp(libs.squareup.moshi.compiler) } tasks.compileJava { From defcfc7c74b8004beb7403557f87b50a3556c4da Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 06:33:36 +0100 Subject: [PATCH 24/26] Update dependency androidx.test.espresso:espresso-core to v3.6.1 (#8465) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e6c01abf22d8..f6fd905f4ebb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -20,7 +20,7 @@ testcontainers = "1.19.8" amazonCorretto = "software.amazon.cryptools:AmazonCorrettoCryptoProvider:2.3.3" androidx-activity = "androidx.activity:activity-ktx:1.9.0" androidx-annotation = "androidx.annotation:annotation:1.8.0" -androidx-espresso-core = "androidx.test.espresso:espresso-core:3.5.1" +androidx-espresso-core = "androidx.test.espresso:espresso-core:3.6.1" androidx-junit = "androidx.test.ext:junit:1.1.5" androidx-test-runner = "androidx.test:runner:1.5.2" animalsniffer-annotations = "org.codehaus.mojo:animal-sniffer-annotations:1.23" From c85c3dbbee94e2bb8ed86ed29da0148842bb493e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 06:33:49 +0100 Subject: [PATCH 25/26] Update junit5 monorepo (#8464) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f6fd905f4ebb..20f8b7a69755 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,7 +12,7 @@ org-bouncycastle = "1.76" org-conscrypt = "2.5.2" org-jetbrains-coroutines = "1.8.1" org-jetbrains-kotlin = "1.9.24" -org-junit-jupiter = "5.10.2" +org-junit-jupiter = "5.10.3" retrofit = "2.11.0" testcontainers = "1.19.8" @@ -63,8 +63,8 @@ junit-ktx = "androidx.test.ext:junit-ktx:1.1.5" junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "org-junit-jupiter" } junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "org-junit-jupiter" } junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "org-junit-jupiter" } -junit-platform-console = "org.junit.platform:junit-platform-console:1.10.2" -junit-vintage-engine = "org.junit.vintage:junit-vintage-engine:5.10.2" +junit-platform-console = "org.junit.platform:junit-platform-console:1.10.3" +junit-vintage-engine = "org.junit.vintage:junit-vintage-engine:5.10.3" junit-pioneer = "org.junit-pioneer:junit-pioneer:1.9.1" junit5android-core = { module = "de.mannodermaus.junit5:android-test-core", version.ref = "de-mannodermaus-junit5" } junit5android-runner = { module = "de.mannodermaus.junit5:android-test-runner", version.ref = "de-mannodermaus-junit5" } From bc1bb4be120a653ef08e8d64d102c9d178545a91 Mon Sep 17 00:00:00 2001 From: Endeavour233 <43426962+Endeavour233@users.noreply.github.com> Date: Sat, 6 Jul 2024 17:38:30 +0800 Subject: [PATCH 26/26] update doc for body field (#8420) --- okhttp/src/main/kotlin/okhttp3/Response.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/okhttp/src/main/kotlin/okhttp3/Response.kt b/okhttp/src/main/kotlin/okhttp3/Response.kt index 517c1047f987..6fd6fdf9567a 100644 --- a/okhttp/src/main/kotlin/okhttp3/Response.kt +++ b/okhttp/src/main/kotlin/okhttp3/Response.kt @@ -84,7 +84,7 @@ class Response internal constructor( * from [Call.execute]. Response bodies must be [closed][ResponseBody] and may * be consumed only once. * - * This always returns null on responses returned from [cacheResponse], [networkResponse], + * This always returns an unreadable [ResponseBody], which may implement [ResponseBody.contentType] and [ResponseBody.contentLength], on responses returned from [cacheResponse], [networkResponse], * and [priorResponse]. */ @get:JvmName("body") val body: ResponseBody,