Skip to content

Commit 516dc70

Browse files
committed
Move TokenInfo to gcpbuildcache project
This class is not used by the s3buildcache plugin Test: ./gradlew test
1 parent b7902a3 commit 516dc70

File tree

4 files changed

+8
-13
lines changed

4 files changed

+8
-13
lines changed

core/build.gradle.kts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,8 @@ plugins {
2121

2222
dependencies {
2323
implementation(gradleApi())
24-
implementation(platform(libs.okhttp.bom))
2524
api(platform(libs.kotlin.bom))
2625
api(libs.kotlin.stdlib)
27-
implementation(libs.retrofit.core)
28-
implementation(libs.retrofit.converter.gson)
29-
implementation(libs.google.gson)
30-
implementation(libs.okhttp)
3126
}
3227

3328
kotlin {

gcpbuildcache/src/main/kotlin/androidx/build/gradle/gcpbuildcache/GcpStorageService.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ package androidx.build.gradle.gcpbuildcache
2020
import androidx.build.gradle.core.FileHandleInputStream
2121
import androidx.build.gradle.core.FileHandleInputStream.Companion.handleInputStream
2222
import androidx.build.gradle.core.StorageService
23-
import androidx.build.gradle.core.TokenInfoService
2423
import com.google.api.gax.retrying.RetrySettings
2524
import com.google.auth.oauth2.GoogleCredentials
2625
import com.google.cloud.http.HttpTransportOptions

core/src/main/kotlin/androidx/build/gradle/core/NetworkErrorInterceptor.kt renamed to gcpbuildcache/src/main/kotlin/androidx/build/gradle/gcpbuildcache/NetworkErrorInterceptor.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 The Android Open Source Project
2+
* Copyright 2025 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,14 +15,14 @@
1515
*
1616
*/
1717

18-
package androidx.build.gradle.core
18+
package androidx.build.gradle.gcpbuildcache
1919

2020
import okhttp3.Interceptor
2121
import okhttp3.Response
2222
import org.gradle.api.GradleException
2323
import java.io.IOException
2424

25-
class NetworkErrorInterceptor : Interceptor{
25+
class NetworkErrorInterceptor : Interceptor {
2626
override fun intercept(chain: Interceptor.Chain): Response {
2727
val request = chain.request()
2828
return try {
@@ -33,4 +33,4 @@ class NetworkErrorInterceptor : Interceptor{
3333
" without accessing network resources.")
3434
}
3535
}
36-
}
36+
}

core/src/main/kotlin/androidx/build/gradle/core/TokenInfo.kt renamed to gcpbuildcache/src/main/kotlin/androidx/build/gradle/gcpbuildcache/TokenInfo.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 The Android Open Source Project
2+
* Copyright 2025 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
1515
*
1616
*/
1717

18-
package androidx.build.gradle.core
18+
package androidx.build.gradle.gcpbuildcache
1919

2020
import com.google.gson.Gson
2121
import com.google.gson.GsonBuilder
@@ -32,7 +32,8 @@ internal fun gson(config: GsonBuilder.() -> Unit = {}): Gson {
3232
config.invoke(builder)
3333
return builder.create()
3434
}
35-
interface TokenInfoService {
35+
36+
internal interface TokenInfoService {
3637
@GET("/oauth2/v1/tokeninfo")
3738
fun tokenInfo(@Query("access_token") accessToken: String): Call<Unit>
3839

0 commit comments

Comments
 (0)