-
Notifications
You must be signed in to change notification settings - Fork 68
/
build.gradle
143 lines (125 loc) · 4.13 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
plugins {
id 'java-library'
id 'groovy'
id 'idea'
id 'maven-publish'
id 'signing'
}
defaultTasks 'check'
group = 'com.athaydes'
version = "2.5.1-groovy-4.0"
description = 'This project is a global extension for Spock to create test (or, in Spock terms, Specifications) reports.'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
def groovyVersion = '4.0.13'
def spockVersion = '2.3-groovy-4.0'
repositories {
mavenCentral()
}
dependencies {
api "org.apache.groovy:groovy:${groovyVersion}"
implementation "org.apache.groovy:groovy-xml:${groovyVersion}"
implementation "org.apache.groovy:groovy-json:${groovyVersion}"
implementation "org.apache.groovy:groovy-templates:${groovyVersion}"
implementation platform( "org.spockframework:spock-bom:$spockVersion" )
api "org.spockframework:spock-core", {
exclude group: 'org.codehaus.groovy'
}
implementation 'org.slf4j:slf4j-api:1.7.36'
testImplementation platform( 'org.junit:junit-bom:5.9.1' )
testImplementation 'org.junit.platform:junit-platform-testkit'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation "cglib:cglib-nodep:3.3.0"
testImplementation "org.slf4j:slf4j-simple:1.7.36"
}
test {
useJUnitPlatform()
maxParallelForks = 4
exclude '**/*FakeTest.class', '**/UnrolledSpec.class', '**/SpecIncludingExtraInfo.class'
systemProperty 'project.buildDir', project.buildDir
systemProperty 'org.slf4j.simpleLogger.defaultLogLevel', 'debug'
testLogging.showStandardStreams = true
beforeTest { descriptor ->
logger.lifecycle( "Running test [{}]: {}", Thread.currentThread().id, descriptor )
}
testLogging {
events "failed"
exceptionFormat "full"
showStackTraces = true
}
}
jar {
manifest {
attributes(
"Implementation-Title": "Athaydes-Spock-Reports",
"Implementation-Version": project.version,
"Automatic-Module-Name": 'com.athaydes.spock.reports' )
}
}
java {
withJavadocJar()
withSourcesJar()
}
javadoc {
if ( JavaVersion.current().isJava9Compatible() ) {
options.addBooleanOption( 'html5', true )
}
}
def getProjectProperty = { String propertyName ->
project.properties[ propertyName ]
}
publishing {
publications {
mavenJava( MavenPublication ) {
artifactId = 'spock-reports'
from components.java
versionMapping {
usage( 'java-api' ) {
fromResolutionOf( 'runtimeClasspath' )
}
usage( 'java-runtime' ) {
fromResolutionResult()
}
}
pom {
inceptionYear = '2013'
name = project.name
packaging = 'jar'
description = project.description
url = 'https://github.com/renatoathaydes/spock-reports'
scm {
connection = '[email protected]:renatoathaydes/spock-reports.git'
developerConnection = '[email protected]:renatoathaydes/spock-reports.git'
url = 'https://github.com/renatoathaydes/spock-reports'
}
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'renatoathaydes'
name = 'Renato Athaydes'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
url "https://oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username getProjectProperty( 'ossrhUsername' )?.toString()
password getProjectProperty( 'ossrhPassword' )?.toString()
}
}
}
}
signing {
if ( project.hasProperty( 'sign' ) ) {
sign publishing.publications.mavenJava
}
}