-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
116 lines (98 loc) · 2.85 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
import static org.gradle.api.JavaVersion.VERSION_12
import static org.gradle.api.JavaVersion.VERSION_1_7
plugins {
id 'com.gradle.plugin-publish' version '0.12.0'
id 'idea'
id 'groovy'
id 'jacoco'
id 'com.github.kt3k.coveralls'
id 'maven-publish'
id 'codenarc'
}
repositories {
mavenCentral()
jcenter()
}
codenarc {
toolVersion = '1.3'
// TODO: fix all issues
ignoreFailures = true
configFile = file("${project.projectDir}/config/codenarc/codenarc.groovy")
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
group = 'com.github.zhurlik'
sourceCompatibility = VERSION_12
targetCompatibility = VERSION_1_7
dependencies {
implementation gradleApi()
implementation localGroovy()
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.+'
}
// just for testing on the local host
publishing {
publications {
toTest(MavenPublication) {
from components.java
}
}
repositories {
maven {
url = "file://$projectDir/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'
}
}
}