forked from zhurlik/gradle-jboss-modules-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
117 lines (98 loc) · 2.93 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'idea'
apply plugin: 'groovy'
apply plugin: 'cobertura'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
buildscript {
repositories {
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath "net.saliman:gradle-cobertura-plugin:2.2.5" // cobertura plugin
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1'
classpath 'com.gradle.publish:plugin-publish-plugin:0.9.0'
}
}
repositories {
mavenCentral()
jcenter()
}
cobertura {
coverageIgnoreTrivial = true
coverageFormats = ['html', 'xml'] // coveralls plugin depends on xml format report
coverageSourceDirs = sourceSets.main.groovy.srcDirs
coverageExcludes = ['.*com.github.zhurlik.repository.Server', '.*com.github.zhurlik.descriptor.Xsd.*write.*']
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
group = 'com.github.zhurlik'
dependencies {
compile gradleApi()
compile localGroovy()
}
// for local testing
apply plugin: 'maven'
uploadArchives {
repositories {
mavenDeployer {
repository(url: uri('tmp-repo'))
}
}
}
tasks.test.doFirst{
// for travis-ci.org
logging.captureStandardOutput LogLevel.INFO
logging.level = LogLevel.WARN
}
test {
// show standard out and standard error of the test JVM(s) on the console
testLogging.showStandardStreams = true
// listen to events in the test execution lifecycle
beforeTest { descriptor ->
logger.lifecycle("Running test: " + descriptor)
}
// listen to standard out and standard error of the test JVM(s)
onOutput { descriptor, event ->
logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message )
}
}
// custom task for creating source jar
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
// custom task for creating doc jar
task groovydocJar(type: Jar, dependsOn: 'groovydoc') {
from groovydoc.destinationDir
classifier = 'javadoc'
}
// add source/doc jar tasks as artifacts
artifacts {
archives jar
archives sourcesJar, groovydocJar
}
tasks.clean.doFirst {
delete 'tmp-repo/com'
}
// The configuration example below shows the minimum required properties
// configured to publish your plugin to the plugin portal
pluginBundle {
website = 'https://github.com/zhurlik'
vcsUrl = 'https://github.com/zhurlik/gradle-jboss-modules-plugin'
description = 'A gradle plugin that allows to make JBoss Modules'
tags = ['java', 'jboss', 'module', 'gradle', 'plugin', 'groovy', 'wildfly']
plugins {
jbossModulesPlugin {
id = 'com.github.zhurlik.jbossmodules'
displayName = 'Gradle JBoss Modules plugin'
}
}
}