@@ -21,6 +21,7 @@ dependencies {
21
21
val eventuateCommonImageVersion: String by project
22
22
val eventuateCdcImageVersion: String by project
23
23
val eventuateMessagingKafkaImageVersion: String by project
24
+ val infrastructureServices = listOf (" zipkin" , " zookeeper" , " kafka" , " auth-service-mysql" , " contact-service-mysql" , " organization-service-mysql" , " cdc-service" )
24
25
25
26
configure<ComposeExtension > {
26
27
includeDependencies.set(true )
@@ -32,26 +33,28 @@ configure<ComposeExtension> {
32
33
createNested(" infrastructure" ).apply {
33
34
setProjectName(null )
34
35
useComposeFiles.set(listOf (" docker-compose.yaml" ))
35
- startedServices.set(listOf ( " zipkin " , " zookeeper " , " kafka " , " auth-service-mysql " , " contact-service-mysql " , " organization-service-mysql " , " cdc-service " ) )
36
+ startedServices.set(infrastructureServices )
36
37
}
37
38
38
- createNested(" studycrm " ).apply {
39
+ createNested(" services " ).apply {
39
40
setProjectName(null )
40
41
environment.putAll(mapOf (" TAGS" to " feature-test,local" ))
41
42
useComposeFiles.set(listOf (" docker-compose.yaml" ))
42
- startedServices.set(listOf (" zipkin " , " zookeeper " , " kafka " , " auth-service" , " auth-service-mysql " , " contact-service" , " contact-service-mysql " , " organization-service" , " organization-service-mysql " , " api-gateway" , " cdc-service " ))
43
+ startedServices.set(listOf (* infrastructureServices.toTypedArray() , " auth-service" , " contact-service" , " organization-service" , " api-gateway" ))
43
44
}
44
45
}
45
46
46
- tasks.register(" buildAndRunInfrastructure " ) {
47
+ tasks.register(" startInfrastructure " ) {
47
48
dependsOn(" infrastructureComposeUp" )
48
49
}
49
50
50
- tasks.register(" buildAndRunServices" ) {
51
- dependsOn(gradle.includedBuild(" auth-service-main" ).task(" :auth-main-app:build" ));
52
- dependsOn(gradle.includedBuild(" contact-service-main" ).task(" :contact-main-app:build" ));
53
- dependsOn(gradle.includedBuild(" organization-service-main" ).task(" :organization-main-app:build" ));
54
- dependsOn(" studycrmComposeUp" )
51
+ tasks.register(" start" ) {
52
+ dependsOn(" assemble" );
53
+ dependsOn(" servicesComposeUp" )
54
+ }
55
+
56
+ tasks.register(" teardown" ) {
57
+ dependsOn(" servicesComposeDown" )
55
58
}
56
59
57
60
// Exclude these projects from the repo build tasks.
@@ -61,7 +64,7 @@ var excludeProjects = listOf("build-logic", "platforms")
61
64
tasks.register(" fix" ) {}
62
65
63
66
// Setup repo build tasks
64
- listOf (" build" , " test" , " check" , " fix" , " clean" ).forEach { taskName ->
67
+ listOf (" build" , " test" , " check" , " fix" , " clean" , " assemble " ).forEach { taskName ->
65
68
tasks.named(taskName) {
66
69
67
70
dependsOn(
0 commit comments