Skip to content

Commit c6a41f2

Browse files
Fix spotless
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
1 parent eeff723 commit c6a41f2

74 files changed

Lines changed: 399 additions & 249 deletions

File tree

Some content is hidden

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

gradle/verification-metadata.xml

Lines changed: 109 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
</trusted-artifacts>
1010
<ignored-keys>
1111
<ignored-key id="31D2D79DF7E85DD3" reason="Key couldn't be downloaded from any key server"/>
12+
<ignored-key id="479D601F3A7B5C1A" reason="Key couldn't be downloaded from any key server"/>
1213
</ignored-keys>
1314
<trusted-keys>
1415
<trusted-key id="015479E1055341431B4545AB72475FD306B9CAB7" group="com.googlecode.javaewah" name="JavaEWAH" version="1.2.3"/>
@@ -78,7 +79,10 @@
7879
<trusting group="org.slf4j"/>
7980
</trusted-key>
8081
<trusted-key id="4797B4F5DCC46CEA61059071A1AE06236CA2BA62" group="^com[.]diffplug($|([.].*))" regex="true"/>
81-
<trusted-key id="47EB6836245D2D40E89DFB4136D4E9618F3ADAB5" group="io.github.oshai" name="kotlin-logging-jvm" version="5.1.4"/>
82+
<trusted-key id="47EB6836245D2D40E89DFB4136D4E9618F3ADAB5">
83+
<trusting group="io.github.oshai" name="kotlin-logging-jvm" version="5.1.4"/>
84+
<trusting group="io.github.oshai" name="kotlin-logging-jvm" version="7.0.3"/>
85+
</trusted-key>
8286
<trusted-key id="48B086A7D843CFA258E83286928FBF39003C0425" group="org.springframework"/>
8387
<trusted-key id="4BF79B8259007B566D2FCE82296CD27F60EED12C" group="com.google.crypto.tink" name="tink" version="1.7.0"/>
8488
<trusted-key id="4C5F68D09D42BA7FAC888DF9A929EA2321FDBF8F">
@@ -3802,6 +3806,110 @@
38023806
<sha256 value="8bf6142812148a2abf6850b272f0af4c3d8ff1121ed604c402f3f38c9e6546ab" origin="Generated by Gradle"/>
38033807
</artifact>
38043808
</component>
3809+
<component group="com.github.ajalt.clikt" name="clikt" version="5.0.2">
3810+
<artifact name="clikt-5.0.2.module">
3811+
<sha256 value="471ce7619c63102f7dfcc0336ca43ed7da5916460b71d0060caddef90b5053ce" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3812+
</artifact>
3813+
</component>
3814+
<component group="com.github.ajalt.clikt" name="clikt-core" version="5.0.2">
3815+
<artifact name="clikt-core-5.0.2.module">
3816+
<sha256 value="c1ac6535f361e6cb80510b2fcf37cc8f54a48911522ae9ec62cef71dc2021af9" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3817+
</artifact>
3818+
</component>
3819+
<component group="com.github.ajalt.clikt" name="clikt-core-jvm" version="5.0.2">
3820+
<artifact name="clikt-core-jvm-5.0.2.module">
3821+
<sha256 value="2016cc15ab9bbf50ab36a60f481973535523ebd32cd1bae103998a60d9b19c38" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3822+
</artifact>
3823+
<artifact name="clikt-jvm.jar">
3824+
<sha256 value="18b2df30a3395a37823ec432375a15b485d292b6575e30ef184cc9e7c07d8b87" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3825+
</artifact>
3826+
</component>
3827+
<component group="com.github.ajalt.clikt" name="clikt-jvm" version="5.0.2">
3828+
<artifact name="clikt-jvm-5.0.2.module">
3829+
<sha256 value="5cfdf05d50da81661b104bb983ed16cd8c90fa0be2a1dfe4fb8b4136d1a47ffe" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3830+
</artifact>
3831+
<artifact name="clikt-mordant-jvm.jar">
3832+
<sha256 value="0835107b51d57214d5a2e15d4b214fdd66b3eee5bb3acf96ff35b23bd4a36cde" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3833+
</artifact>
3834+
</component>
3835+
<component group="com.github.ajalt.colormath" name="colormath" version="3.6.0">
3836+
<artifact name="colormath-3.6.0.module">
3837+
<sha256 value="6907aa497adb9af63812c75366389ced3e6bb8bee80e7b239adb4c53673f8884" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3838+
</artifact>
3839+
</component>
3840+
<component group="com.github.ajalt.colormath" name="colormath-jvm" version="3.6.0">
3841+
<artifact name="colormath-jvm-3.6.0.module">
3842+
<sha256 value="3fa76730f989e0284df182fcec85620d9b48ae3221398841ac6caf88462f62f8" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3843+
</artifact>
3844+
<artifact name="colormath-jvm.jar">
3845+
<sha256 value="59f741adfe62053066782d8b1a45afd06685a4bc64b33277e54876b993ed885c" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3846+
</artifact>
3847+
</component>
3848+
<component group="com.github.ajalt.mordant" name="mordant" version="3.0.1">
3849+
<artifact name="mordant-3.0.1.module">
3850+
<sha256 value="9492dc7f636026df2e9429229b9d807b5774d2e641510d90bf829bd2acb3b615" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3851+
</artifact>
3852+
</component>
3853+
<component group="com.github.ajalt.mordant" name="mordant-core" version="3.0.1">
3854+
<artifact name="mordant-core-3.0.1.module">
3855+
<sha256 value="05697ac5c055f14876709fd4e9fd5e8c3d15a61ac77ac572f916449932a08c2f" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3856+
</artifact>
3857+
</component>
3858+
<component group="com.github.ajalt.mordant" name="mordant-core-jvm" version="3.0.1">
3859+
<artifact name="mordant-core-jvm-3.0.1.module">
3860+
<sha256 value="e4744c471074e5ecd4161f7070b4594df00ef178af044265905e5ed1ceb5ac92" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3861+
</artifact>
3862+
<artifact name="mordant-jvm.jar">
3863+
<sha256 value="9cf9b46d1f49f2d6cf2635462b29dc59e0c29b1fb2f085b3312888bbe9c7cd31" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3864+
</artifact>
3865+
</component>
3866+
<component group="com.github.ajalt.mordant" name="mordant-jvm" version="3.0.1">
3867+
<artifact name="mordant-jvm-3.0.1.module">
3868+
<sha256 value="a5e4f2312b7af420c6d832c303891c1a0d8637ccfa5a94d89f1146c4866980ba" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3869+
</artifact>
3870+
<artifact name="mordant-omnibus-jvm.jar">
3871+
<sha256 value="9ed3b976fcccc78da746d49866fa8ebb8f10530a93c544ea0420259a607dd95e" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3872+
</artifact>
3873+
</component>
3874+
<component group="com.github.ajalt.mordant" name="mordant-jvm-ffm" version="3.0.1">
3875+
<artifact name="mordant-jvm-ffm-3.0.1.module">
3876+
<sha256 value="d85ae0fb49fb6d714789b43f31b567528c9b8adf86d0ebb98694a41a91e09a67" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3877+
</artifact>
3878+
</component>
3879+
<component group="com.github.ajalt.mordant" name="mordant-jvm-ffm-jvm" version="3.0.1">
3880+
<artifact name="mordant-jvm-ffm-jvm-3.0.1.module">
3881+
<sha256 value="884d71fcb7c1010ae6d75aa891ae54a989861154b07f1215cd545f0e4837e15d" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3882+
</artifact>
3883+
<artifact name="mordant-jvm-ffm-jvm.jar">
3884+
<sha256 value="2041c2f5f7b87095b115cb19155ee9257451854d08e5b8671165b43bc7e114cf" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3885+
</artifact>
3886+
</component>
3887+
<component group="com.github.ajalt.mordant" name="mordant-jvm-graal-ffi" version="3.0.1">
3888+
<artifact name="mordant-jvm-graal-ffi-3.0.1.module">
3889+
<sha256 value="aaefda20672483b3b0b260dd1ef1342ce6b34ece88bad6df39ae1b26050c8c0a" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3890+
</artifact>
3891+
</component>
3892+
<component group="com.github.ajalt.mordant" name="mordant-jvm-graal-ffi-jvm" version="3.0.1">
3893+
<artifact name="mordant-jvm-graal-ffi-jvm-3.0.1.module">
3894+
<sha256 value="0d819b6bfbbca4ee97b33078668129690766aff948fc1c831788f4e034853ac3" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3895+
</artifact>
3896+
<artifact name="mordant-jvm-graal-ffi-jvm.jar">
3897+
<sha256 value="6dd4bebc164aeacddacc8f98e8f871e00fd21ce7bc2eb0d18230ea83bddfc86a" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3898+
</artifact>
3899+
</component>
3900+
<component group="com.github.ajalt.mordant" name="mordant-jvm-jna" version="3.0.1">
3901+
<artifact name="mordant-jvm-jna-3.0.1.module">
3902+
<sha256 value="727fb516234e8bafc92795e2ecbd0da3854d723a16c69842ac61920bf58879b9" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3903+
</artifact>
3904+
</component>
3905+
<component group="com.github.ajalt.mordant" name="mordant-jvm-jna-jvm" version="3.0.1">
3906+
<artifact name="mordant-jvm-jna-jvm-3.0.1.module">
3907+
<sha256 value="78170d925d3baa758662f97633616390de90d42a2c94e3763eaa590576378e1e" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3908+
</artifact>
3909+
<artifact name="mordant-jvm-jna-jvm.jar">
3910+
<sha256 value="41063442c8891b2774536a9b87a5062a7fd20e6f1949974c6da72f49472d6f4d" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
3911+
</artifact>
3912+
</component>
38053913
<component group="com.github.bitfireAT" name="dav4jvm" version="2.2.1">
38063914
<artifact name="dav4jvm-2.2.1.jar">
38073915
<sha256 value="5ce40389fc7ba0b630f07cbd2a573a507db616aed0ffdc744fb78000d8835815" origin="Generated by Gradle" reason="Artifact is not signed">

