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

nebula-plugins/gradle-info-plugin: Plugin to gather information about the enviro ...

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

开源软件名称(OpenSource Name):

nebula-plugins/gradle-info-plugin

开源软件地址(OpenSource Url):

https://github.com/nebula-plugins/gradle-info-plugin

开源编程语言(OpenSource Language):

Groovy 98.2%

开源软件介绍(OpenSource Introduction):

Gradle Info Plugin

Support Status Gradle Plugin Portal Maven Central Build Apache 2.0

Noninvasively collect information about the environment, and make information available to other plugins in a statically typed way. When possible lazily calculate info.

The module is made of three types of plugins.

  • Collecting plugins, e.g. scm-info and ci-info. Both of those examples use specific implementations to detect the current environment and report values to the broker.
  • Reporting plugins, e.g. Jar manifests, a generated file. These have specific formatting and outputting requirements, so they pull from the Broker. These will force values into
  • A Broker plugin, to collect values from Collecting plugins and make them available to reporting plugins

Both the Collectors and Reporters know about the broker.

info Plugin

apply plugin: 'nebula.info'

Uber plugin that applies all other plugins. Since each one is relatively safe to run, this is the recommended plugin to apply.

info-broker Plugin (Broker)

apply plugin: 'nebula.info-broker'

This would leave an empty broker around for other plugins to play with.

info-jar Plugin (Reporter)

apply plugin: 'nebula.info-jar'

// optionally configure MANIFEST.MF entries
infoBroker {
    excludedManifestProperties = ['Build-Date', 'Built-OS']
    // or, but not both!
    includedManifestProperties = ['Build-Date']
}

Pumps all values from the broker into the manifest of all jar's being built.

info-props Plugin (Reporter)

apply plugin: 'nebula.info-props'

Creates a property files with broker's values, defaults to "manifest/${baseConvention.archivesBaseName}.properties". Uses InfoPropertiesFile task to create file.

info-jar-props Plugin (Reporter)

apply plugin: 'nebula.info-jar-props'

Leverages info-props to create a file, which this plugin then puts into the META-INF of all jars.

info-basic Plugin (Collector)

apply plugin: 'nebula.info-basic'

Provides some basic values relavant to the Gradle build, e.g. build status.

info-java Plugin (Collector)

apply plugin: 'nebula.info-java'

Reports on the version of Java being used, and compatibility version if the Java plugin is being used.

info-ci Plugin (Collector)

apply plugin: 'nebula.info-ci'

Detects the current Continuous Integration environment and reports upon Job Name and Build Number. Currently supports CircleCI, Cirrus CI, Drone, GitLab CI, Travis CI, and Jenkins.

info-dependencies Plugin (Collector)

apply plugin: 'nebula.info-dependencies'

Reports on selected binary module versions (including transitives) of configurations that are resolved.

info-scm Plugin (Collector)

apply plugin: 'nebula.info-scm'

Detects the current source control being used and reports upon the repository and where in the source the project is. Git and Perforce are currently supported. Since real java libraries are used to determine these values but we don't want to pollute too many people with Perforce, all the plugin implementations are optional. You'll have to add a dependency to your specific SCM implementation. Technically, these are not optional right now, but they will be in the future.

buildscript {
    repositories { mavenCentral() }
    dependencies { classpath 'com.netflix.nebula:gradle-info-plugin:3.3.+' }

    dependencies { classpath 'com.perforce:p4java:2012.3.551082' }
    // or
    dependencies { classpath 'org.eclipse.jgit:org.eclipse.jgit:3.2.0.201312181205-r' }
}

info-owners (Collector)

apply plugin: 'nebula.info-owners'

Collects "owners" and "notify" users and inject them as 'Module-Owner' and 'Module-Email', respectively. The values come from the gradle-contacts plugin.

apply plugin: 'contacts' 
contacts {
    '[email protected]' {
        moniker 'Mickey Mouse'
       role 'owner'
     }
}

The above will make sure the manifest contains a Module-Owner of [email protected].




鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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