Skip to content

Commit e5450fa

Browse files
authored
Got rid of commons dependency (#49)
* Got rid of commons dependency Signed-off-by: Arnau Mora <[email protected]> * Fixed import Signed-off-by: Arnau Mora <[email protected]> --------- Signed-off-by: Arnau Mora <[email protected]>
1 parent b8be778 commit e5450fa

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import org.jetbrains.dokka.gradle.DokkaTask
21
import java.net.URL
2+
import org.jetbrains.dokka.gradle.DokkaTask
33

44
repositories {
55
mavenCentral()
@@ -45,7 +45,6 @@ tasks.withType<DokkaTask>().configureEach {
4545

4646
dependencies {
4747
api(libs.okhttp)
48-
implementation(libs.commons.lang3)
4948
api(libs.xpp3)
5049

5150
testImplementation(libs.junit4)

gradle/libs.versions.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
[versions]
2-
commons-lang3 = "3.14.0"
32
dokka = "1.9.20"
43
junit4 = "4.13.2"
54
kotlin = "2.0.0"
65
okhttpVersion = "4.12.0"
76
xpp3Version = "1.1.6"
87

98
[libraries]
10-
commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commons-lang3" }
119
junit4 = { module = "junit:junit", version.ref = "junit4" }
1210
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttpVersion" }
1311
okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttpVersion" }

src/test/kotlin/at/bitfire/dav4jvm/HttpUtilsTest.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66

77
package at.bitfire.dav4jvm
88

9-
import okhttp3.HttpUrl.Companion.toHttpUrl
10-
import org.apache.commons.lang3.time.TimeZones
11-
import org.junit.Assert.assertEquals
12-
import org.junit.Assert.assertNull
13-
import org.junit.Test
149
import java.time.Instant
1510
import java.time.LocalDate
1611
import java.time.LocalTime
@@ -20,6 +15,10 @@ import java.time.format.DateTimeFormatter
2015
import java.util.Calendar
2116
import java.util.Locale
2217
import java.util.TimeZone
18+
import okhttp3.HttpUrl.Companion.toHttpUrl
19+
import org.junit.Assert.assertEquals
20+
import org.junit.Assert.assertNull
21+
import org.junit.Test
2322

2423
class HttpUtilsTest {
2524

@@ -35,7 +34,7 @@ class HttpUtilsTest {
3534

3635
@Test
3736
fun formatDate() {
38-
val cal = Calendar.getInstance(TimeZone.getTimeZone(TimeZones.GMT_ID))
37+
val cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"))
3938
cal.set(2023, 4, 11, 17, 26, 35)
4039
cal.timeZone = TimeZone.getTimeZone("UTC")
4140
assertEquals("Sun, 06 Nov 1994 08:49:37 GMT", HttpUtils.formatDate(

0 commit comments

Comments
 (0)