-
Notifications
You must be signed in to change notification settings - Fork 11
/
build.gradle
97 lines (79 loc) · 2.15 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
import com.github.spotbugs.SpotBugsTask
plugins {
id "com.github.hierynomus.license" version "0.14.0" apply false
id 'com.github.johnrengelman.shadow' version '2.0.1' apply false
id "com.github.spotbugs" version "1.6.0" apply false
}
allprojects {
apply plugin: 'idea'
group = 'cz.seznam.euphoria'
version = '0.8-SNAPSHOT'
}
subprojects {
apply plugin: 'java'
apply plugin: 'com.github.hierynomus.license'
apply plugin: 'com.github.spotbugs'
apply from: "${rootProject.projectDir}/gradle/versions.gradle"
license {
// ~ TODO: support for other file formats
include '**/*.java'
mapping('java', 'SLASHSTAR_STYLE')
header = rootProject.file('HEADER')
strictCheck = true
ext.year = "2016-${Calendar.getInstance().get(Calendar.YEAR)}"
ext.name = 'Seznam.cz, a.s.'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
testCompile "junit:junit:${junitVersion}"
testCompile "org.mockito:mockito-core:${mockitoVersion}"
testCompile "org.slf4j:slf4j-simple:${slf4jVersion}"
}
test {
testLogging {
events 'skipped', 'failed'
}
}
tasks.withType(SpotBugsTask) {
effort = 'max'
reportLevel = 'high'
reports {
xml.enabled = false
html.enabled = true
}
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
// ~ configure euphoria sub-projects (excluding benchmarks and guava)
configure(subprojects.findAll { it.name.startsWith('euphoria') }) {
apply plugin: 'maven-publish'
// ~ build & publish sources and javadoc jar
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
sourceSets {
test.compileClasspath += configurations.compileOnly
test.runtimeClasspath += configurations.compileOnly
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}
}
}