forked from ddd-by-examples/factory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (90 loc) · 3.06 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
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
maven { url "http://repo.spring.io/release" }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.0.2.RELEASE"
// TODO: Snapshots are used only for testing purposes
classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:2.0.0.BUILD-SNAPSHOT"
}
}
allprojects {
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'maven-publish'
group = 'pl.com.dddbyexamples'
version = getProp('newVersion') ?: '1.0-SNAPSHOT'
apply from: project.rootDir.absolutePath + '/gradle/pipeline.gradle'
bootJar.enabled = false
jar.enabled = true
bootRun.enabled = false
compileJava.options.compilerArgs << '-parameters'
compileTestJava.options.compilerArgs << '-parameters'
dependencies {
compileOnly('org.projectlombok:lombok:1.18.0')
annotationProcessor('org.projectlombok:lombok:1.18.0')
testCompile("org.spockframework:spock-core:1.1-groovy-2.4")
testCompile("net.bytebuddy:byte-buddy:1.8.12")
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${BOM_VERSION}"
}
}
repositories {
mavenCentral()
mavenLocal()
if (getProp("M2_LOCAL")) {
maven {
url getProp("M2_LOCAL")
}
}
maven { url "http://repo.spring.io/snapshot" }
maven { url "http://repo.spring.io/milestone" }
maven { url "http://repo.spring.io/release" }
}
publishing {
repositories {
maven {
url getProp('REPO_WITH_BINARIES_FOR_UPLOAD') ?:
getProp('REPO_WITH_BINARIES') ?: 'http://localhost:8081/artifactory/libs-release-local'
credentials {
username getProp('M2_SETTINGS_REPO_USERNAME') ?: 'admin'
password getProp('M2_SETTINGS_REPO_PASSWORD') ?: 'password'
}
}
}
publications {
mavenJava(MavenPublication) {
artifactId project.name
from components.java
}
}
}
tasks.withType(Test) {
testLogging {
events "started", "passed", "skipped", "failed"
}
}
}
ext {
projectGroupId = project.group
// In a multi-module env we can specify which project is the one that produces the fat-jar
projectArtifactId = "app-monolith"
projectVersion = project.version
}
apply plugin: "java"
[bootJar, bootRun]*.enabled = false
task wrapper(type: Wrapper) {
gradleVersion = '4.8'
}
String getProp(String propName) {
return hasProperty(propName) ?
(getProperty(propName) ?: System.properties[propName]) : System.properties[propName] ?:
System.getenv(propName)
}