Skip to content

Commit c30444d

Browse files
Merge remote-tracking branch 'origin/master' into garm
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me> # Conflicts: # .github/workflows/assemble.yml # .github/workflows/codeql.yml # .github/workflows/scorecard.yml # .github/workflows/stale.yml
2 parents 48efb42 + 3e863b1 commit c30444d

11 files changed

Lines changed: 80 additions & 17 deletions

File tree

.drone_old.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ services:
101101
- su www-data -c "php /var/www/html/occ groupfolders:create groupfolder"
102102
- su www-data -c "php /var/www/html/occ groupfolders:group 1 users"
103103
- su www-data -c "git clone --depth 1 https://github.com/nextcloud/notifications.git /var/www/html/apps/notifications/"
104+
- su www-data -c "cd /var/www/html/apps/notifications; composer install --no-dev"
104105
- su www-data -c "php /var/www/html/occ app:enable -f notifications"
105106
- su www-data -c "php /var/www/html/occ notification:generate test -d test"
106107
- su www-data -c "git clone --depth 1 https://github.com/nextcloud/photos.git /var/www/html/apps/photos/"
@@ -222,6 +223,7 @@ services:
222223
- su www-data -c "php /var/www/html/occ groupfolders:create groupfolder"
223224
- su www-data -c "php /var/www/html/occ groupfolders:group 1 users"
224225
- su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/notifications.git /var/www/html/apps/notifications/"
226+
- su www-data -c "cd /var/www/html/apps/notifications; composer install --no-dev"
225227
- su www-data -c "php /var/www/html/occ app:enable -f notifications"
226228
- su www-data -c "php /var/www/html/occ notification:generate test test"
227229
- su www-data -c "git clone --depth 1 -b $SERVER_VERSION https://github.com/nextcloud/photos.git /var/www/html/apps/photos/"
@@ -247,6 +249,6 @@ trigger:
247249
- pull_request
248250
---
249251
kind: signature
250-
hmac: 828e44f1fb916caed5fc723c2a817d2c649e97aadea3165cccf3ed1c5f973a05
252+
hmac: d51bba0f9e5754b040cc2a99847a261a21e283074dabffa811f0c0eaf11f6968
251253

252254
...

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
~ SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
33
~ SPDX-License-Identifier: MIT
44
-->
5-
# [Nextcloud](https://nextcloud.com) Android Library v2 [![Build Status](https://drone.nextcloud.com/api/badges/nextcloud/android-library/status.svg)](https://drone.nextcloud.com/nextcloud/android-library) [![REUSE status](https://api.reuse.software/badge/github.com/nextcloud/android-library)](https://api.reuse.software/info/github.com/nextcloud/android-library) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/d9f94f04e0f447a6b21c0ae08f6f7594)](https://www.codacy.com/app/Nextcloud/android-library?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=nextcloud/android-library&amp;utm_campaign=Badge_Grade)
5+
# [Nextcloud](https://nextcloud.com) Android Library v2 [![Build Status](https://drone.nextcloud.com/api/badges/nextcloud/android-library/status.svg)](https://drone.nextcloud.com/nextcloud/android-library) [![REUSE status](https://api.reuse.software/badge/github.com/nextcloud/android-library)](https://api.reuse.software/info/github.com/nextcloud/android-library) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/690e6d4227e24c65bc0edd545ebffb69)](https://app.codacy.com/gh/nextcloud/android-library/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
66

