mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
Upgrade to Gradle 7.0 and Kotlin 1.5.0
This commit is contained in:
@@ -67,3 +67,10 @@ kotlin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named<org.gradle.language.jvm.tasks.ProcessResources>("jvmProcessResources") {
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
}
|
||||
tasks.named<org.gradle.language.jvm.tasks.ProcessResources>("jvmTestProcessResources") {
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class SingleThreadTaskRunner : TaskRunner {
|
||||
|
||||
override fun execute(task: Task) {
|
||||
for (l in listeners) l.onTaskStarted(task)
|
||||
if (!task.isCanceled) {
|
||||
if (!task.isCanceled()) {
|
||||
task.onAttached(this)
|
||||
task.onPreExecute()
|
||||
task.doInBackground()
|
||||
|
||||
@@ -20,9 +20,7 @@ package org.isoron.uhabits.core.tasks
|
||||
|
||||
fun interface Task {
|
||||
fun cancel() {}
|
||||
val isCanceled: Boolean
|
||||
get() = false
|
||||
|
||||
fun isCanceled() = false
|
||||
fun doInBackground()
|
||||
fun onAttached(runner: TaskRunner) {}
|
||||
fun onPostExecute() {}
|
||||
|
||||
Reference in New Issue
Block a user