-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle
145 lines (113 loc) · 3.45 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
133
134
135
136
137
138
139
140
141
142
143
144
145
/*******************************************************************************
* Copyright (c) 2017 AT&T Intellectual Property, [http://www.att.com]
*
* SPDX-License-Identifier: MIT
*
*******************************************************************************/
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
jcenter()
mavenCentral()
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.5.2.RELEASE'
classpath 'io.spring.gradle:dependency-management-plugin:0.6.1.RELEASE'
classpath 'com.netflix.nebula:gradle-ospackage-plugin:3.7.1'
classpath 'com.netflix.nebula:gradle-info-plugin:3.5.0'
classpath 'com.netflix.nebula:nebula-project-plugin:3.3.0'
classpath 'gradle.plugin.com.github.jk1:gradle-license-report:0.3.5'
classpath 'com.fizzpod:gradle-sweeney-plugin:2.1.1'
classpath 'pl.allegro.tech.build:axion-release-plugin:1.4.1'
}
}
apply plugin: 'com.fizzpod.sweeney'
apply plugin: "pl.allegro.tech.build.axion-release"
sweeney {
enforce 'jdk:[1.7,)'
enforce 'gradle:[2.14,)'
validate()
}
scmVersion {
tag {
prefix = 'release'
}
}
allprojects {
repositories {
jcenter()
}
group = 'com.mangosolutions.rcloud'
project.version = scmVersion.version
ext.projectUrl = "https://github.com/MangoTheCat/rcloud-gist-services"
}
subprojects {
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: "io.spring.dependency-management"
apply plugin: 'eclipse'
apply plugin: 'nebula.info'
apply plugin: 'nebula.integtest'
apply plugin: 'maven'
apply plugin: 'maven-publish'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-starter-parent:Camden.SR6'
mavenBom 'org.springframework.boot:spring-boot-starter-parent:1.5.2.RELEASE'
}
}
//Exclude the log4j dependencies as will use logback
configurations {
all*.exclude group: 'log4j', module: 'log4j'
all*.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
all*.exclude module: "spring-boot-starter-tomcat"
}
test {
testLogging.showStandardStreams = true
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
tasks.withType(JavaExec) {
if (Boolean.getBoolean('DEBUG')) {
jvmArgs '-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000'
}
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
project.tasks.findAll {
it.name.startsWith("publish")
}.each {
it.dependsOn assemble
}
}
configure(subprojects.findAll {it.name =~ /.*service/}) {
apply plugin: 'org.springframework.boot'
apply plugin: 'nebula.ospackage'
springBoot {
executable = true
buildInfo()
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-undertow:1.4.3.RELEASE")
}
processResources {
filesMatching('config/application.yml') { expand (project.properties) }
}
artifacts {
archives buildRpm
}
task distRpm(type: Rpm, dependsOn: bootRepackage) {}
task distDeb(type: Deb, dependsOn: bootRepackage) {}
assemble.dependsOn distRpm
assemble.dependsOn distDeb
}