77
## Introduction
88
Using Nextcloud Android library it will be the easiest way to communicate with Nextcloud servers.
@@ -128,3 +128,4 @@ configurations.all {
128128
exclude group: "log4j", module: "log4j"
129129
}
130130
```
131+

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
buildscript {
1414
ext {
15-
kotlin_version = '2.3.0'
15+
kotlin_version = '2.3.10'
1616
jacoco_version = '0.8.14'
1717
}
1818
}

gradle/verification-metadata.xml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
<trusted-key id="0A784736254716AC0EBEF6E2365D826E84B11B58" group="com.karumi"/>
3838
<trusted-key id="0CC641C3A62453AB390066C4A41F13C999945293" group="commons-logging" name="commons-logging" version="1.2"/>
3939
<trusted-key id="0D35D3F60078655126908E8AF3D1600878E85A3D" group="io.netty"/>
40+
<trusted-key id="0E225917414670F4442C250DFD533C07C264648F">
41+
<trusting group="androidx.databinding"/>
42+
<trusting group="^com[.]android($|([.].*))" regex="true"/>
43+
</trusted-key>
4044
<trusted-key id="0F06FF86BEEAF4E71866EE5232EE5355A6BC6E42">
4145
<trusting group="androidx.core"/>
4246
<trusting group="androidx.databinding"/>
@@ -112,6 +116,7 @@
112116
<trusted-key id="4797B4F5DCC46CEA61059071A1AE06236CA2BA62" group="^com[.]diffplug($|([.].*))" regex="true"/>
113117
<trusted-key id="47EB6836245D2D40E89DFB4136D4E9618F3ADAB5">
114118
<trusting group="io.github.oshai" name="kotlin-logging-jvm" version="5.1.4"/>
119+
<trusting group="io.github.oshai" name="kotlin-logging-jvm" version="7.0.13"/>
115120
<trusting group="io.github.oshai" name="kotlin-logging-jvm" version="7.0.3"/>
116121
<trusting group="io.github.oshai" name="kotlin-logging-jvm" version="7.0.7"/>
117122
</trusted-key>
@@ -192,6 +197,7 @@
192197
<trusting group="org.eclipse.platform" name="org.eclipse.osgi" version="3.23.0"/>
193198
<trusting group="org.eclipse.platform" name="org.eclipse.osgi" version="3.23.100"/>
194199
<trusting group="org.eclipse.platform" name="org.eclipse.osgi" version="3.23.200"/>
200+
<trusting group="org.eclipse.platform" name="org.eclipse.osgi" version="3.24.0"/>
195201
</trusted-key>
196202
<trusted-key id="A31DDE881C3E3C4C985BD0D02C7F998F4272C851" group="com.diffplug.spotless"/>
197203
<trusted-key id="A413F67D71BEEC23ADD0CE0ACB43338E060CF9FA">
@@ -8080,6 +8086,11 @@
80808086
<sha256 value="58b0b4ed49b3b19072b55c7111c0991a07f9b6d20709af8aa470c714114afbfb" origin="Generated by Gradle" reason="Artifact is not signed"/>
80818087
</artifact>
80828088
</component>
8089+
<component group="com.diffplug.spotless" name="com.diffplug.spotless.gradle.plugin" version="8.2.1">
8090+
<artifact name="com.diffplug.spotless.gradle.plugin-8.2.1.pom">
8091+
<sha256 value="306b777dc39f44fec62b50bdefe41b716beb0fd7cd3f81572273a134c2e155b9" origin="Generated by Gradle" reason="Artifact is not signed"/>
8092+
</artifact>
8093+
</component>
80838094
<component group="com.diffplug.spotless" name="spotless-lib" version="3.0.2">
80848095
<artifact name="spotless-lib-3.0.2.jar">
80858096
<sha256 value="3f9a7fdfc5b03ac20894834170910c15c4f2b84ed4ce3677898a307ad589837c" origin="Generated by Gradle"/>
@@ -8128,6 +8139,14 @@
81288139
<sha256 value="4cb73d4d7bcd8c7b6bbf308f729d4cb79cccdcc6d7d37cc9379ac988707e1ad3" origin="Generated by Gradle"/>
81298140
</artifact>
81308141
</component>
8142+
<component group="com.diffplug.spotless" name="spotless-lib" version="4.3.0">
8143+
<artifact name="spotless-lib-4.3.0.jar">
8144+
<sha256 value="669f844ec0a974941c6da04b670748f43178239b6d99fddb5b062ce9d06d0939" origin="Generated by Gradle"/>
8145+
</artifact>
8146+
<artifact name="spotless-lib-4.3.0.module">
8147+
<sha256 value="2351c080fe2455334602ffd0a821d88adf62a53e6ea184c4395f4f5505de3723" origin="Generated by Gradle"/>
8148+
</artifact>
8149+
</component>
81318150
<component group="com.diffplug.spotless" name="spotless-lib-extra" version="3.0.2">
81328151
<artifact name="spotless-lib-extra-3.0.2.jar">
81338152
<sha256 value="b0e77746d633d445e78489ac3d08ad2ea1b3537c4d064e4abe46cc42d62303eb" origin="Generated by Gradle"/>
@@ -8176,6 +8195,14 @@
81768195
<sha256 value="67b0257f31b9e1d5dd9a4169229f9997a99c72c1f940cfa8e53c072bb8ebccfd" origin="Generated by Gradle"/>
81778196
</artifact>
81788197
</component>
8198+
<component group="com.diffplug.spotless" name="spotless-lib-extra" version="4.3.0">
8199+
<artifact name="spotless-lib-extra-4.3.0.jar">
8200+
<sha256 value="754f804c09dfa2eb8d53963311d2be68f1b4a5621011dcb550d702ead28651d9" origin="Generated by Gradle"/>
8201+
</artifact>
8202+
<artifact name="spotless-lib-extra-4.3.0.module">
8203+
<sha256 value="c8898905e692a7e08701357c3cad0d4fe26aa208cd7ab0ded8d70d3929cba112" origin="Generated by Gradle"/>
8204+
</artifact>
8205+
</component>
81798206
<component group="com.diffplug.spotless" name="spotless-plugin-gradle" version="7.0.2">
81808207
<artifact name="spotless-plugin-gradle-7.0.2.jar">
81818208
<sha256 value="59a34c4f84a48d4c8d929e2f89906369e65476ec0499a43de87c3e4127977cd5" origin="Generated by Gradle"/>
@@ -8224,6 +8251,14 @@
82248251
<sha256 value="892bfb7c1e1af32ae3b458fda95389f564186b2d4ccd62097046fc690cd49a68" origin="Generated by Gradle"/>
82258252
</artifact>
82268253
</component>
8254+
<component group="com.diffplug.spotless" name="spotless-plugin-gradle" version="8.2.1">
8255+
<artifact name="spotless-plugin-gradle-8.2.1.jar">
8256+
<sha256 value="dbf44f8df1832800241d4f135129fc921ba82fb22d72430cc42d4d3d5bbf9d3c" origin="Generated by Gradle"/>
8257+
</artifact>
8258+
<artifact name="spotless-plugin-gradle-8.2.1.module">
8259+
<sha256 value="38f6f6f24dd05a626c91cc163af4d3867abd50f086767aa64da25f320fa2939b" origin="Generated by Gradle"/>
8260+
</artifact>
8261+
</component>
82278262
<component group="com.fasterxml" name="oss-parent" version="56">
82288263
<artifact name="oss-parent-56.pom">
82298264
<sha256 value="fd491f78857424106d2e3d605bcd799b53d31a565cdc868463ca7e875db45a50" origin="Generated by Gradle"/>
@@ -13431,6 +13466,11 @@
1343113466
<sha256 value="d468bd1ab8817fc977783c6944b242a067beeda8dbb175509ed1a5a550ac2a91" origin="Generated by Gradle" reason="Artifact is not signed"/>
1343213467
</artifact>
1343313468
</component>
13469+
<component group="org.jetbrains.kotlin.plugin.serialization" name="org.jetbrains.kotlin.plugin.serialization.gradle.plugin" version="2.3.10">
13470+
<artifact name="org.jetbrains.kotlin.plugin.serialization.gradle.plugin-2.3.10.pom">
13471+
<sha256 value="39795daf2f2f2f0c6dcb7571be9569db7d9ed6326718c29198cddc73a0629e0e" origin="Generated by Gradle" reason="Artifact is not signed"/>
13472+
</artifact>
13473+
</component>
1343413474
<component group="org.jetbrains.kotlinx" name="atomicfu" version="0.20.2">
1343513475
<artifact name="atomicfu-0.20.2.module">
1343613476
<sha256 value="2c995e0e83c583e125706fba3fe85170020d17a88f89d6294a53cd8bd7c4c384" origin="Generated by Gradle"/>

library/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ buildscript {
1818
junit_version = '4.13.2'
1919
}
2020
dependencies {
21-
classpath 'com.android.tools.build:gradle:9.0.0'
21+
classpath 'com.android.tools.build:gradle:9.0.1'
2222
classpath 'com.github.spotbugs.snom:spotbugs-gradle-plugin:6.4.8'
2323
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
2424
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.8"
@@ -29,8 +29,8 @@ buildscript {
2929
}
3030

3131
plugins {
32-
id "com.diffplug.spotless" version "8.1.0"
33-
id 'org.jetbrains.kotlin.plugin.serialization' version '2.3.0'
32+
id "com.diffplug.spotless" version "8.2.1"
33+
id 'org.jetbrains.kotlin.plugin.serialization' version '2.3.10'
3434
}
3535

3636
apply plugin: 'com.android.library'

library/src/androidTest/java/com/owncloud/android/lib/resources/shares/UpdateShareRemoteOperationIT.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,11 @@ class UpdateShareRemoteOperationIT : AbstractIT() {
197197
result.message
198198
)
199199
}
200+
200201
capability.version.isNewerOrEqual(NextcloudVersion.nextcloud_21) -> {
201202
assertEquals("Password needs to be at least 8 characters long.", result.message)
202203
}
204+
203205
else -> {
204206
assertEquals("Password needs to be at least 8 characters long", result.message)
205207
}

library/src/main/java/com/nextcloud/android/lib/resources/clientintegration/ElementTypeAdapter.kt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,25 @@ class ElementTypeAdapter :
4545
val prefix = "com.nextcloud.android.lib.resources.clientintegration"
4646
val cls: Class<out Element> =
4747
when (typeName) {
48-
"Button" ->
48+
"Button" -> {
4949
Class.forName("$prefix.LayoutButton") as Class<out Element>
50+
}
5051

51-
"Text" ->
52+
"Text" -> {
5253
Class.forName("$prefix.LayoutText") as Class<out Element>
54+
}
5355

54-
"Image" ->
56+
"Image" -> {
5557
Class.forName("$prefix.LayoutImage") as Class<out Element>
58+
}
5659

57-
"URL" ->
60+
"URL" -> {
5861
Class.forName("$prefix.LayoutURL") as Class<out Element>
62+
}
5963

60-
else -> return null
64+
else -> {
65+
return null
66+
}
6167
}
6268

6369
return Gson().fromJson(json, cls)

library/src/main/java/com/nextcloud/android/lib/resources/files/ToggleFileLockRemoteOperation.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,13 @@ class ToggleFileLockRemoteOperation(
6060
private fun isSuccess(status: Int): Boolean =
6161
when (status) {
6262
HttpStatus.SC_OK -> true
63-
HttpStatus.SC_LOCKED -> toLock // treat "already locked" as success when trying to lock
64-
HttpStatus.SC_PRECONDITION_FAILED -> !toLock // used for "already unlocked" when trying to unlock
63+
64+
HttpStatus.SC_LOCKED -> toLock
65+
66+
// treat "already locked" as success when trying to lock
67+
HttpStatus.SC_PRECONDITION_FAILED -> !toLock
68+
69+
// used for "already unlocked" when trying to unlock
6570
else -> false
6671
}
6772

library/src/main/java/com/nextcloud/extensions/ArrayListExtensions.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ inline fun <reified T> ArrayList<*>.processXmlData(tagName: String): T? {
2020
Float::class -> {
2121
textContent.toFloatOrNull() as? T
2222
}
23+
2324
Double::class -> {
2425
textContent.toDoubleOrNull() as? T
2526
}
26-
else -> textContent as? T
27+
28+
else -> {
29+
textContent as? T
30+
}
2731
}
2832
}
2933
}

library/src/main/java/com/owncloud/android/lib/common/network/WebdavEntry.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,19 +393,22 @@ class WebdavEntry constructor(
393393
if (prop?.value != null) {
394394
tags =
395395
when (prop.value) {
396-
is ArrayList<*> ->
396+
is ArrayList<*> -> {
397397
(prop.value as ArrayList<*>)
398398
.filterIsInstance<Element>()
399399
.map { parseTag(it) }
400400
.toTypedArray()
401+
}
401402

402403
is Element -> {
403404
val element = (prop.value as Element)
404405
val tag = parseTag(element)
405406
arrayOf(tag)
406407
}
407408

408-
else -> emptyArray()
409+
else -> {
410+
emptyArray()
411+
}
409412
}
410413
}
411414

0 commit comments

Comments
 (0)