forked from testng-team/testng
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
148 lines (125 loc) · 4.04 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
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'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.2.1'
}
}
plugins {
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"
}
task wrapper(type: Wrapper) {
gradleVersion = '3.0'
}
group = 'org.testng'
version = '6.11.1-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'jacoco'
apply plugin: 'osgi'
apply plugin: 'version-injection'
apply plugin: 'eclipse'
targetCompatibility = "1.7"
sourceCompatibility = "1.7"
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 'org.apache-extras.beanshell:bsh:2.0b6'
compile 'com.beust:jcommander:1.66'
compile 'org.apache.ant:ant:1.9.7'
compile 'junit:junit:4.12', optional
compile 'org.yaml:snakeyaml:1.17', optional
provided 'com.google.inject:guice:4.1.0:no_aop'
testCompile 'org.assertj:assertj-core:2.5.0'
testCompile 'org.codehaus.groovy:groovy-all:2.4.7'
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
}
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.*',
'*'
}
}
versionInjection {
into( 'org.testng.internal.Version', 'VERSION' )
into( 'org.testng.internal.Version', 'getVersionString' )
}
test {
useTestNG() {
suites 'src/test/resources/testng.xml'
}
testLogging.showStandardStreams = true
systemProperties = System.getProperties()
systemProperties['test.resources.dir'] = 'build/resources/test/'
maxHeapSize = '1500m'
afterTest { desc, result ->
println "Executed test ==> ${desc.className}.${desc.name}() with result: ${result.resultType}"
}
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
apply plugin: 'org.sonarqube'
sonarqube {
properties {
property "sonar.host.url", "https://sonarqube.com/"
property "sonar.github.repository", "cbeust/testng"
property "sonar.github.login", "testng-bot"
}
}
}
apply from: 'gradle/publishing.gradle'