mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Fix buildPlugin, fix #335
This commit is contained in:
parent
6534b8177f
commit
b20d49f6ce
@ -23,7 +23,7 @@ abstract class AbstractTest {
|
||||
File settingsFile
|
||||
File propertiesFile
|
||||
|
||||
def gradleRunner() {
|
||||
GradleRunner gradleRunner() {
|
||||
println(PluginUnderTestMetadataReading.readImplementationClasspath())
|
||||
GradleRunner.create()
|
||||
.withProjectDir(tempDir)
|
||||
|
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2019-2021 Mamoe Technologies and contributors.
|
||||
*
|
||||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
|
||||
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
|
||||
*
|
||||
* https://github.com/mamoe/mirai/blob/master/LICENSE
|
||||
*/
|
||||
|
||||
package net.mamoe.mirai.console.gradle
|
||||
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
class TestBuildPlugin extends AbstractTest {
|
||||
|
||||
@Test
|
||||
void "can build plugin"() {
|
||||
gradleRunner()
|
||||
.withArguments("buildPlugin", "--stacktrace")
|
||||
.build()
|
||||
}
|
||||
}
|
@ -11,7 +11,6 @@ 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.OutputFile
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinTarget
|
||||
import java.io.File
|
||||
import javax.inject.Inject
|
||||
@ -23,7 +22,6 @@ public open class BuildMiraiPluginTask @Inject constructor(
|
||||
/**
|
||||
* ShadowJar 打包结果
|
||||
*/
|
||||
@get:OutputFile
|
||||
public val output: File
|
||||
get() = outputs.files.singleFile
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user