library/src/androidTest/java/com/nextcloud/android/lib/resources/dashboard/DashboardListWidgetsRemoteOperationIT.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ class DashboardListWidgetsRemoteOperationIT : AbstractIT() {
2727
assertTrue(result.resultData["recommendations"]?.buttons?.getOrNull(0) == null)
2828

2929
assertEquals(1, result.resultData["activity"]?.buttons?.size)
30-
assertTrue(result.resultData["activity"]?.buttons?.getOrNull(0)?.type == DashBoardButtonType.MORE)
30+
assertTrue(
31+
result.resultData["activity"]
32+
?.buttons
33+
?.getOrNull(0)
34+
?.type == DashBoardButtonType.MORE
35+
)
3136
assertTrue(result.resultData["activity"]?.roundIcons == false)
3237

3338
assertTrue(result.resultData["user_status"]?.roundIcons == true)

library/src/androidTest/java/com/nextcloud/android/lib/resources/files/ToggleFileLockRemoteOperationIT.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class ToggleFileLockRemoteOperationIT : AbstractIT() {
3030
assertTrue(
3131
@Suppress("Detekt.MagicNumber")
3232
UploadFileRemoteOperation(filePath, remotePath, "text/markdown", 1464818400)
33-
.execute(client).isSuccess
33+
.execute(client)
34+
.isSuccess
3435
)
3536
val initialFile =
3637
ReadFileRemoteOperation(remotePath).execute(client).singleData as RemoteFile

library/src/androidTest/java/com/nextcloud/android/lib/resources/search/SearchProvidersRemoteOperationIT.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class SearchProvidersRemoteOperationIT : AbstractIT() {
4040
// only on < NC20
4141
val ocCapability =
4242
GetCapabilitiesRemoteOperation()
43-
.execute(nextcloudClient).singleData as OCCapability
43+
.execute(nextcloudClient)
44+
.singleData as OCCapability
4445
assumeTrue(
4546
ocCapability.version.isOlderThan(OwnCloudVersion.nextcloud_20)
4647
)

library/src/androidTest/java/com/nextcloud/android/lib/resources/search/UnifiedSearchRemoteOperationIT.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ class UnifiedSearchRemoteOperationIT : AbstractIT() {
4747
assertTrue(CreateFolderRemoteOperation(remotePath, true).execute(client).isSuccess)
4848
val remoteFile =
4949
ReadFileRemoteOperation(remotePath)
50-
.execute(client).data[0] as RemoteFile
50+
.execute(client)
51+
.data[0] as RemoteFile
5152
val fileId = remoteFile.localId
5253

5354
val result = UnifiedSearchRemoteOperation("files", "test").execute(nextcloudClient)

library/src/androidTest/java/com/nextcloud/extensions/DavPropertyProcessorTest.kt

Lines changed: 16 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ import org.w3c.dom.Document
1818
import org.w3c.dom.Element
1919

2020
class DavPropertyProcessorTest {
21-
data class TestData(val name: String, val age: Int)
21+
data class TestData(
22+
val name: String,
23+
val age: Int
24+
)
2225

2326
private val gson = Gson()
2427

@@ -27,21 +30,13 @@ class DavPropertyProcessorTest {
2730
val result =
2831
gson.fromDavProperty<TestData>(
2932
object : DavProperty<String> {
30-
override fun toXml(document: Document?): Element {
31-
return createElement("TestData", value)
32-
}
33+
override fun toXml(document: Document?): Element = createElement("TestData", value)
3334

34-
override fun getName(): DavPropertyName {
35-
return DavPropertyName.DISPLAYNAME
36-
}
35+
override fun getName(): DavPropertyName = DavPropertyName.DISPLAYNAME
3736

38-
override fun getValue(): String {
39-
return "{\"name\":\"John\",\"age\":55}"
40-
}
37+
override fun getValue(): String = "{\"name\":\"John\",\"age\":55}"
4138

42-
override fun isInvisibleInAllprop(): Boolean {
43-
return true
44-
}
39+
override fun isInvisibleInAllprop(): Boolean = true
4540
}
4641
)
4742
val expected = TestData("John", 55)
@@ -53,21 +48,13 @@ class DavPropertyProcessorTest {
5348
val result =
5449
gson.fromDavProperty<ArrayList<String>>(
5550
object : DavProperty<String> {
56-
override fun toXml(document: Document?): Element {
57-
return createElement("TestData", value)
58-
}
51+
override fun toXml(document: Document?): Element = createElement("TestData", value)
5952

60-
override fun getName(): DavPropertyName {
61-
return DavPropertyName.DISPLAYNAME
62-
}
53+
override fun getName(): DavPropertyName = DavPropertyName.DISPLAYNAME
6354

64-
override fun getValue(): String {
65-
return "{\"name\":\"John\",\"age\":55}"
66-
}
55+
override fun getValue(): String = "{\"name\":\"John\",\"age\":55}"
6756

68-
override fun isInvisibleInAllprop(): Boolean {
69-
return true
70-
}
57+
override fun isInvisibleInAllprop(): Boolean = true
7158
}
7259
)
7360
assertNull(result)
@@ -78,21 +65,13 @@ class DavPropertyProcessorTest {
7865
val result =
7966
gson.fromDavProperty<TestData>(
8067
object : DavProperty<String?> {
81-
override fun toXml(document: Document?): Element {
82-
return createElement("TestData", "")
83-
}
68+
override fun toXml(document: Document?): Element = createElement("TestData", "")
8469

85-
override fun getName(): DavPropertyName {
86-
return DavPropertyName.DISPLAYNAME
87-
}
70+
override fun getName(): DavPropertyName = DavPropertyName.DISPLAYNAME
8871

89-
override fun getValue(): String? {
90-
return null
91-
}
72+
override fun getValue(): String? = null
9273

93-
override fun isInvisibleInAllprop(): Boolean {
94-
return true
95-
}
74+
override fun isInvisibleInAllprop(): Boolean = true
9675
}
9776
)
9877
assertNull(result)

library/src/androidTest/java/com/nextcloud/test/RandomStringGenerator.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ object RandomStringGenerator {
1313

1414
@JvmOverloads
1515
@JvmStatic
16-
fun make(length: Int = DEFAULT_LENGTH): String {
17-
return (1..length)
16+
fun make(length: Int = DEFAULT_LENGTH): String =
17+
(1..length)
1818
.map { ALLOWED_CHARACTERS.random() }
1919
.joinToString("")
20-
}
2120
}

library/src/androidTest/java/com/owncloud/android/RetryTestRule.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ import org.junit.runners.model.Statement
1515
/**
1616
* C&p from https://stackoverflow.com/questions/45635833/how-can-i-use-flakytest-annotation-now on 18.03.2020
1717
*/
18-
class RetryTestRule(val retryCount: Int = 1) : TestRule {
18+
class RetryTestRule(
19+
val retryCount: Int = 1
20+
) : TestRule {
1921
companion object {
2022
private val TAG = RetryTestRule::class.java.simpleName
2123
}
2224

2325
override fun apply(
2426
base: Statement,
2527
description: Description
26-
): Statement {
27-
return statement(base, description)
28-
}
28+
): Statement = statement(base, description)
2929

3030
@Suppress("TooGenericExceptionCaught") // and this exactly what we want here
3131
private fun statement(base: Statement, description: Description): Statement {

library/src/androidTest/java/com/owncloud/android/lib/common/UsernameVariationsIT.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import org.junit.runner.RunWith
1515
import org.junit.runners.Parameterized
1616

1717
@RunWith(Parameterized::class)
18-
class UsernameVariationsIT(private val username: String) : AbstractIT() {
18+
class UsernameVariationsIT(
19+
private val username: String
20+
) : AbstractIT() {
1921
companion object {
2022
@Parameterized.Parameters(name = "{0}")
2123
@JvmStatic

library/src/androidTest/java/com/owncloud/android/lib/resources/assistant/v2/AssistantV2Tests.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ class AssistantV2Tests : AbstractIT() {
2424
testOnlyOnServer(NextcloudVersion.nextcloud_30)
2525
}
2626

27-
private fun getTaskType(): TaskTypeData {
28-
return TaskTypeData(
27+
private fun getTaskType(): TaskTypeData =
28+
TaskTypeData(
2929
"core:text2text",
3030
"Free text to text prompt",
3131
"Runs an arbitrary prompt through a language model that returns a reply",
@@ -44,7 +44,6 @@ class AssistantV2Tests : AbstractIT() {
4444
)
4545
)
4646
)
47-
}
4847

4948
private fun getSelectedTaskType(): String = "core:text2text"
5049

0 commit comments

Comments
 (0)