mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2026-04-12 11:12:47 +00:00
Compare commits
18 Commits
33366ac2a8
...
2.8.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 133f731000 | |||
| 20d44bd531 | |||
| 4ec9dacbae | |||
| ddab74152e | |||
| 2cce483dc8 | |||
| fe5cdbefe8 | |||
| 4379635174 | |||
| d0c3bae000 | |||
| dfedd58b76 | |||
| b59c325641 | |||
| de64a4d806 | |||
| 409ca3770f | |||
| 08ef7281e5 | |||
| c28bf17335 | |||
| bd590c3e3e | |||
| 9c11c0c7fc | |||
| 79375f21e3 | |||
| 0b4dc1b328 |
26
CHANGELOG.md
26
CHANGELOG.md
@@ -1,5 +1,31 @@
|
||||
# Changelog
|
||||
|
||||
## 2.8.0
|
||||
|
||||
* `Version`:
|
||||
* `Kotlin`: `2.3.10`
|
||||
* `Coroutines`: `1.10.2`
|
||||
* `Serialization`: `1.10.0`
|
||||
* `AndroidXWork`: `2.11.1`
|
||||
* `Android` (compileSdk): `36`
|
||||
|
||||
## 2.7.2
|
||||
|
||||
* `Version`:
|
||||
* `Kotlin`: `2.1.10`
|
||||
* `Serialization`: `1.8.0`
|
||||
|
||||
## 2.7.1
|
||||
|
||||
* Fixes in parser and checker
|
||||
|
||||
## 2.7.0
|
||||
|
||||
* `Version`:
|
||||
* `Kotlin`: `2.1.0`
|
||||
* `Coroutines`: `1.10.1`
|
||||
* Add WASM support (solution of [#137](https://github.com/InsanusMokrassar/krontab/issues/137))
|
||||
|
||||
## 2.6.1
|
||||
|
||||
* Fixes in parsing of string parts
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
[](https://insanusmokrassar.github.io/krontab/)
|
||||
[](https://docs.inmo.dev/krontab/index.html)
|
||||
|
||||
13
build.gradle
13
build.gradle
@@ -56,12 +56,20 @@ kotlin {
|
||||
browser()
|
||||
nodejs()
|
||||
}
|
||||
android {
|
||||
publishAllLibraryVariants()
|
||||
androidTarget {
|
||||
publishLibraryVariants(
|
||||
"release",
|
||||
"debug",
|
||||
)
|
||||
}
|
||||
linuxX64()
|
||||
mingwX64()
|
||||
linuxArm64()
|
||||
wasm {
|
||||
browser()
|
||||
nodejs()
|
||||
d8()
|
||||
}
|
||||
|
||||
|
||||
sourceSets {
|
||||
@@ -85,6 +93,7 @@ kotlin {
|
||||
dependencies {
|
||||
implementation kotlin('test-common')
|
||||
implementation kotlin('test-annotations-common')
|
||||
implementation kotlin('test')
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlin_coroutines_version"
|
||||
}
|
||||
}
|
||||
|
||||
0
changelog_parser.sh
Normal file → Executable file
0
changelog_parser.sh
Normal file → Executable file
@@ -11,12 +11,20 @@ private String getCurrentVersionChangelog(String version) {
|
||||
return changelogDataOS.toString().trim()
|
||||
}
|
||||
|
||||
if (new File(projectDir, "secret.gradle").exists()) {
|
||||
apply from: './secret.gradle'
|
||||
|
||||
def githubTokenVariableName = "GITHUB_RELEASE_TOKEN"
|
||||
def githubTokenVariableFromEnv = System.getenv(githubTokenVariableName)
|
||||
|
||||
def secretFile = new File(projectDir, "secret.gradle")
|
||||
if (secretFile.exists() || project.hasProperty(githubTokenVariableName) || (githubTokenVariableFromEnv != "" && githubTokenVariableFromEnv != null)) {
|
||||
if (secretFile.exists()) {
|
||||
apply from: './secret.gradle'
|
||||
}
|
||||
apply plugin: "com.github.breadmoirai.github-release"
|
||||
def githubReleaseToken = project.hasProperty(githubTokenVariableName) ? project.property(githubTokenVariableName).toString() : githubTokenVariableFromEnv
|
||||
|
||||
githubRelease {
|
||||
token "${project.property('GITHUB_RELEASE_TOKEN')}"
|
||||
token githubReleaseToken
|
||||
|
||||
owner = "InsanusMokrassar"
|
||||
repo = "${rootProject.name}"
|
||||
|
||||
@@ -9,11 +9,11 @@ android.useAndroidX=true
|
||||
android.enableJetifier=false
|
||||
|
||||
|
||||
kotlin_version=2.0.21
|
||||
kotlin_coroutines_version=1.9.0
|
||||
kotlin_serialization_version=1.7.3
|
||||
kotlin_version=2.3.10
|
||||
kotlin_coroutines_version=1.10.2
|
||||
kotlin_serialization_version=1.10.0
|
||||
|
||||
dokka_version=1.9.20
|
||||
dokka_version=2.1.0
|
||||
|
||||
klockVersion=5.4.0
|
||||
|
||||
@@ -23,18 +23,18 @@ github_release_plugin_version=2.5.2
|
||||
|
||||
## Android
|
||||
|
||||
android_gradle_version=8.2.2
|
||||
android_gradle_version=8.12.+
|
||||
android_minSdkVersion=21
|
||||
android_compileSdkVersion=35
|
||||
android_buildToolsVersion=35.0.0
|
||||
android_compileSdkVersion=36
|
||||
android_buildToolsVersion=36.0.0
|
||||
dexcount_version=4.0.0
|
||||
junit_version=4.12
|
||||
test_ext_junit_version=1.1.3
|
||||
espresso_core=3.4.0
|
||||
junit_version=4.13.2
|
||||
test_ext_junit_version=1.3.0
|
||||
espresso_core=3.7.0
|
||||
|
||||
androidx_work_version=2.10.0
|
||||
androidx_work_version=2.11.1
|
||||
|
||||
## Common
|
||||
|
||||
version=2.6.1
|
||||
android_code_version=45
|
||||
version=2.8.0
|
||||
android_code_version=49
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -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-8.10.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
|
||||
|
||||
@@ -7,6 +7,7 @@ import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.isActive
|
||||
import kotlin.coroutines.coroutineContext
|
||||
|
||||
|
||||
/**
|
||||
* Execute [block] once at the [KronScheduler.next] time and return result of [block] calculation.
|
||||
*
|
||||
@@ -54,7 +55,7 @@ suspend inline fun <T> KronScheduler.doOnceTz(noinline block: suspend (DateTimeT
|
||||
* @see buildSchedule
|
||||
*/
|
||||
suspend inline fun <T> doOnce(
|
||||
@Language("CronExp") scheduleConfig: String,
|
||||
scheduleConfig: String,
|
||||
block: (DateTime) -> T
|
||||
) = buildSchedule(scheduleConfig).doOnce(block)
|
||||
|
||||
@@ -63,7 +64,7 @@ suspend inline fun <T> doOnce(
|
||||
* @see buildSchedule
|
||||
*/
|
||||
suspend inline fun <T> doOnceTz(
|
||||
@Language("CronExp") scheduleConfig: String,
|
||||
scheduleConfig: String,
|
||||
noinline block: suspend (DateTimeTz) -> T
|
||||
) = buildSchedule(scheduleConfig).doOnceTz(block)
|
||||
|
||||
@@ -115,7 +116,7 @@ suspend inline fun KronScheduler.doWhileTz(noinline block: suspend (DateTimeTz)
|
||||
* @see buildSchedule
|
||||
*/
|
||||
suspend inline fun doWhile(
|
||||
@Language("CronExp") scheduleConfig: String,
|
||||
scheduleConfig: String,
|
||||
block: (DateTime) -> Boolean
|
||||
) = buildSchedule(scheduleConfig).doWhile(block)
|
||||
|
||||
@@ -126,7 +127,7 @@ suspend inline fun doWhile(
|
||||
*/
|
||||
@Deprecated("Replaceable", ReplaceWith("doWhile", "dev.inmo.krontab.doWhile"))
|
||||
suspend inline fun doWhileLocal(
|
||||
@Language("CronExp") scheduleConfig: String,
|
||||
scheduleConfig: String,
|
||||
block: (DateTime) -> Boolean
|
||||
) = doWhile(scheduleConfig, block)
|
||||
|
||||
@@ -136,7 +137,7 @@ suspend inline fun doWhileLocal(
|
||||
* @see buildSchedule
|
||||
*/
|
||||
suspend inline fun doWhileTz(
|
||||
@Language("CronExp") scheduleConfig: String,
|
||||
scheduleConfig: String,
|
||||
noinline block: suspend (DateTimeTz) -> Boolean
|
||||
) = buildSchedule(scheduleConfig).doWhileTz(block)
|
||||
|
||||
@@ -168,7 +169,7 @@ suspend inline fun KronScheduler.doInfinityTz(noinline block: suspend (DateTimeT
|
||||
* @see buildSchedule
|
||||
*/
|
||||
suspend inline fun doInfinity(
|
||||
@Language("CronExp") scheduleConfig: String,
|
||||
scheduleConfig: String,
|
||||
block: (DateTime) -> Unit
|
||||
) = buildSchedule(scheduleConfig).doInfinity(block)
|
||||
|
||||
@@ -179,7 +180,7 @@ suspend inline fun doInfinity(
|
||||
*/
|
||||
@Deprecated("Replaceable", ReplaceWith("doInfinity", "dev.inmo.krontab.doInfinity"))
|
||||
suspend inline fun doInfinityLocal(
|
||||
@Language("CronExp") scheduleConfig: String,
|
||||
scheduleConfig: String,
|
||||
block: (DateTime) -> Unit
|
||||
) = doInfinity(scheduleConfig, block)
|
||||
|
||||
@@ -189,6 +190,6 @@ suspend inline fun doInfinityLocal(
|
||||
* @see buildSchedule
|
||||
*/
|
||||
suspend inline fun doInfinityTz(
|
||||
@Language("CronExp") scheduleConfig: String,
|
||||
scheduleConfig: String,
|
||||
noinline block: suspend (DateTimeTz) -> Unit
|
||||
) = buildSchedule(scheduleConfig).doInfinityTz(block)
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
package dev.inmo.krontab
|
||||
|
||||
import kotlin.OptionalExpectation
|
||||
|
||||
@OptionalExpectation
|
||||
internal expect annotation class Language(val value: String, val prefix: String = "", val suffix: String = "")
|
||||
@@ -43,7 +43,9 @@ private fun <T> createSimpleScheduler(from: String, dataRange: IntRange, dataCon
|
||||
* 1.
|
||||
* * "\\d" -> 2
|
||||
* * "\\*" -> 4
|
||||
* * "F" -> 7
|
||||
* * "f" -> 7
|
||||
* * "L" -> 7
|
||||
* * "l" -> 7
|
||||
* * "/" -> 6
|
||||
* 2.
|
||||
@@ -55,6 +57,7 @@ private fun <T> createSimpleScheduler(from: String, dataRange: IntRange, dataCon
|
||||
* * "o" -> 10
|
||||
* * "w" -> 10
|
||||
* 3.
|
||||
* * "L" -> 7
|
||||
* * "l" -> 7
|
||||
* * "\\d" -> 8
|
||||
* 4.
|
||||
@@ -78,8 +81,8 @@ private val checkIncomingPartTransitionsMap = listOf(
|
||||
listOf( // 0
|
||||
Regex("\\d") to 1,
|
||||
Regex("\\*") to 3,
|
||||
Regex("f") to 6,
|
||||
Regex("l") to 6,
|
||||
Regex("[Ff]") to 6,
|
||||
Regex("[Ll]") to 6,
|
||||
Regex("/") to 5,
|
||||
),
|
||||
listOf( // 1
|
||||
@@ -92,7 +95,7 @@ private val checkIncomingPartTransitionsMap = listOf(
|
||||
Regex("w") to 9,
|
||||
),
|
||||
listOf( // 2
|
||||
Regex("l") to 6,
|
||||
Regex("[Ll]") to 6,
|
||||
Regex("\\d") to 7,
|
||||
),
|
||||
listOf( // 3
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
package dev.inmo.krontab
|
||||
|
||||
import org.intellij.lang.annotations.Language
|
||||
|
||||
actual typealias Language = Language
|
||||
Reference in New Issue
Block a user