构建公告插件目前是一个试验性插件。注意,在以后的 Gradle 版本中,其 DSL 和其他配置可能会有变化。
The build announcements plugin is currently incubating. Please be aware that the DSL and other configuration may change in later Gradle versions.
构建公告插件使用 公告 插件发送构建过程中一些重要事件的本地公告。
The build announcements plugin uses the announce plugin to send local announcements on important events in the build.
要使用构建公告插件,请在构建脚本中包含:
To use the build announcements plugin, include in your build script:
示例 43.1. 使用构建公告插件 - Example 43.1. Using the build announcements plugin
build.gradle
apply plugin: 'build-announcements'
就是这样。如果您想要调整公告的位置,你可以配置 公告 插件来更改本地的公告。
That's it. If you want to tweak where the announcements go, you can configure the announce plugin to change the local announcer.
你还可以从 init 脚本中应用这个插件:
You can also apply the plugin from an init script:
示例 43.2. 在 init 脚本中使用构建公告插件 - Example 43.2. Using the build announcements plugin from an init script
init.gradle
rootProject {
apply plugin: 'build-announcements'
}