Skip to content

Commit a228fd6

Browse files
authored
Reformat with Spotless (#8180)
* Enable spotless * Run spotlessApply * Fixup trimMargin * Re-run spotlessApply
1 parent 0e312d7 commit a228fd6

File tree

442 files changed

+24924
-18474
lines changed

Some content is hidden

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

442 files changed

+24924
-18474
lines changed

.editorconfig

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ root = true
22

33
[*]
44
indent_size = 2
5+
ij_continuation_indent_size = 2
56
charset = utf-8
67
trim_trailing_whitespace = true
78
insert_final_newline = true
89

910
[*.{kt, kts}]
10-
kotlin_imports_layout = ascii
11+
ij_kotlin_imports_layout = *

android-test-app/src/androidTest/kotlin/okhttp/android/testapp/PublicSuffixDatabaseTest.kt

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import org.junit.Test
2424
* Run with "./gradlew :android-test-app:connectedCheck -PandroidBuild=true" and make sure ANDROID_SDK_ROOT is set.
2525
*/
2626
class PublicSuffixDatabaseTest {
27-
2827
@Test
2928
fun testTopLevelDomain() {
3029
assertThat("https://www.google.com/robots.txt".toHttpUrl().topPrivateDomain()).isEqualTo("google.com")

android-test-app/src/main/kotlin/okhttp/android/testapp/MainActivity.kt

+17-16
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,13 @@ import android.os.Bundle
1919
import androidx.activity.ComponentActivity
2020
import okhttp3.Call
2121
import okhttp3.Callback
22-
import okhttp3.CookieJar
2322
import okhttp3.HttpUrl.Companion.toHttpUrl
2423
import okhttp3.OkHttpClient
2524
import okhttp3.Request
2625
import okhttp3.Response
27-
import okhttp3.internal.publicsuffix.PublicSuffixDatabase
28-
import okio.FileSystem
2926
import okio.IOException
30-
import okio.Path.Companion.toPath
31-
import java.net.CookieHandler
32-
import java.net.URI
3327

3428
class MainActivity : ComponentActivity() {
35-
3629
override fun onCreate(savedInstanceState: Bundle?) {
3730
super.onCreate(savedInstanceState)
3831

@@ -41,15 +34,23 @@ class MainActivity : ComponentActivity() {
4134
val url = "https://github.com/square/okhttp".toHttpUrl()
4235
println(url.topPrivateDomain())
4336

44-
client.newCall(Request(url)).enqueue(object : Callback {
45-
override fun onFailure(call: Call, e: IOException) {
46-
println("failed: $e")
47-
}
37+
client.newCall(Request(url)).enqueue(
38+
object : Callback {
39+
override fun onFailure(
40+
call: Call,
41+
e: IOException,
42+
) {
43+
println("failed: $e")
44+
}
4845

49-
override fun onResponse(call: Call, response: Response) {
50-
println("response: ${response.code}")
51-
response.close()
52-
}
53-
})
46+
override fun onResponse(
47+
call: Call,
48+
response: Response,
49+
) {
50+
println("response: ${response.code}")
51+
response.close()
52+
}
53+
},
54+
)
5455
}
5556
}

android-test-app/src/main/kotlin/okhttp/android/testapp/TestApplication.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ package okhttp.android.testapp
1717

1818
import android.app.Application
1919

20-
class TestApplication: Application() {
21-
}
20+
class TestApplication : Application()

0 commit comments

Comments
 (0)