-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
build.gradle
105 lines (79 loc) · 2.81 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()
jcenter()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "io.spring.gradle:dependency-management-plugin:$springDependencyManagementPluginVersion"
classpath "com.avast.gradle:gradle-docker-compose-plugin:$dockerComposePluginVersion"
classpath "org.springframework.cloud:spring-cloud-contract-gradle-plugin:$springCloudContractDependenciesVersion"
}
}
apply plugin: WaitForMySqlPlugin
apply plugin: 'docker-compose'
subprojects {
apply plugin: "java"
// TODO apply plugin: 'pmd'
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
group = "net.chrisrichardson.ftgo"
repositories {
eventuateMavenRepoUrl.split('[ ,]').each { repoUrl -> maven { url repoUrl.trim() } }
mavenCentral()
jcenter()
maven {
url 'https://jitpack.io'
}
maven {
url "${project.rootDir}/build/repo"
}
}
dependencies {
implementation(platform("io.eventuate.platform:eventuate-platform-dependencies:$eventuatePlatformVersion"))
constraints {
compile ("io.netty:netty-codec-http2") {
version {
strictly("4.1.72.Final")
}
}
}
}
}
task buildContracts(type: GradleBuild) {
tasks = subprojects.collect { it.name }.findAll { it.endsWith("-contracts") }.collect { ":" + it + ":publish"}
}
task compileAll(type: GradleBuild) {
tasks = ["testClasses", "compileIntegrationTestJava", "compileComponentTestJava"]
}
dockerCompose {
environment.put "EVENTUATE_COMMON_VERSION", eventuateCommonImageVersion
environment.put "EVENTUATE_CDC_VERSION", eventuateCdcImageVersion
environment.put "EVENTUATE_SAGA_VERSION", eventuateTramSagasImageVersion
environment.put "EVENTUATE_JAVA_BASE_IMAGE_VERSION", eventuateExamplesBaseImageVersion
environment.put "EVENTUATE_MESSAGING_KAFKA_IMAGE_VERSION", eventuateMessagingKafkaImageVersion
projectName = null
removeOrphans = true
retainContainersOnStartupFailure = true
if (project.hasProperty('startedServices'))
startedServices= project.ext.startedServices.split(',')
mysql {
projectName = null
startedServices = ["mysql"]
}
infrastructure {
projectName = null
startedServices = ["mysql", "cdc-service", "dynamodblocal-init", "kafka", "zookeeper"]
}
kafkaGui {
projectName = null
startedServices = ["kafka-gui"]
}
}
composeUp.dependsOn(infrastructureComposeUp)
subprojects.each {
if (it.name.endsWith("-service") || it.name.endsWith("-gateway")) {
composeBuild.dependsOn(":" + it.name + ":assemble")
composeUp.dependsOn(":" + it.name + ":assemble")
}
}