-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
92 lines (77 loc) · 2.38 KB
/
build.gradle
File metadata and controls
92 lines (77 loc) · 2.38 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
buildscript {
repositories {
mavenLocal()
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
dependencies {
classpath 'org.standardout:bnd-platform:1.7.0'
classpath 'biz.aQute.bnd:biz.aQute.bndlib:4.3.1'
}
}
def buildTime() {
def df = new java.text.SimpleDateFormat("yyyyMMddHHmm")
df.setTimeZone(TimeZone.getTimeZone("UTC"))
return df.format(new Date())
}
apply plugin: 'org.standardout.bnd-platform'
repositories {
mavenCentral()
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
}
// project version is also platform feature version default,
// here uses TestNG version as project version.
version = '7.12.0-SNAPSHOT'
def buildMode = System.getProperty('BUILD_MODE')
def versionWithQualifier
def qualifierPrefix = 'b' // 'b' for Beta
if (buildMode == "release") {
assert !version.endsWith('-SNAPSHOT') : "Please don't use snapshot version ${version} for release"
qualifierPrefix = 'r' // 'r' for Release
}
if (version ==~ /^\d+[\.\d+]+$/) {
versionWithQualifier = version + "." + qualifierPrefix + buildTime()
}
else {
versionWithQualifier = version.substring(0, version.indexOf('-')) + "." + qualifierPrefix + buildTime()
}
defaultTasks 'updateSiteZip'
updateSiteZip.dependsOn clean
platform {
bundle "org.testng:testng:${version}", {
exclude module: 'ant'
exclude module: 'bsh'
exclude module: 'junit'
exclude module: 'jsr305'
exclude module: 'guice'
exclude module: 'slf4j-api'
}
bundle "org.yaml:snakeyaml:2.2"
bundle "org.jcommander:jcommander:1.83", {
bnd {
// override/set the symbolic name
symbolicName = 'com.beust.jcommander'
// override/set the bundle name
bundleName = 'jcommander'
}
}
featureId 'org.testng.p2.feature'
featureName 'TestNG P2 Feature'
featureVersion versionWithQualifier
featureProvider 'TestNG Team'
categoryName 'TestNG P2 Libraries'
categoryId 'org.testng.p2.libraries'
useBndHashQualifiers false
useFeatureHashQualifiers false
defaultQualifier ''
downloadsDir = new File(System.properties['user.home'], '.bnd-eclipse')
eclipseMirror = 'http://philippkatz.de/eclipse-p2-minimal.tar.gz'
}
task wrapper(type: Wrapper) {
gradleVersion = '2.13'
}