Fix gradle tasks

This commit is contained in:
Him188 2020-11-29 00:26:13 +08:00
parent 3a5d95aee3
commit b36ddf29e2

View File

@ -2,17 +2,24 @@ package net.mamoe.mirai.console.gradle
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.api.tasks.CacheableTask import org.gradle.api.tasks.CacheableTask
import org.gradle.api.tasks.Internal
import org.gradle.api.tasks.OutputFile
import org.jetbrains.kotlin.gradle.plugin.KotlinTarget import org.jetbrains.kotlin.gradle.plugin.KotlinTarget
import java.io.File import java.io.File
@CacheableTask @CacheableTask
public open class BuildMiraiPluginTask : ShadowJar() { public open class BuildMiraiPluginTask : ShadowJar() {
internal var targetField: KotlinTarget? = null @Internal
public var targetField: KotlinTarget? = null
public val target: KotlinTarget get() = targetField!! @get:Internal
public val target: KotlinTarget
get() = targetField!!
/** /**
* ShadowJar 打包结果 * ShadowJar 打包结果
*/ */
public val output: File get() = outputs.files.singleFile @get:OutputFile
public val output: File
get() = outputs.files.singleFile
} }