• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

gradle/gradle-site-plugin

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

gradle/gradle-site-plugin

开源软件地址(OpenSource Url):

https://github.com/gradle/gradle-site-plugin

开源编程语言(OpenSource Language):

Kotlin 87.8%

开源软件介绍(OpenSource Introduction):

Gradle Site Plugin Build Status Build Scan Maven Central

A sample Gradle plugin demonstrating established techniques and practices for plugin development as described in the following guides:

Functionality

The plugin provides a task for generating a web page that derives information about the project e.g. applied plugins and available tasks. While minimalistic in functionality it serves as a show case for demonstrating best practices for Gradle plugin development. A site generated for this project can be viewed here.

Tip
The plugin is available on the Gradle plugin portal for public consumption.

Usage example

The plugin can be applied with by identifier gradle.site. Default values can be configured with the help of the provided extension org.gradle.plugins.site.SitePluginExtension. To generate the web page run the task named generateSite e.g. gradle generateSiteHtml.

Important
The plugin requires a Gradle version of 4.0 or higher. All features that are based on Gradle 4.0 are explicitly marked above. All other features will work with earlier versions of Gradle.
plugins {
    id("gradle.site").version("0.6")
}

site {
    outputDir.set(file("$rootDir/docs"))
    websiteUrl.set("https://mysite.com")
    vcsUrl.set("https://github.com/my/repo.git")
}

Applied techniques and practices

  • Production and test code written in Kotlin.

  • Reusable logic written as binary plugin.

  • Usage of the Plugin Development plugin to simplify plugin development. [Code | More Details]

  • Implementation of tasks as custom task type. [Code | More Details]

  • Usage of input and output properties to enable incremental tasks. [Code | More Details]

  • Usage of an extension to capture user-configurable values. [Code | More Details]

  • Mapping of extension property values to custom task properties. [Code | More Details] 4.0 feature

  • Reacting to plugins instead of applying plugins. [Code | More Details]

  • Declaration of appropriate plugin identifiers. [Code | More Details]

  • Functional testing with TestKit. [Code | More Details]

  • Publication of the plugin artifacts to the Gradle plugin portal [Code | More Details]

  • Continuous Integration of plugin code with Travis CI. [Code | More Details]

  • Automatic generation of build scans when build is executed from CI. [Code | More Details]




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap