Upgrade to Gradle 7.0 and Kotlin 1.5.0

This commit is contained in:
2021-05-23 18:33:34 -05:00
parent db91dce57f
commit 31c09b9c0b
8 changed files with 20 additions and 25 deletions

View File

@@ -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
}

View File

@@ -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()

View File

@@ -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() {}