mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-11-22 16:23:55 +00:00
migration onto new klock and fixes in android manifest
This commit is contained in:
parent
3d6fee7257
commit
7c4217bda6
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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?
|
||||
|
@ -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?
|
||||
|
@ -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.*
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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.*
|
||||
|
@ -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.*
|
||||
|
||||
|
@ -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
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
package dev.inmo.krontab.internal
|
||||
|
||||
import com.soywiz.klock.DateTime
|
||||
import korlibs.time.DateTime
|
||||
import dev.inmo.krontab.KronScheduler
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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")
|
||||
|
@ -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")
|
||||
|
@ -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.*
|
||||
|
@ -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.*
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1 +0,0 @@
|
||||
<manifest package="dev.inmo.krontab"/>
|
@ -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
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user