mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2024-11-26 03:58:50 +00:00
replace code into another package and modify publish script and properties file
This commit is contained in:
parent
726e68c114
commit
5c503f2070
@ -8,3 +8,5 @@ klockVersion=1.7.3
|
||||
|
||||
project_public_name=Krontab
|
||||
project_public_description=It is analog of crontab util for Kotlin Coroutines
|
||||
project_vcs_base=https://git.insanusmokrassar.com/InsanusMokrassar
|
||||
project_connection_base=git://git.insanusmokrassar.com/insanusmokrassar
|
||||
|
@ -25,12 +25,10 @@ publishing {
|
||||
resolveStrategy = Closure.DELEGATE_FIRST
|
||||
name "${project_public_name}"
|
||||
description "${project_public_description}"
|
||||
url "https://insanusmokrassar.github.io/${project.name}"
|
||||
|
||||
scm {
|
||||
connection "scm:git:git://github.com/insanusmokrassar/${project.name}.git"
|
||||
developerConnection "scm:git:[fetch=]https://github.com/insanusmokrassar/${project.name}.git[push=]ssh:git@github.com:insanusmokrassar/${project.name}.git"
|
||||
url "https://github.com/insanusmokrassar/${project.name}"
|
||||
developerConnection "scm:git:[fetch=]${project_vcs_base}/${project.name}.git[push=]ssh:git@github.com:insanusmokrassar/${project.name}.git"
|
||||
url "${project_vcs_base}/${project.name}"
|
||||
|
||||
}
|
||||
|
||||
@ -44,9 +42,9 @@ publishing {
|
||||
|
||||
licenses {
|
||||
license {
|
||||
name 'The Apache Software License, Version 2.0'
|
||||
url 'https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE'
|
||||
distribution 'repo'
|
||||
name "The Apache Software License, Version 2.0"
|
||||
url "${project_vcs_base}/${project.name}/blob/master/LICENSE"
|
||||
distribution "repo"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,13 @@
|
||||
package com.github.insanusmokrassar.krontab
|
||||
package com.insanusmokrassar.krontab
|
||||
|
||||
import com.insanusmokrassar.krontab.internal.*
|
||||
import com.insanusmokrassar.krontab.internal.CronDateTime
|
||||
import com.insanusmokrassar.krontab.internal.parseDaysOfMonth
|
||||
import com.insanusmokrassar.krontab.internal.parseHours
|
||||
import com.insanusmokrassar.krontab.internal.parseMinutes
|
||||
import com.insanusmokrassar.krontab.internal.parseMonths
|
||||
import com.insanusmokrassar.krontab.internal.parseSeconds
|
||||
import com.insanusmokrassar.krontab.internal.toNearDateTime
|
||||
import com.soywiz.klock.DateTime
|
||||
import kotlinx.coroutines.delay
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.github.insanusmokrassar.krontab
|
||||
package com.insanusmokrassar.krontab
|
||||
|
||||
suspend inline fun CronDateTimeScheduler.executeInfinity(noinline block: suspend () -> Unit) = doInLoop {
|
||||
block()
|
@ -1,6 +1,7 @@
|
||||
package com.github.insanusmokrassar.krontab
|
||||
package com.insanusmokrassar.krontab
|
||||
|
||||
import com.github.insanusmokrassar.krontab.builder.buildSchedule
|
||||
import com.insanusmokrassar.krontab.internal.CronDateTime
|
||||
import com.insanusmokrassar.krontab.builder.buildSchedule
|
||||
|
||||
internal val anyCronDateTime by lazy {
|
||||
CronDateTime()
|
@ -1,6 +1,8 @@
|
||||
package com.github.insanusmokrassar.krontab.builder
|
||||
package com.insanusmokrassar.krontab.builder
|
||||
|
||||
import com.github.insanusmokrassar.krontab.*
|
||||
import com.insanusmokrassar.krontab.CronDateTimeScheduler
|
||||
import com.insanusmokrassar.krontab.internal.CronDateTime
|
||||
import com.insanusmokrassar.krontab.internal.fillWith
|
||||
|
||||
fun buildSchedule(settingsBlock: SchedulerBuilder.() -> Unit): CronDateTimeScheduler {
|
||||
val builder = SchedulerBuilder()
|
@ -1,10 +1,10 @@
|
||||
package com.github.insanusmokrassar.krontab.builder
|
||||
package com.insanusmokrassar.krontab.builder
|
||||
|
||||
import com.github.insanusmokrassar.krontab.*
|
||||
import com.github.insanusmokrassar.krontab.minutesRange
|
||||
import com.github.insanusmokrassar.krontab.monthRange
|
||||
import com.github.insanusmokrassar.krontab.secondsRange
|
||||
import com.github.insanusmokrassar.krontab.utils.clamp
|
||||
import com.insanusmokrassar.krontab.utils.clamp
|
||||
|
||||
sealed class TimeBuilder (
|
||||
private val restrictionsRange: IntRange
|
@ -1,6 +1,11 @@
|
||||
package com.github.insanusmokrassar.krontab
|
||||
package com.insanusmokrassar.krontab.internal
|
||||
|
||||
import com.github.insanusmokrassar.krontab.utils.*
|
||||
import com.github.insanusmokrassar.krontab.dayOfMonthRange
|
||||
import com.github.insanusmokrassar.krontab.hoursRange
|
||||
import com.github.insanusmokrassar.krontab.minutesRange
|
||||
import com.github.insanusmokrassar.krontab.monthRange
|
||||
import com.github.insanusmokrassar.krontab.secondsRange
|
||||
import com.insanusmokrassar.krontab.utils.clamp
|
||||
import com.soywiz.klock.DateTime
|
||||
import com.soywiz.klock.DateTimeSpan
|
||||
|
@ -1,6 +1,11 @@
|
||||
package com.github.insanusmokrassar.krontab
|
||||
package com.insanusmokrassar.krontab.internal
|
||||
|
||||
import com.github.insanusmokrassar.krontab.utils.*
|
||||
import com.github.insanusmokrassar.krontab.dayOfMonthRange
|
||||
import com.github.insanusmokrassar.krontab.hoursRange
|
||||
import com.github.insanusmokrassar.krontab.minutesRange
|
||||
import com.github.insanusmokrassar.krontab.monthRange
|
||||
import com.github.insanusmokrassar.krontab.secondsRange
|
||||
import com.insanusmokrassar.krontab.utils.clamp
|
||||
|
||||
private fun createCronDateTimeScheduler(from: String, dataRange: IntRange): Array<Byte>? {
|
||||
val things = from.split(",")
|
@ -1,4 +1,4 @@
|
||||
package com.github.insanusmokrassar.krontab.utils
|
||||
package com.insanusmokrassar.krontab.utils
|
||||
|
||||
internal fun Int.clamp(min: Int, max: Int): Int = if (this < min) min else if (this > max) max else this
|
||||
internal fun Int.clamp(range: IntRange): Int = clamp(range.first, range.last)
|
Loading…
Reference in New Issue
Block a user