Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb767d3d authored by Nihar Thakkar's avatar Nihar Thakkar
Browse files

Merge remote-tracking branch 'origin/bitfireAT/master'

# Conflicts:
#	build.gradle
parents 83026fed 999c499c
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line

buildscript {
    ext.kotlin_version = '1.2.50'
    ext.dokka_version = '0.9.16'
    ext.kotlin_version = '1.2.71'
    ext.dokka_version = '0.9.17'

    repositories {
        jcenter()
@@ -9,7 +9,7 @@ buildscript {
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.3'
        classpath 'com.android.tools.build:gradle:3.2.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:${dokka_version}"
    }
@@ -29,12 +29,12 @@ ext {
}

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        minSdkVersion 23
        targetSdkVersion 27
        minSdkVersion 19
        targetSdkVersion 28

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

@@ -61,10 +61,10 @@ android {
}

dependencies {
    api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

    api "org.mnode.ical4j:ical4j:$ical4j_version"
    api 'org.slf4j:slf4j-jdk14:1.7.25'
    implementation 'org.slf4j:slf4j-jdk14:1.7.25'

    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test:rules:1.0.2'
+1 −1
Original line number Diff line number Diff line
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ class BatchOperation(
) {

    private val queue = LinkedList<Operation>()
    private lateinit var results: Array<ContentProviderResult?>
    private var results = arrayOfNulls<ContentProviderResult?>(0)


    fun nextBackrefIdx() = queue.size
+2 −2
Original line number Diff line number Diff line
@@ -221,10 +221,10 @@ class Event: ICalendar() {
            exception.dtEnd?.timeZone?.let(usedTimeZones::add)
        }

        // add minified VTIMEZONE components
        // add VTIMEZONE components
        usedTimeZones.forEach {
            val tz = it.vTimeZone
            dtStart?.let { minifyVTimeZone(tz, it.date) }
            // TODO dtStart?.let { minifyVTimeZone(tz, it.date) }
            ical.components += tz
        }

+13 −3
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ import org.junit.Assert.*
import org.junit.Test
import java.io.FileNotFoundException
import java.io.InputStreamReader
import java.lang.AssertionError
import java.nio.charset.Charset

class EventTest {
@@ -37,11 +38,20 @@ class EventTest {
        assertEquals("中华人民共和国", e.location)
    }

    fun testParsingCustomTimezone() {
        val events = parseCalendar("custom-timezone.ics")
    @Test(expected = AssertionError::class)
    fun testDstOnlyVtimezone() {
        // Google Calendar (and maybe others) generate iCalendars which contain VTIMEZONE definitions
        // with only a DAYLIGHT component (and no STANDARD component). This is technically valid,
        // but results in wrong dates in ical4j:
        // https://github.com/ical4j/ical4j/issues/230
        val events = parseCalendar("dst-only-vtimezone.ics")
        assertEquals(1, events.size)
        val e = events.first()
        assertEquals("XXX", e.dtStart!!.timeZone.id)
        assertEquals("only-dst@example.com", e.uid)
        val dtStart = e.dtStart!!
        assertEquals("Europe/Berlin", dtStart.timeZone.id)
        // FIXME this should not fail, but it does:
        assertEquals(1522738800000L, dtStart.date.time)
    }

    @Test
Loading