Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Commit 97b4973

Browse files
committed
Working multiproject app with an application
Working multiproject app with an application
1 parent 0673a5f commit 97b4973

File tree

26 files changed

+80
-65
lines changed

26 files changed

+80
-65
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# TODO
2+
* `./gradlew :app:run --warning-mode all`
3+
4+
15
# ☕🎯 Hexagonal Architecture + DDD + CQRS Java example with SpringBoot
26

37
<img src="http://codely.tv/wp-content/uploads/2016/05/cropped-logo-codelyTV.png" align="left" width="192px" height="192px"/>

app/build.gradle

Lines changed: 0 additions & 10 deletions
This file was deleted.

applications/build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apply plugin: 'application'
2+
3+
mainClassName = 'tv.codely.Starter'
4+
5+
dependencies {
6+
compile project(":src:backoffice")
7+
compile project(":src:mooc")
8+
}
9+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package tv.codely;
2+
3+
public class Starter {
4+
public static void main(String[] args) {
5+
System.out.println("In Works!");
6+
}
7+
}

build.gradle

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,32 @@ buildscript {
66
}
77

88
allprojects {
9+
apply plugin: 'java'
10+
11+
sourceCompatibility = 11
12+
targetCompatibility = 11
13+
914
repositories {
1015
mavenCentral()
1116
}
17+
18+
sourceSets {
19+
main {
20+
java { srcDirs = [ 'main' ] }
21+
}
22+
test {
23+
java { srcDirs = [ 'test' ] }
24+
}
25+
}
26+
27+
task hello {
28+
doLast { task ->
29+
println "I'm $task.project.name"
30+
}
31+
}
1232
}
1333

1434
subprojects {
15-
apply plugin: 'java'
16-
1735
group = "tv.codely.${rootProject.name}"
1836

1937
dependencies {
@@ -37,4 +55,4 @@ subprojects {
3755
html.enabled = true
3856
}
3957
}
40-
}
58+
}

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
rootProject.name = 'cqrs-ddd-java-example'
22

3-
include 'app'
3+
include 'applications'
44
include 'src:backoffice'
55
include 'src:mooc'
66
include 'src:shared'

src/backoffice/build.gradle

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
apply plugin: 'application'
2-
3-
application {
4-
}
5-
61
dependencies {
7-
}
8-
9-
run.doFirst {
2+
compile project(":src:shared")
103
}

src/mooc/build.gradle

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
apply plugin: 'application'
2-
3-
application {
4-
mainClassName = "tv.codely.context.video.module.video.infrastructure.VideoPublisherCliController"
5-
}
6-
71
dependencies {
8-
}
9-
10-
run.doFirst {
11-
// Environment variables go here.
2+
compile project(":src:shared")
123
}

src/mooc/main/java/tv/codely/context/video/module/video/infrastructure/.gitkeep

Whitespace-only changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
package tv.codely.context.notification.module.push.application.create;
1+
package tv.codely.mooc.notification.module.push.application.create;
22

3-
import tv.codely.context.video.module.video.domain.VideoPublished;
4-
import tv.codely.shared.application.DomainEventSubscriber;
3+
import tv.codely.mooc.video.module.video.domain.VideoPublished;
4+
import tv.codely.mooc.shared.application.DomainEventSubscriber;
55

66
public class SendPushToSubscribersOnVideoPublished implements DomainEventSubscriber<VideoPublished> {
77
@Override

0 commit comments

Comments
 (0)