Skip to content

Commit

Permalink
Got rid of commons dependency (#49)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
ArnyminerZ authored Jul 5, 2024
1 parent b8be778 commit e5450fa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import org.jetbrains.dokka.gradle.DokkaTask
import java.net.URL
import org.jetbrains.dokka.gradle.DokkaTask

repositories {
mavenCentral()
Expand Down Expand Up @@ -45,7 +45,6 @@ tasks.withType<DokkaTask>().configureEach {

dependencies {
api(libs.okhttp)
implementation(libs.commons.lang3)
api(libs.xpp3)

testImplementation(libs.junit4)
Expand Down
2 changes: 0 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
[versions]
commons-lang3 = "3.14.0"
dokka = "1.9.20"
junit4 = "4.13.2"
kotlin = "2.0.0"
okhttpVersion = "4.12.0"
xpp3Version = "1.1.6"

[libraries]
commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commons-lang3" }
junit4 = { module = "junit:junit", version.ref = "junit4" }
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttpVersion" }
okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttpVersion" }
Expand Down
11 changes: 5 additions & 6 deletions src/test/kotlin/at/bitfire/dav4jvm/HttpUtilsTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@

package at.bitfire.dav4jvm

import okhttp3.HttpUrl.Companion.toHttpUrl
import org.apache.commons.lang3.time.TimeZones
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test
import java.time.Instant
import java.time.LocalDate
import java.time.LocalTime
Expand All @@ -20,6 +15,10 @@ import java.time.format.DateTimeFormatter
import java.util.Calendar
import java.util.Locale
import java.util.TimeZone
import okhttp3.HttpUrl.Companion.toHttpUrl
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test

class HttpUtilsTest {

Expand All @@ -35,7 +34,7 @@ class HttpUtilsTest {

@Test
fun formatDate() {
val cal = Calendar.getInstance(TimeZone.getTimeZone(TimeZones.GMT_ID))
val cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"))
cal.set(2023, 4, 11, 17, 26, 35)
cal.timeZone = TimeZone.getTimeZone("UTC")
assertEquals("Sun, 06 Nov 1994 08:49:37 GMT", HttpUtils.formatDate(
Expand Down

0 comments on commit e5450fa

Please sign in to comment.