This repository has been archived by the owner on Jan 8, 2024. It is now read-only.
forked from hortonworks/cloudbreak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
125 lines (106 loc) · 3.21 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
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.ajoberstar:grgit:2.1.0'
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.1.11'
classpath 'org.ajoberstar.reckon:reckon-gradle:0.4.0'
classpath 'com.smokejumperit.gradle.license:Gradle-License-Report:0.0.2'
}
}
plugins {
id 'org.ajoberstar.grgit' version '2.1.0'
id "com.github.spotbugs" version "1.6.1"
}
if (project.hasProperty("reckon.scope")) {
apply plugin: "org.ajoberstar.reckon"
reckon {
normal = scopeFromProp()
preRelease = stageFromProp('dev', 'rc', 'final')
}
}
def env = project.hasProperty('env') ? project.getProperty('env') : 'local'
ext.config = new ConfigSlurper(env).parse(file("$rootDir/gradle/config/buildConfig.groovy").toURL())
allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'com.sequenceiq'
configurations {
testRuntime {
exclude group: "org.springframework.cloud"
}
}
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'checkstyle'
apply plugin: 'com.github.spotbugs'
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations {
deployerJars
all*.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
all*.exclude group: 'com.google.guava', module: 'guava-jdk5'
}
dependencies {
deployerJars("org.springframework.build.aws:org.springframework.build.aws.maven:3.0.0.RELEASE")
}
uploadArchives {
repositories {
mavenDeployer {
configuration = configurations.deployerJars
repository(url: "s3://cloudbreak-maven/releases") {
authentication(userName: "$System.env.AWS_ACCESS_KEY", passphrase: "$System.env.AWS_SECRET_ACCESS_KEY")
}
snapshotRepository(url: "s3://cloudbreak-maven/snapshots") {
authentication(userName: "$System.env.AWS_ACCESS_KEY", passphrase: "$System.env.AWS_SECRET_ACCESS_KEY")
}
}
}
}
spotbugs {
toolVersion = "3.1.3"
excludeFilter = file("$rootProject.projectDir/config/spotbugs/excludeFilter.xml")
effort = "min"
}
tasks.withType(com.github.spotbugs.SpotBugsTask) {
reports {
xml.enabled false
html.enabled true
}
}
checkstyle {
toolVersion = "7.6"
}
checkstyleMain {
ignoreFailures = false
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
configProperties = ['config_loc': "$rootDir/config/checkstyle"]
}
checkstyleTest {
ignoreFailures = false
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
configProperties = ['config_loc': "$rootDir/config/checkstyle"]
}
test.testLogging.showStandardStreams = project.hasProperty('showStandardStreams')
dependencies {
checkstyle('com.puppycrawl.tools:checkstyle:7.8.2') {
exclude group: 'com.google.guava'
}
checkstyle("com.google.guava:guava:21.0") { force = true }
}
task allDeps(type: DependencyReportTask) {}
repositories {
mavenCentral()
maven { url "https://cloudbreak-maven.s3.amazonaws.com/releases" }
maven { url "https://repo.spring.io/release" }
maven { url "https://plugins.gradle.org/m2/" }
mavenLocal()
}
}