forked from allure-framework/allure-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
198 lines (169 loc) · 6.28 KB
/
build.gradle
File metadata and controls
198 lines (169 loc) · 6.28 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
buildscript {
ext {
repoUrl = "https://repo.sprd.net/repository/maven-public"
nexusReleaseUser = System.getenv("NEXUS_RELEASE_USER") ?: findProperty("nexusReleaseUser")
if (!nexusReleaseUser) {
throw new GradleException('Nexus release user is not set!')
}
nexusReleasePassword = System.getenv("NEXUS_RELEASE_PW") ?: findProperty("nexusReleasePassword")
if (!nexusReleasePassword) {
throw new GradleException('Nexus release password is not set!')
}
nexusSnapshotUser = System.getenv("NEXUS_SNAPSHOT_USER") ?: findProperty("nexusSnapshotUser")
if (!nexusSnapshotUser) {
throw new GradleException('Nexus snapshot user is not set!')
}
nexusSnapshotPassword = System.getenv("NEXUS_SNAPSHOT_PW") ?: findProperty("nexusSnapshotPassword")
if (!nexusSnapshotPassword) {
throw new GradleException('Nexus snapshot password is not set!')
}
repoConfig = {
maven {
url "$repoUrl"
org.gradle.api.credentials.Credentials {
username "$nexusReleaseUser"
password "$nexusReleasePassword"
}
}
}
}
repositories {
jcenter()
mavenLocal()
repoConfig
}
dependencies {
classpath 'io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4'
classpath 'net.researchgate:gradle-release:2.6.0'
classpath 'ru.vyarus:gradle-quality-plugin:2.2.0'
classpath 'io.qameta.allure:allure-gradle:2.3'
}
}
ext {
linkHomepage = 'https://qameta.io/allure'
linkCi = 'https://ci.qameta.in/job/allure-java_deploy/'
linkScmUrl = 'https://github.com/allure-framework/allure-java'
linkScmConnection = 'scm:git:git://github.com/allure-framework/allure-java.git'
linkScmDevConnection = 'scm:git:ssh://[email protected]:allure-framework/allure-java.git'
gradleScriptDir = "${rootProject.projectDir}/gradle"
}
//apply from: "${gradleScriptDir}/bintray.gradle"
//apply from: "${gradleScriptDir}/release.gradle"
apply plugin: "maven"
apply plugin: "maven-publish"
configure(rootProject) {
description = "Allure Java"
// task build() {
// }
task wrapper(type: Wrapper) {
gradleVersion = '4.0.1'
}
}
subprojects { project ->
group = 'io.qameta.allure'
version = version
apply plugin: 'java'
apply plugin: 'io.qameta.allure'
apply plugin: 'io.spring.dependency-management'
apply from: "${gradleScriptDir}/maven-publish.gradle"
compileJava.dependsOn(processResources)
compileJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.encoding = 'UTF-8'
}
compileTestJava {
sourceCompatibility = 1.8
targetCompatibility = 1.8
options.encoding = 'UTF-8'
}
dependencyManagement {
dependencies {
dependency 'com.github.tomakehurst:wiremock:2.6.0'
dependency 'com.google.guava:guava:19.0'
dependency 'com.google.inject:guice:4.1.0'
dependency 'com.squareup.retrofit2:retrofit:2.2.0'
dependency 'commons-io:commons-io:2.5'
dependency 'io.qameta.allure:allure2-model-api:1.0-BETA6'
dependency 'io.rest-assured:rest-assured:3.0.2'
dependency 'javax.servlet:javax.servlet-api:3.1.0'
dependency 'junit:junit:4.12'
dependency 'org.apache.commons:commons-lang3:3.5'
dependency 'org.apache.httpcomponents:httpclient:4.5.3'
dependency 'org.aspectj:aspectjrt:1.8.10'
dependency 'org.aspectj:aspectjrt:1.8.10'
dependency 'org.aspectj:aspectjweaver:1.8.10'
dependency 'org.assertj:assertj-core:3.6.2'
dependency 'org.freemarker:freemarker:2.3.26-incubating'
dependency 'org.jbehave:jbehave-core:4.1.1'
dependency 'org.jooq:joor:0.9.6'
dependency 'org.junit.jupiter:junit-jupiter-api:5.0.0-M4'
dependency 'org.junit.jupiter:junit-jupiter-engine:5.0.0-M4'
dependency 'org.junit.jupiter:junit-jupiter-params:5.0.0-M4'
dependency 'org.junit.platform:junit-platform-launcher:1.0.0-M4'
dependency 'org.mock-server:mockserver-netty:3.10.7'
dependency 'org.mockito:mockito-core:2.7.11'
dependency 'org.slf4j:slf4j-api:1.7.21'
dependency 'org.slf4j:slf4j-simple:1.7.21'
dependency 'org.springframework.boot:spring-boot-autoconfigure:1.5.3.RELEASE'
dependency 'org.springframework:spring-test:4.3.8.RELEASE'
dependency 'org.springframework:spring-webmvc:4.3.8.RELEASE'
dependency 'org.testng:testng:6.10'
}
}
task sourceJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allJava
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourceJar
archives javadocJar
}
repositories {
jcenter()
mavenLocal()
repoConfig
}
allure {
version = '2.2.1'
autoconfigure = false
aspectjweaver = false
}
test {
afterTest { descriptor, result ->
logger.lifecycle("$descriptor finished with status $result")
}
}
apply plugin: 'ru.vyarus.quality'
quality {
checkstyleVersion = '7.6'
pmdVersion = '5.5.4'
findbugsVersion = '3.0.1'
codenarcVersion = '0.26.0'
}
publishing {
repositories {
maven {
url "https://repo.sprd.net/repository/libs-${project.version.endsWith('-SNAPSHOT') ? 'snapshots' : 'releases'}"
credentials {
username "$nexusSnapshotUser"
password "$nexusSnapshotPassword"
}
}
}
publications {
maven(MavenPublication) {
from components.java
}
}
}
}