Skip to content

Commit 52b134c

Browse files
committed
Fix some build warnings
1 parent 4462735 commit 52b134c

File tree

4 files changed

+53
-29
lines changed

4 files changed

+53
-29
lines changed

.idea/deploymentTargetSelector.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ kotlin {
1010
jvmToolchain(17)
1111
}
1212
android {
13-
namespace 'com.phpbg.easysync'
13+
namespace = 'com.phpbg.easysync'
1414
compileSdk 36
1515

1616
defaultConfig {
@@ -20,7 +20,7 @@ android {
2020
targetSdk 36
2121
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2222
vectorDrawables {
23-
useSupportLibrary true
23+
useSupportLibrary = true
2424
}
2525
versionCode 21
2626
versionName "1.21"
@@ -33,7 +33,7 @@ android {
3333
buildTypes {
3434
release {
3535
minifyEnabled true
36-
shrinkResources true
36+
shrinkResources = true
3737
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
3838
}
3939
}
@@ -55,11 +55,11 @@ android {
5555
targetCompatibility JavaVersion.VERSION_17
5656
}
5757
buildFeatures {
58-
compose true
59-
buildConfig true
58+
compose = true
59+
buildConfig = true
6060
}
6161
composeOptions {
62-
kotlinCompilerExtensionVersion '1.5.3'
62+
kotlinCompilerExtensionVersion = '1.5.3'
6363
}
6464
packagingOptions {
6565
resources {

app/src/test/java/com/phpbg/easysync/dav/ParseTest.kt

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,29 @@ import java.time.format.DateTimeFormatter
3232
class ParseTest {
3333
@Test
3434
fun propfind_collection_works() {
35-
val stream = this.javaClass.classLoader.getResourceAsStream("propfind.xml")
35+
val stream = this.javaClass.classLoader!!.getResourceAsStream("propfind.xml")
3636
val rootPath = RootPath("https://foo")
3737
val res = WebDavService.parsePropfind(stream.reader(), rootPath)
3838
assert(res.size == 8)
3939
}
4040

4141
@Test
4242
fun propfind_mailbox_org_works() {
43-
val stream = this.javaClass.classLoader.getResourceAsStream("propfind_mailbox_org.xml")
43+
val stream = this.javaClass.classLoader!!.getResourceAsStream("propfind_mailbox_org.xml")
4444
val rootPath = RootPath("https://foo")
4545
val res = WebDavService.parsePropfind(stream.reader(), rootPath)
4646
assert(res.size == 4)
4747
val expected = Resource(
4848
rootPath = rootPath,
4949
href = "/servlet/webdav.infostore/",
50-
creationdate = ZonedDateTime.parse("Tue, 11 Jun 2024 20:35:13 GMT", DateTimeFormatter.RFC_1123_DATE_TIME).toInstant(),
51-
getlastmodified = ZonedDateTime.parse("Tue, 11 Jun 2024 20:35:13 GMT", DateTimeFormatter.RFC_1123_DATE_TIME).toInstant(),
50+
creationdate = ZonedDateTime.parse(
51+
"Tue, 11 Jun 2024 20:35:13 GMT",
52+
DateTimeFormatter.RFC_1123_DATE_TIME
53+
).toInstant(),
54+
getlastmodified = ZonedDateTime.parse(
55+
"Tue, 11 Jun 2024 20:35:13 GMT",
56+
DateTimeFormatter.RFC_1123_DATE_TIME
57+
).toInstant(),
5258
isCollection = true,
5359
getetag = null,
5460
getcontentlength = null,
@@ -59,14 +65,17 @@ class ParseTest {
5965

6066
@Test
6167
fun propfind_file_works() {
62-
val stream = this.javaClass.classLoader.getResourceAsStream("file.xml")
68+
val stream = this.javaClass.classLoader!!.getResourceAsStream("file.xml")
6369
val rootPath = RootPath("https://foo")
6470
val res = WebDavService.parsePropfind(stream.reader(), rootPath)
6571
val expected = Resource(
6672
rootPath = rootPath,
6773
href = "/remote.php/dav/files/foouser/DCIM/bar.jpg",
6874
creationdate = null,
69-
getlastmodified = ZonedDateTime.parse("Sat, 10 Jun 2023 21:06:18 GMT", DateTimeFormatter.RFC_1123_DATE_TIME).toInstant(),
75+
getlastmodified = ZonedDateTime.parse(
76+
"Sat, 10 Jun 2023 21:06:18 GMT",
77+
DateTimeFormatter.RFC_1123_DATE_TIME
78+
).toInstant(),
7079
isCollection = false,
7180
getetag = "\"bacfa6f123dee073dc9e20774470681a\"",
7281
getcontentlength = "425623",
@@ -77,14 +86,20 @@ class ParseTest {
7786

7887
@Test
7988
fun propfind_apache_file_works() {
80-
val stream = this.javaClass.classLoader.getResourceAsStream("file_apache.xml")
89+
val stream = this.javaClass.classLoader!!.getResourceAsStream("file_apache.xml")
8190
val rootPath = RootPath("https://foo")
8291
val res = WebDavService.parsePropfind(stream.reader(), rootPath)
8392
val expected = Resource(
8493
rootPath = rootPath,
8594
href = "/remote.php/dav/files/foouser/DCIM/bar.jpg",
86-
creationdate = ZonedDateTime.parse("2024-01-08T19:14:11Z", DateTimeFormatter.ISO_DATE_TIME).toInstant(),
87-
getlastmodified = ZonedDateTime.parse("Mon, 08 Jan 2024 19:14:11 GMT", DateTimeFormatter.RFC_1123_DATE_TIME).toInstant(),
95+
creationdate = ZonedDateTime.parse(
96+
"2024-01-08T19:14:11Z",
97+
DateTimeFormatter.ISO_DATE_TIME
98+
).toInstant(),
99+
getlastmodified = ZonedDateTime.parse(
100+
"Mon, 08 Jan 2024 19:14:11 GMT",
101+
DateTimeFormatter.RFC_1123_DATE_TIME
102+
).toInstant(),
88103
isCollection = false,
89104
getetag = "\"bacfa6f123dee073dc9e20774470681a\"",
90105
getcontentlength = "425623",
@@ -95,14 +110,17 @@ class ParseTest {
95110

96111
@Test
97112
fun propfind_uri_decode_works() {
98-
val stream = this.javaClass.classLoader.getResourceAsStream("file_uri_encoded.xml")
113+
val stream = this.javaClass.classLoader!!.getResourceAsStream("file_uri_encoded.xml")
99114
val rootPath = RootPath("https://foo")
100115
val res = WebDavService.parsePropfind(stream.reader(), rootPath)
101116
val expected = Resource(
102117
rootPath = rootPath,
103118
href = "/remote.php/dav/files/foouser/Foo Bar/2023-08-01.jpg",
104119
creationdate = null,
105-
getlastmodified = ZonedDateTime.parse("Sat, 10 Jun 2023 21:06:18 GMT", DateTimeFormatter.RFC_1123_DATE_TIME).toInstant(),
120+
getlastmodified = ZonedDateTime.parse(
121+
"Sat, 10 Jun 2023 21:06:18 GMT",
122+
DateTimeFormatter.RFC_1123_DATE_TIME
123+
).toInstant(),
106124
isCollection = false,
107125
getetag = "\"bacfa6f123dee073dc9e20774470681a\"",
108126
getcontentlength = "425623",
@@ -113,14 +131,17 @@ class ParseTest {
113131

114132
@Test
115133
fun propfind_uri_decode2_works() {
116-
val stream = this.javaClass.classLoader.getResourceAsStream("file_uri_encoded2.xml")
134+
val stream = this.javaClass.classLoader!!.getResourceAsStream("file_uri_encoded2.xml")
117135
val rootPath = RootPath("https://foo")
118136
val res = WebDavService.parsePropfind(stream.reader(), rootPath)
119137
val expected = Resource(
120138
rootPath = rootPath,
121139
href = "/remote.php/dav/files/foouser/#1234 (1).pdf",
122140
creationdate = null,
123-
getlastmodified = ZonedDateTime.parse("Sat, 10 Jun 2023 21:06:18 GMT", DateTimeFormatter.RFC_1123_DATE_TIME).toInstant(),
141+
getlastmodified = ZonedDateTime.parse(
142+
"Sat, 10 Jun 2023 21:06:18 GMT",
143+
DateTimeFormatter.RFC_1123_DATE_TIME
144+
).toInstant(),
124145
isCollection = false,
125146
getetag = "\"bacfa6f123dee073dc9e20774470681a\"",
126147
getcontentlength = "425623",
@@ -131,14 +152,17 @@ class ParseTest {
131152

132153
@Test
133154
fun propfind_directory_works() {
134-
val stream = this.javaClass.classLoader.getResourceAsStream("directory.xml")
155+
val stream = this.javaClass.classLoader!!.getResourceAsStream("directory.xml")
135156
val rootPath = RootPath("https://foo")
136157
val res = WebDavService.parsePropfind(stream.reader(), rootPath)
137158
val expected = Resource(
138159
rootPath = rootPath,
139160
href = "/remote.php/dav/files/foouser/Documents/",
140161
creationdate = null,
141-
getlastmodified = ZonedDateTime.parse("Thu, 01 Jun 2023 08:16:46 GMT", DateTimeFormatter.RFC_1123_DATE_TIME).toInstant(),
162+
getlastmodified = ZonedDateTime.parse(
163+
"Thu, 01 Jun 2023 08:16:46 GMT",
164+
DateTimeFormatter.RFC_1123_DATE_TIME
165+
).toInstant(),
142166
isCollection = true,
143167
getetag = "\"647853ef0e5ec\"",
144168
)

build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
33
dependencies {
4-
classpath "org.jetbrains.kotlin:kotlin-serialization:2.2.20"
4+
classpath "org.jetbrains.kotlin:kotlin-serialization:2.2.21"
55
}
66
}
77
plugins {
8-
id 'com.android.application' version '8.12.3' apply false
9-
id 'com.android.library' version '8.12.3' apply false
10-
id 'org.jetbrains.kotlin.android' version '2.2.20' apply false
11-
id 'com.google.devtools.ksp' version '2.2.10-2.0.2' apply false
12-
id 'org.jetbrains.kotlin.plugin.compose' version '2.2.20' apply false
8+
id 'com.android.application' version '8.13.1' apply false
9+
id 'com.android.library' version '8.13.1' apply false
10+
id 'org.jetbrains.kotlin.android' version '2.2.21' apply false
11+
id 'com.google.devtools.ksp' version '2.2.21-2.0.4' apply false
12+
id 'org.jetbrains.kotlin.plugin.compose' version '2.2.21' apply false
1313
}

0 commit comments

Comments
 (0)