Gradle:如何停止发布并显示错误消息

时间:2018-08-23 04:39:23

标签: gradle publish

Gradle:尝试停止“发布”

tasks.withType(PublishToMavenRepository) {
    doFirst {
        throw new GradleException('publish is not allowded')
    }

}

似乎发布被禁用。但没有错误消息:

> Task :publish UP-TO-DATE
Skipping task ':publish' as it has no actions.

:publish (Thread[Daemon worker Thread 4,5,main]) completed. Took 0.0 secs.

BUILD SUCCESSFUL in 1s

0 个答案:

没有答案