JitPack-only publishing conflicts with FAIL_ON_PROJECT_REPOS, artifacts are unsigned and not immutable, and upstream shipped two breaking majors 19 days apart. 2.2.1 is the last OkHttp release: 3.0.0 moved to Ktor and 4.x needs Java 21, and SYNC.md's whole auth section is written in OkHttp terms, so 4.x would have invalidated it. A plain JVM module, not an Android library — the tree has no Android imports and keeping it that way keeps the floret-kit extraction a file move. Four changes from upstream, all in dav/PROVENANCE.md: - commons-lang3 dropped (one import, one call). The replacement requires the whole string to be consumed, as DateUtils did: pattern 1 ends in a literal 'GMT', so SimpleDateFormat would match "...GMT+02:00" as a prefix and throw the offset away. - HTTP dates were parsed and formatted in the device's local zone — the GMT in the format string is a quoted literal and timeZone was never set, so every getlastmodified was out by the local UTC offset. Upstream tests dates nowhere. The formatter is also no longer shared and mutable. - dav4jvm#209: permanent redirects now reach the caller via DavResource.permanentLocation, cleared per request so it never describes an earlier one. - xpp3 is compileOnly; Android supplies org.xmlpull.v1. SYNC.md's other claimed defect, "does not follow 303", is not true of 2.2.1 — pinned by a test rather than removed from the notes. CI names :dav:test explicitly; testDebugUnitTest is Android-only and would have run none of the vendored suite. lintDebug added to the per-chunk checks after it caught a literal byte-order mark left by chunk 1.
37 lines
1.4 KiB
Kotlin
37 lines
1.4 KiB
Kotlin
plugins {
|
|
// No version: AGP already puts the Kotlin plugin on the build classpath, and
|
|
// asking for one here fails resolution ("already on the classpath with an
|
|
// unknown version"). The version is the catalogue's `kotlin`, via AGP.
|
|
id("org.jetbrains.kotlin.jvm")
|
|
}
|
|
|
|
// A plain JVM library on purpose: the vendored tree has no Android imports and
|
|
// must not gain any. That keeps it portable — `docs/SYNC.md` earmarks this layer
|
|
// for floret-kit's `core-dav`, and Calendula needs the same primitives.
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlin {
|
|
compilerOptions {
|
|
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api(libs.okhttp)
|
|
|
|
// Android supplies org.xmlpull.v1 in the framework, so the 371 KB xpp3 jar is
|
|
// a compile-time stand-in only and never reaches the APK. The unit tests run
|
|
// on a plain JVM, which has no framework, so they get the real thing.
|
|
compileOnly(libs.xpp3)
|
|
testImplementation(libs.xpp3)
|
|
|
|
// Upstream's own suite, vendored with the code. It is JUnit 4 while :app is
|
|
// JUnit 5; rewriting it would forfeit the regression coverage that makes
|
|
// vendoring safe, which is the same call provider/PROVENANCE.md made.
|
|
testImplementation(libs.junit4)
|
|
testImplementation(libs.okhttp.mockwebserver)
|
|
}
|