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

Commit 8c5ada5

Browse files
authored
Merge pull request #7 from CodelyTV/monorepo
Transform to monorepo
2 parents 1803875 + e86ae57 commit 8c5ada5

File tree

27 files changed

+116
-60
lines changed

27 files changed

+116
-60
lines changed

β€Ž.travis.ymlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ install: true
2525
script:
2626
- ./gradlew assemble --warning-mode all
2727
- ./gradlew check --warning-mode all
28+
# Checks the application is running ok
29+
- ./gradlew :app:run --warning-mode all

β€ŽREADME.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
> You can do awesome stuff with Java πŸ™‚
77
88
[![CodelyTV](https://img.shields.io/badge/codely-tv-green.svg?style=flat-square)](https://codely.tv)
9-
[![Build Status](https://travis-ci.com/CodelyTV/cqrs-ddd-java-example.svg?branch=master)](https://travis-ci.com/CodelyTV/cqrs-ddd-java-example)
9+
[![Build Status](https://travis-ci.org/CodelyTV/cqrs-ddd-java-example.svg?branch=master)](https://travis-ci.org/CodelyTV/cqrs-ddd-java-example)
1010

1111
Implementation example of a Java application following Domain-Driven Design (DDD) and Command Query Responsibility Segregation (CQRS) principles, keeping the code as simple as possible.
1212

β€Ž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: 47 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,58 @@
1-
apply plugin: 'java'
2-
apply plugin: 'application'
3-
4-
sourceCompatibility = 1.11
5-
targetCompatibility = 1.11
6-
7-
repositories {
8-
mavenCentral()
9-
jcenter()
1+
buildscript {
2+
repositories {
3+
mavenCentral()
4+
jcenter()
5+
}
106
}
117

12-
dependencies {
13-
// Prod
14-
implementation 'io.projectreactor:reactor-bus:2.0.8.RELEASE'
8+
allprojects {
9+
apply plugin: 'java'
1510

16-
// Test
17-
testCompile "org.mockito:mockito-core:2.+"
18-
testCompile 'org.junit.jupiter:junit-jupiter-api:5.+'
19-
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.+'
20-
}
11+
sourceCompatibility = 11
12+
targetCompatibility = 11
2113

22-
test {
23-
useJUnitPlatform()
14+
repositories {
15+
mavenCentral()
16+
}
2417

25-
testLogging {
26-
events "passed", "skipped", "failed"
18+
sourceSets {
19+
main {
20+
java { srcDirs = [ 'main' ] }
21+
}
22+
test {
23+
java { srcDirs = [ 'test' ] }
24+
}
2725
}
2826

29-
reports {
30-
html.enabled = true
27+
task hello {
28+
doLast { task ->
29+
println "I'm $task.project.name"
30+
}
3131
}
3232
}
3333

34-
application {
35-
mainClassName = "tv.codely.context.video.module.video.infrastructure.VideoPublisherCliController"
34+
subprojects {
35+
group = "tv.codely.${rootProject.name}"
36+
37+
dependencies {
38+
// Prod
39+
implementation 'io.projectreactor:reactor-bus:2.0.8.RELEASE'
40+
41+
// Test
42+
testCompile "org.mockito:mockito-core:2.+"
43+
testCompile 'org.junit.jupiter:junit-jupiter-api:5.+'
44+
testRuntime 'org.junit.jupiter:junit-jupiter-engine:5.+'
45+
}
46+
47+
test {
48+
useJUnitPlatform()
49+
50+
testLogging {
51+
events "passed", "skipped", "failed"
52+
}
53+
54+
reports {
55+
html.enabled = true
56+
}
57+
}
3658
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Sun Feb 24 20:05:13 CET 2019
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

β€Žsettings.gradleβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
rootProject.name = 'cqrs-ddd-java-example'
2+
3+
include 'applications'
4+
include 'src:backoffice'
5+
include 'src:mooc'
6+
include 'src:shared'

β€Žsrc/backoffice/build.gradleβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies {
2+
compile project(":src:shared")
3+
}

β€Žsrc/main/java/tv/codely/context/video/module/video/infrastructure/.gitkeepβ€Ž

Whitespace-only changes.

β€Žsrc/mooc/build.gradleβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies {
2+
compile project(":src:shared")
3+
}

0 commit comments

Comments
Β (0)