From b36ddf29e29e0f732a5553fc3152ab963e859c68 Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 29 Nov 2020 00:26:13 +0800 Subject: [PATCH] Fix gradle tasks --- tools/gradle-plugin/src/BuildMiraiPluginTask.kt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/gradle-plugin/src/BuildMiraiPluginTask.kt b/tools/gradle-plugin/src/BuildMiraiPluginTask.kt index f316b56ef..53227973f 100644 --- a/tools/gradle-plugin/src/BuildMiraiPluginTask.kt +++ b/tools/gradle-plugin/src/BuildMiraiPluginTask.kt @@ -2,17 +2,24 @@ package net.mamoe.mirai.console.gradle import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar 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 java.io.File @CacheableTask 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 打包结果 */ - public val output: File get() = outputs.files.singleFile + @get:OutputFile + public val output: File + get() = outputs.files.singleFile } \ No newline at end of file