-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
126 lines (107 loc) · 3.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
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
repositories {
if (project['CERN_VM']) {
maven { url 'http://artifactory.cern.ch/ds-jcenter' }
maven { url 'http://artifactory.cern.ch/development' }
maven { url 'http://artifactory.cern.ch/gradle-plugins' }
} else {
gradlePluginPortal()
}
}
dependencies {
classpath 'com.github.jk1:gradle-license-report:1.5'
classpath 'io.github.gradle-nexus:publish-plugin:1.0.0'
classpath 'org.ow2.asm:asm:5.0.3'
}
}
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'idea'
apply plugin: 'eclipse'
group = project['POM.groupId']
repositories {
if (project['CERN_VM']) {
maven { url 'http://artifactory.cern.ch/ds-jcenter' }
maven { url 'http://artifactory.cern.ch/development' }
} else {
mavenCentral()
}
}
dependencies {
compile 'com.google.guava:guava:30.1.1-jre'
compile 'org.slf4j:slf4j-api:1.7.21'
compile 'org.tensorics:tensorics-core:0.0.81'
testCompile 'junit:junit:4.13.1'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'org.assertj:assertj-core:3.6.1'
}
wrapper {
gradleVersion = '5.4.1'
distributionType = Wrapper.DistributionType.ALL
}
sourceSets {
main {
java {
srcDir 'src/java'
}
}
test {
java {
srcDir 'src/examples'
srcDir 'src/test'
}
}
}
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 from: 'https://raw.githubusercontent.com/ossgang/gradle-scripts/master/deployment/deploy-to-maven-central.gradle'
}