diff --git a/build.gradle b/build.gradle index 4b06a23..936e8ea 100644 --- a/build.gradle +++ b/build.gradle @@ -58,6 +58,7 @@ kotlin { publishAllLibraryVariants() } linuxX64() + mingwX64() sourceSets { @@ -104,8 +105,9 @@ kotlin { apply plugin: 'com.getkeepsafe.dexcount' android { - compileSdkVersion "$android_compileSdkVersion".toInteger() + compileSdk "$android_compileSdkVersion".toInteger() buildToolsVersion "$android_buildToolsVersion" + namespace "${group}.${project.name}" defaultConfig { minSdkVersion "$android_minSdkVersion".toInteger() diff --git a/src/commonMain/kotlin/dev/inmo/krontab/Executes.kt b/src/commonMain/kotlin/dev/inmo/krontab/Executes.kt index fc77cc7..d106fa2 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/Executes.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/Executes.kt @@ -1,7 +1,7 @@ package dev.inmo.krontab -import com.soywiz.klock.DateTime -import com.soywiz.klock.DateTimeTz +import korlibs.time.DateTime +import korlibs.time.DateTimeTz import kotlinx.coroutines.delay import kotlinx.coroutines.isActive import kotlin.coroutines.coroutineContext diff --git a/src/commonMain/kotlin/dev/inmo/krontab/KronScheduler.kt b/src/commonMain/kotlin/dev/inmo/krontab/KronScheduler.kt index 5dc31c7..289bb50 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/KronScheduler.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/KronScheduler.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab -import com.soywiz.klock.DateTime +import korlibs.time.DateTime /** * This interface was created for abstraction of [next] operation. Currently, there is only diff --git a/src/commonMain/kotlin/dev/inmo/krontab/KronSchedulerTz.kt b/src/commonMain/kotlin/dev/inmo/krontab/KronSchedulerTz.kt index 2550efd..301aa19 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/KronSchedulerTz.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/KronSchedulerTz.kt @@ -1,7 +1,7 @@ package dev.inmo.krontab -import com.soywiz.klock.DateTime -import com.soywiz.klock.DateTimeTz +import korlibs.time.DateTime +import korlibs.time.DateTimeTz /** * This interface extending [KronScheduler] to use [DateTimeTz] with taking into account offset of incoming time for diff --git a/src/commonMain/kotlin/dev/inmo/krontab/LambdaKronScheduler.kt b/src/commonMain/kotlin/dev/inmo/krontab/LambdaKronScheduler.kt index 5bef0a6..effd3be 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/LambdaKronScheduler.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/LambdaKronScheduler.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab -import com.soywiz.klock.DateTime +import korlibs.time.DateTime class LambdaKronScheduler( private val onNext: suspend (DateTime) -> DateTime? diff --git a/src/commonMain/kotlin/dev/inmo/krontab/LambdaKronSchedulerTz.kt b/src/commonMain/kotlin/dev/inmo/krontab/LambdaKronSchedulerTz.kt index 35327ed..e6f08fd 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/LambdaKronSchedulerTz.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/LambdaKronSchedulerTz.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab -import com.soywiz.klock.DateTimeTz +import korlibs.time.DateTimeTz class LambdaKronSchedulerTz( private val onNext: suspend (DateTimeTz) -> DateTimeTz? diff --git a/src/commonMain/kotlin/dev/inmo/krontab/SchedulerShortcuts.kt b/src/commonMain/kotlin/dev/inmo/krontab/SchedulerShortcuts.kt index 9dc6043..00dea44 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/SchedulerShortcuts.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/SchedulerShortcuts.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.krontab.builder.buildSchedule import dev.inmo.krontab.internal.* diff --git a/src/commonMain/kotlin/dev/inmo/krontab/StringParser.kt b/src/commonMain/kotlin/dev/inmo/krontab/StringParser.kt index 1a3b1e2..3e4c5bf 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/StringParser.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/StringParser.kt @@ -1,7 +1,7 @@ package dev.inmo.krontab -import com.soywiz.klock.TimezoneOffset -import com.soywiz.klock.minutes +import korlibs.time.TimezoneOffset +import korlibs.time.minutes import dev.inmo.krontab.internal.* import dev.inmo.krontab.utils.Minutes diff --git a/src/commonMain/kotlin/dev/inmo/krontab/builder/SchedulerBuilder.kt b/src/commonMain/kotlin/dev/inmo/krontab/builder/SchedulerBuilder.kt index 6fb441e..a930da5 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/builder/SchedulerBuilder.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/builder/SchedulerBuilder.kt @@ -1,7 +1,7 @@ package dev.inmo.krontab.builder -import com.soywiz.klock.TimezoneOffset -import com.soywiz.klock.minutes +import korlibs.time.TimezoneOffset +import korlibs.time.minutes import dev.inmo.krontab.KronScheduler import dev.inmo.krontab.KronSchedulerTz import dev.inmo.krontab.internal.* diff --git a/src/commonMain/kotlin/dev/inmo/krontab/collection/CollectionKronScheduler.kt b/src/commonMain/kotlin/dev/inmo/krontab/collection/CollectionKronScheduler.kt index 64fc73a..c66425f 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/collection/CollectionKronScheduler.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/collection/CollectionKronScheduler.kt @@ -1,7 +1,7 @@ package dev.inmo.krontab.collection -import com.soywiz.klock.DateTime -import com.soywiz.klock.DateTimeTz +import korlibs.time.DateTime +import korlibs.time.DateTimeTz import dev.inmo.krontab.* import dev.inmo.krontab.internal.* diff --git a/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTime.kt b/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTime.kt index a27e330..574877f 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTime.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTime.kt @@ -1,7 +1,7 @@ package dev.inmo.krontab.internal -import com.soywiz.klock.DateTime -import com.soywiz.klock.TimezoneOffset +import korlibs.time.DateTime +import korlibs.time.TimezoneOffset import dev.inmo.krontab.KronScheduler /** diff --git a/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTimeScheduler.kt b/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTimeScheduler.kt index c76195e..36a7bd3 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTimeScheduler.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTimeScheduler.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab.internal -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import dev.inmo.krontab.KronScheduler /** diff --git a/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTimeSchedulerTz.kt b/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTimeSchedulerTz.kt index 06de207..23ce855 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTimeSchedulerTz.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/internal/CronDateTimeSchedulerTz.kt @@ -1,8 +1,8 @@ package dev.inmo.krontab.internal -import com.soywiz.klock.DateTime -import com.soywiz.klock.DateTimeTz -import com.soywiz.klock.TimezoneOffset +import korlibs.time.DateTime +import korlibs.time.DateTimeTz +import korlibs.time.TimezoneOffset import dev.inmo.krontab.KronScheduler import dev.inmo.krontab.KronSchedulerTz diff --git a/src/commonMain/kotlin/dev/inmo/krontab/internal/NearDateTimeCalculator.kt b/src/commonMain/kotlin/dev/inmo/krontab/internal/NearDateTimeCalculator.kt index 2e3576b..9853bf5 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/internal/NearDateTimeCalculator.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/internal/NearDateTimeCalculator.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab.internal -import com.soywiz.klock.* +import korlibs.time.* import dev.inmo.krontab.utils.copy import kotlin.math.min diff --git a/src/commonMain/kotlin/dev/inmo/krontab/utils/DateTimeCopy.kt b/src/commonMain/kotlin/dev/inmo/krontab/utils/DateTimeCopy.kt index 4fdef64..d9b7b9c 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/utils/DateTimeCopy.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/utils/DateTimeCopy.kt @@ -1,7 +1,7 @@ package dev.inmo.krontab.utils -import com.soywiz.klock.DateTime -import com.soywiz.klock.Month +import korlibs.time.DateTime +import korlibs.time.Month import kotlin.math.min fun DateTime.copy( diff --git a/src/commonMain/kotlin/dev/inmo/krontab/utils/SchedulerFlow.kt b/src/commonMain/kotlin/dev/inmo/krontab/utils/SchedulerFlow.kt index 61d4e46..55971d2 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/utils/SchedulerFlow.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/utils/SchedulerFlow.kt @@ -1,8 +1,8 @@ package dev.inmo.krontab.utils -import com.soywiz.klock.DateTime -import com.soywiz.klock.DateTimeTz -import com.soywiz.klock.milliseconds +import korlibs.time.DateTime +import korlibs.time.DateTimeTz +import korlibs.time.milliseconds import dev.inmo.krontab.KronScheduler import dev.inmo.krontab.next import kotlinx.coroutines.currentCoroutineContext diff --git a/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeFilters.kt b/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeFilters.kt index 1e6b91e..3e8eed0 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeFilters.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeFilters.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab.utils.flows -import com.soywiz.klock.* +import korlibs.time.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeTzFilters.kt b/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeTzFilters.kt index e259ca0..efb38de 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeTzFilters.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeTzFilters.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab.utils.flows -import com.soywiz.klock.* +import korlibs.time.* import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter diff --git a/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeTzWhen.kt b/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeTzWhen.kt index 8fa156d..8a88d39 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeTzWhen.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeTzWhen.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab.utils.flows -import com.soywiz.klock.* +import korlibs.time.* import kotlinx.coroutines.flow.Flow @Suppress("NOTHING_TO_INLINE") diff --git a/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeWhen.kt b/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeWhen.kt index 9867254..4beef1b 100644 --- a/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeWhen.kt +++ b/src/commonMain/kotlin/dev/inmo/krontab/utils/flows/DateTimeWhen.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab.utils.flows -import com.soywiz.klock.* +import korlibs.time.* import kotlinx.coroutines.flow.Flow @Suppress("NOTHING_TO_INLINE") diff --git a/src/commonTest/kotlin/dev/inmo/krontab/utils/CheckMonthsAndDaysCorrectWork.kt b/src/commonTest/kotlin/dev/inmo/krontab/utils/CheckMonthsAndDaysCorrectWork.kt index f62841e..e4615e3 100644 --- a/src/commonTest/kotlin/dev/inmo/krontab/utils/CheckMonthsAndDaysCorrectWork.kt +++ b/src/commonTest/kotlin/dev/inmo/krontab/utils/CheckMonthsAndDaysCorrectWork.kt @@ -1,7 +1,7 @@ package dev.inmo.krontab.utils -import com.soywiz.klock.DateTime -import com.soywiz.klock.days +import korlibs.time.DateTime +import korlibs.time.days import dev.inmo.krontab.buildSchedule import kotlinx.coroutines.test.runTest import kotlin.test.* diff --git a/src/commonTest/kotlin/dev/inmo/krontab/utils/StringParseTest.kt b/src/commonTest/kotlin/dev/inmo/krontab/utils/StringParseTest.kt index cc8e9ed..3e76d0a 100644 --- a/src/commonTest/kotlin/dev/inmo/krontab/utils/StringParseTest.kt +++ b/src/commonTest/kotlin/dev/inmo/krontab/utils/StringParseTest.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab.utils -import com.soywiz.klock.* +import korlibs.time.* import dev.inmo.krontab.KronSchedulerTz import dev.inmo.krontab.buildSchedule import kotlinx.coroutines.* diff --git a/src/commonTest/kotlin/dev/inmo/krontab/utils/TimeZoneTest.kt b/src/commonTest/kotlin/dev/inmo/krontab/utils/TimeZoneTest.kt index 119a7fb..d538e2d 100644 --- a/src/commonTest/kotlin/dev/inmo/krontab/utils/TimeZoneTest.kt +++ b/src/commonTest/kotlin/dev/inmo/krontab/utils/TimeZoneTest.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab.utils -import com.soywiz.klock.* +import korlibs.time.* import dev.inmo.krontab.builder.buildSchedule import dev.inmo.krontab.next import kotlinx.coroutines.test.runTest diff --git a/src/commonTest/kotlin/dev/inmo/krontab/utils/WeekDaysTest.kt b/src/commonTest/kotlin/dev/inmo/krontab/utils/WeekDaysTest.kt index be346b4..d64d53a 100644 --- a/src/commonTest/kotlin/dev/inmo/krontab/utils/WeekDaysTest.kt +++ b/src/commonTest/kotlin/dev/inmo/krontab/utils/WeekDaysTest.kt @@ -1,6 +1,6 @@ package dev.inmo.krontab.utils -import com.soywiz.klock.* +import korlibs.time.* import dev.inmo.krontab.builder.buildSchedule import kotlinx.coroutines.test.runTest import kotlin.math.ceil diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml deleted file mode 100644 index 0ecc4fb..0000000 --- a/src/main/AndroidManifest.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/main/kotlin/dev/inmo/krontab/KronSchedulerWork.kt b/src/main/kotlin/dev/inmo/krontab/KronSchedulerWork.kt index e22d4b2..d5a93ec 100644 --- a/src/main/kotlin/dev/inmo/krontab/KronSchedulerWork.kt +++ b/src/main/kotlin/dev/inmo/krontab/KronSchedulerWork.kt @@ -2,7 +2,7 @@ package dev.inmo.krontab import android.content.Context import androidx.work.* -import com.soywiz.klock.DateTime +import korlibs.time.DateTime import java.util.concurrent.TimeUnit /**