forked from testng-team/testng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
167 lines (141 loc) · 4.6 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
buildscript {
def a_user = hasProperty('artifactory_user') ? artifactory_user : System.getenv('artifactory_user')
def a_password = hasProperty('artifactory_password') ? artifactory_password : System.getenv('artifactory_password')
repositories {
mavenCentral()
jcenter()
maven {
url 'https://dl.bintray.com/cbeust/maven'
}
maven {
url 'https://oss.jfrog.org/artifactory/plugins-release'
credentials {
username = "${a_user}"
password = "${a_password}"
}
}
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
classpath 'org.hibernate.build.gradle:version-injection-plugin:1.0.0'
}
}
plugins {
id 'com.gradle.build-scan' version '2.0.2'
id "com.jfrog.bintray" version "1.7.3"
id "com.jfrog.artifactory" version "4.4.10"
id "nebula.optional-base" version "3.1.0"
id "nebula.provided-base" version "3.1.0"
id "org.sonarqube" version "2.6.1"
}
buildScan {
link 'GitHub', 'https://github.com/cbeust/testng/tree/master'
if (System.getenv('CI')) {
publishOnFailure()
tag 'CI'
}
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
task wrappper(type: Wrapper) {
gradleVersion = '5.1.1'
}
group = 'org.testng'
version = '7.0.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'jacoco'
apply plugin: 'osgi'
apply plugin: 'version-injection'
apply plugin: 'eclipse'
sourceCompatibility = "1.8"
eclipse {
classpath {
defaultOutputDir = file('target/classes')
}
}
repositories {
mavenCentral()
jcenter()
maven {
url 'http://dl.bintray.com/cbeust/maven'
}
}
dependencies {
compileOnly 'com.google.code.findbugs:jsr305:3.0.1'
compile 'com.beust:jcommander:1.72'
compile 'org.apache.ant:ant:1.10.3', optional
compile 'junit:junit:4.12', optional
compile 'org.yaml:snakeyaml:1.21', optional
provided 'com.google.inject:guice:4.1.0:no_aop'
testCompile 'org.assertj:assertj-core:3.10.0'
testCompile 'org.codehaus.groovy:groovy-all:2.4.7'
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'org.apache-extras.beanshell:bsh:2.0b6'
testCompile 'org.mockito:mockito-core:2.12.0'
testCompile 'org.jboss.shrinkwrap:shrinkwrap-api:1.2.6'
testCompile 'org.jboss.shrinkwrap:shrinkwrap-impl-base:1.2.6'
}
task sourceJar(type: Jar) {
group 'Build'
description 'An archive of the source code'
classifier 'sources'
from sourceSets.main.allSource
}
artifacts {
sourceJar
}
jar {
manifest {
instruction 'Bundle-License', 'http://apache.org/licenses/LICENSE-2.0'
instruction 'Bundle-Description', 'TestNG is a testing framework.'
instruction 'Import-Package',
'bsh.*;version="[2.0.0,3.0.0)";resolution:=optional',
'com.beust.jcommander.*;version="[1.7.0,3.0.0)";resolution:=optional',
'com.google.inject.*;version="[1.2,1.3)";resolution:=optional',
'junit.framework;version="[3.8.1, 5.0.0)";resolution:=optional',
'org.junit.*;resolution:=optional',
'org.apache.tools.ant.*;version="[1.7.0, 2.0.0)";resolution:=optional',
'org.yaml.*;version="[1.6,2.0)";resolution:=optional',
'!com.beust.testng',
'!org.testng.*',
'!com.sun.*',
'*'
instruction 'Automatic-Module-Name', 'org.testng'
}
}
versionInjection {
into('org.testng.internal.Version', 'VERSION')
into('org.testng.internal.Version', 'getVersionString')
}
test {
useTestNG() {
suites 'src/test/resources/testng.xml'
}
options {
listeners.add("org.testng.reporters.FailedInformationOnConsoleReporter")
}
testLogging.showStandardStreams = true
systemProperties = System.getProperties()
systemProperties['test.resources.dir'] = 'build/resources/test/'
maxHeapSize = '1500m'
}
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.links("https://docs.oracle.com/javase/8/docs/api")
}
tasks.withType(Test){
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
}
apply plugin: 'org.sonarqube'
sonarqube {
properties {
property "sonar.host.url", "https://sonarcloud.io/"
property "sonar.github.repository", "cbeust/testng"
property "sonar.github.login", "testng-bot"
}
}
apply from: 'gradle/publishing.gradle'
apply from: 'gradle/publishing-jcenter.gradle'