在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):aalmiray/stats-gradle-plugin开源软件地址(OpenSource Url):https://github.com/aalmiray/stats-gradle-plugin开源编程语言(OpenSource Language):Groovy 95.4%开源软件介绍(OpenSource Introduction):Stats Gradle PluginStats Gradle PluginA Gradle plugin for counting lines of code in the same fashion as the Grails stats command. Requirements
UsageThe plugin is available from Bintray’s JCenter. The latest release is 0.2.2. You can use it as follows buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.kordamp.gradle:stats-gradle-plugin:0.2.2'
}
}
apply plugin: 'org.kordamp.gradle.stats' The plugin adds a new task named
It’s possible to generate an aggregate report when multiple projects are configured. Simply add the following to the root project task aggregateStatsReport(type: org.kordamp.gradle.stats.AggregateStatsReportTask) {} You may define a value for the
ConfigurationThe following properties can be configured for the
The following configuration may be used in a Griffon project for example stats {
formats = ['xml', 'html', 'txt']
paths = [
model: [name: 'Models', path: 'griffon-app/models'],
view: [name: 'Views', path: 'griffon-app/views'],
controller: [name: 'Controllers', path: 'griffon-app/controllers'],
service: [name: 'Services', path: 'griffon-app/services'],
config: [name: 'Config', path: 'griffon-app/conf'],
lifecycle: [name: 'Lifecycle', path: 'griffon-app/lifecycle']
]
} Which may make the +----------------------+-------+-------+
| Name | Files | LOC |
+----------------------+-------+-------+
| Groovy Sources | 4 | 28 |
| Java Sources | 1 | 2 |
| Groovy Test Sources | 1 | 16 |
| Models | 1 | 8 |
| Views | 1 | 24 |
| Controllers | 1 | 10 |
| Config | 1 | 12 |
| Lifecycle | 1 | 16 |
+----------------------+-------+-------+
| Totals | 11 | 116 |
+----------------------+-------+-------+ You may restrict a path to match an specific file type, such as stats {
formats = ['xml', 'html', 'txt']
paths = [
foo: [name: 'Foos', path: 'src/foo', extension: 'foo']
]
} Supported Extensions
Supported PathsAll project SourceSets will be queried when calculating stats, however the following paths have special treatment for reporting their names:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论