-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
132 lines (109 loc) · 4.07 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
buildscript {
project.ext['CERN_VM'] = System.getProperty('CERN_TECHNET_VM') ?: System.getenv('CERN_TECHNET_VM') ?: project.hasProperty('CERN_TECHNET_VM') ?: false
project.ext['DEPLOYMENT'] = System.getProperty('deployment') ?: false
project.ext['VCS_TAG'] = System.getProperty('TRAVIS_TAG') ?: System.getenv('TRAVIS_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')
project.ext['SONATYPE.userName'] = System.getProperty('SONATYPE_USER') ?: System.getenv('SONATYPE_USER')
project.ext['SONATYPE.password'] = System.getProperty('SONATYPE_PASSWORD') ?: System.getenv('SONATYPE_PASSWORD')
repositories {
if (project['CERN_VM']) {
maven { url 'http://artifactory.cern.ch/ds-jcenter' }
maven { url 'http://artifactory.cern.ch/development' }
} else {
jcenter()
maven { url 'https://plugins.gradle.org/m2/' }
}
}
dependencies {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.github.jk1:gradle-license-report:1.5'
}
}
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'idea'
apply plugin: 'eclipse'
group = project['POM.groupId']
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 {
/* For minifx components: */
maven { url "https://dl.bintray.com/minifx/minifx-repo" }
/* For the fontawesome icons, to be compatible with java 8 */
maven { url "https://dl.bintray.com/jerady/maven" }
mavenCentral()
}
}
dependencies {
compile group: 'io.github.ossgang', name: 'ossgang-properties-core', version: "+"
testCompile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
testCompile group: 'junit', name: 'junit', version: '4.12'
testCompile group: 'org.assertj', name: 'assertj-core', version: '3.9.1'
testCompile group: 'org.testfx', name: 'testfx-core', version: '4.0.15-alpha'
testCompile group: 'org.testfx', name: 'testfx-junit', version: '4.0.15-alpha'
testCompile group: 'org.springframework', name: 'spring-test', version: springVersion
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.23.0'
}
task wrapper(type: Wrapper) { gradleVersion = '4.10.2' }
sourceSets {
main {
resources { srcDirs = ['src/main/java'] }
}
}
test {
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}
jacocoTestReport {
reports {
xml.enabled true
xml.destination file("$buildDir/reports/jacoco/report.xml")
html.enabled true
csv.enabled false
}
}
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
}
}
if (!project['CERN_VM']) {
println 'Applying licensing report'
apply plugin: 'com.github.jk1.dependency-license-report'
licenseReport {
renderers = [this.class.classLoader.loadClass('com.github.jk1.license.render.InventoryHtmlReportRenderer').newInstance()]
filters = [this.class.classLoader.loadClass('com.github.jk1.license.filter.LicenseBundleNormalizer').newInstance()]
}
}
if (project['DEPLOYMENT']) {
println 'Applying deployment scripts'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply from: 'https://raw.githubusercontent.com/ossgang/gradle-scripts/master/deployment/bintray-deploy.gradle'
}