Compare commits

..

2 Commits

Author SHA1 Message Date
Michael Rittmeister
51002f0f03 Merge e5b33ae9b0 into b59c325641 2025-01-29 03:57:23 +00:00
Michael Rittmeister
e5b33ae9b0 Add support for IntelliJ cron tab feature 2024-06-16 16:33:55 +02:00
9 changed files with 38 additions and 54 deletions

View File

@@ -1,20 +1,5 @@
# 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

View File

@@ -56,11 +56,8 @@ kotlin {
browser()
nodejs()
}
androidTarget {
publishLibraryVariants(
"release",
"debug",
)
android {
publishAllLibraryVariants()
}
linuxX64()
mingwX64()

0
changelog_parser.sh Executable file → Normal file
View File

View File

@@ -11,20 +11,12 @@ private String getCurrentVersionChangelog(String version) {
return changelogDataOS.toString().trim()
}
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'
}
if (new File(projectDir, "secret.gradle").exists()) {
apply from: './secret.gradle'
apply plugin: "com.github.breadmoirai.github-release"
def githubReleaseToken = project.hasProperty(githubTokenVariableName) ? project.property(githubTokenVariableName).toString() : githubTokenVariableFromEnv
githubRelease {
token githubReleaseToken
token "${project.property('GITHUB_RELEASE_TOKEN')}"
owner = "InsanusMokrassar"
repo = "${rootProject.name}"

View File

@@ -9,11 +9,11 @@ android.useAndroidX=true
android.enableJetifier=false
kotlin_version=2.3.10
kotlin_coroutines_version=1.10.2
kotlin_serialization_version=1.10.0
kotlin_version=2.1.0
kotlin_coroutines_version=1.10.1
kotlin_serialization_version=1.7.3
dokka_version=2.1.0
dokka_version=2.0.0
klockVersion=5.4.0
@@ -23,18 +23,18 @@ github_release_plugin_version=2.5.2
## Android
android_gradle_version=8.12.+
android_gradle_version=8.2.2
android_minSdkVersion=21
android_compileSdkVersion=36
android_buildToolsVersion=36.0.0
android_compileSdkVersion=35
android_buildToolsVersion=35.0.0
dexcount_version=4.0.0
junit_version=4.13.2
test_ext_junit_version=1.3.0
espresso_core=3.7.0
junit_version=4.12
test_ext_junit_version=1.1.3
espresso_core=3.4.0
androidx_work_version=2.11.1
androidx_work_version=2.10.0
## Common
version=2.8.0
android_code_version=49
version=2.7.1
android_code_version=47

View File

@@ -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.14.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip

View File

@@ -7,7 +7,6 @@ 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.
*
@@ -55,7 +54,7 @@ suspend inline fun <T> KronScheduler.doOnceTz(noinline block: suspend (DateTimeT
* @see buildSchedule
*/
suspend inline fun <T> doOnce(
scheduleConfig: String,
@Language("CronExp") scheduleConfig: String,
block: (DateTime) -> T
) = buildSchedule(scheduleConfig).doOnce(block)
@@ -64,7 +63,7 @@ suspend inline fun <T> doOnce(
* @see buildSchedule
*/
suspend inline fun <T> doOnceTz(
scheduleConfig: String,
@Language("CronExp") scheduleConfig: String,
noinline block: suspend (DateTimeTz) -> T
) = buildSchedule(scheduleConfig).doOnceTz(block)
@@ -116,7 +115,7 @@ suspend inline fun KronScheduler.doWhileTz(noinline block: suspend (DateTimeTz)
* @see buildSchedule
*/
suspend inline fun doWhile(
scheduleConfig: String,
@Language("CronExp") scheduleConfig: String,
block: (DateTime) -> Boolean
) = buildSchedule(scheduleConfig).doWhile(block)
@@ -127,7 +126,7 @@ suspend inline fun doWhile(
*/
@Deprecated("Replaceable", ReplaceWith("doWhile", "dev.inmo.krontab.doWhile"))
suspend inline fun doWhileLocal(
scheduleConfig: String,
@Language("CronExp") scheduleConfig: String,
block: (DateTime) -> Boolean
) = doWhile(scheduleConfig, block)
@@ -137,7 +136,7 @@ suspend inline fun doWhileLocal(
* @see buildSchedule
*/
suspend inline fun doWhileTz(
scheduleConfig: String,
@Language("CronExp") scheduleConfig: String,
noinline block: suspend (DateTimeTz) -> Boolean
) = buildSchedule(scheduleConfig).doWhileTz(block)
@@ -169,7 +168,7 @@ suspend inline fun KronScheduler.doInfinityTz(noinline block: suspend (DateTimeT
* @see buildSchedule
*/
suspend inline fun doInfinity(
scheduleConfig: String,
@Language("CronExp") scheduleConfig: String,
block: (DateTime) -> Unit
) = buildSchedule(scheduleConfig).doInfinity(block)
@@ -180,7 +179,7 @@ suspend inline fun doInfinity(
*/
@Deprecated("Replaceable", ReplaceWith("doInfinity", "dev.inmo.krontab.doInfinity"))
suspend inline fun doInfinityLocal(
scheduleConfig: String,
@Language("CronExp") scheduleConfig: String,
block: (DateTime) -> Unit
) = doInfinity(scheduleConfig, block)
@@ -190,6 +189,6 @@ suspend inline fun doInfinityLocal(
* @see buildSchedule
*/
suspend inline fun doInfinityTz(
scheduleConfig: String,
@Language("CronExp") scheduleConfig: String,
noinline block: suspend (DateTimeTz) -> Unit
) = buildSchedule(scheduleConfig).doInfinityTz(block)

View File

@@ -0,0 +1,6 @@
package dev.inmo.krontab
import kotlin.OptionalExpectation
@OptionalExpectation
internal expect annotation class Language(val value: String, val prefix: String = "", val suffix: String = "")

View File

@@ -0,0 +1,5 @@
package dev.inmo.krontab
import org.intellij.lang.annotations.Language
actual typealias Language = Language