-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
96 lines (80 loc) · 2.84 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
buildscript {
project.ext['CERN_VM'] = System.getProperty('CERN_TECHNET_VM') ?: System.getenv('CERN_TECHNET_VM') ?: System.getProperty('CERN_VM') ?: System.getenv('CERN_VM') ?: false
project.ext['DEPLOYMENT'] = System.getProperty('deployment') ?: false
project.ext['VCS_TAG'] = System.getProperty('TRAVIS_TAG') ?: System.getenv('TRAVIS_TAG') ?: System.getProperty('VCS_TAG')
project.ext['BINTRAY.userName'] = System.getProperty('BINTRAY_USER') ?: System.getenv('BINTRAY_USER')
project.ext['BINTRAY.apiToken'] = System.getProperty('BINTRAY_API_TOKEN') ?: System.getenv('BINTRAY_API_TOKEN')
repositories {
if (project['CERN_VM']) {
maven { url 'http://artifactory.cern.ch/ds-jcenter' }
maven { url 'http://artifactory.cern.ch/development' }
} else {
jcenter()
}
}
dependencies { classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' }
}
allprojects {
group = project.ext['POM.groupId']
}
subprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
sourceCompatibility = JavaVersion.VERSION_1_8
repositories {
if (project['CERN_VM']) {
maven { url 'http://artifactory.cern.ch/ds-jcenter' }
maven { url 'http://artifactory.cern.ch/development' }
} else {
jcenter()
}
}
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
testCompile group: 'junit', name: 'junit', version: jUnitVersion
testCompile group: 'org.assertj', name: 'assertj-core', version: assertJVersion
}
javadoc { options.encoding = "UTF-8" }
if (!project.tasks.findByName("javadocJar")) {
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
}
if (!project.tasks.findByName("sourcesJar")) {
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
}
eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
jacocoTestReport {
reports {
html.enabled = false
xml.enabled = true
xml.destination file("$buildDir/reports/jacoco/report.xml")
csv.enabled = false
}
}
if (project['DEPLOYMENT']) {
println "Applying deployment scripts for ${project.name}"
apply from: '../gradle/bintray-deploy.gradle'
}
}
task wrapper(type: Wrapper) { gradleVersion = '4.10.2' }