diff --git a/api/build.gradle b/api/build.gradle new file mode 100644 index 0000000..1578d43 --- /dev/null +++ b/api/build.gradle @@ -0,0 +1,3 @@ +dependencies { + api project(':application') +} \ No newline at end of file diff --git a/api/src/main/java/TestController.java b/api/src/main/java/TestController.java new file mode 100644 index 0000000..3e5f362 --- /dev/null +++ b/api/src/main/java/TestController.java @@ -0,0 +1,9 @@ +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequiredArgsConstructor +public class TestController { + + private final TestService testService; +} diff --git a/application/build.gradle b/application/build.gradle new file mode 100644 index 0000000..f1e5e96 --- /dev/null +++ b/application/build.gradle @@ -0,0 +1,4 @@ +dependencies { + api project(':domain') + api project(':infrastructure') +} \ No newline at end of file diff --git a/application/src/main/java/TestService.java b/application/src/main/java/TestService.java new file mode 100644 index 0000000..da0085d --- /dev/null +++ b/application/src/main/java/TestService.java @@ -0,0 +1,7 @@ +import org.springframework.stereotype.Service; + +@Service +public class TestService { + +} + diff --git a/build.gradle b/build.gradle index c1a02d7..2508e31 100644 --- a/build.gradle +++ b/build.gradle @@ -18,16 +18,35 @@ repositories { mavenCentral() } + + dependencies { - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' - compileOnly 'org.projectlombok:lombok' + testImplementation 'org.springframework.boot:spring-boot-starter-test' developmentOnly 'org.springframework.boot:spring-boot-devtools' - runtimeOnly 'mysql:mysql-connector-java' + compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' - testImplementation 'org.springframework.boot:spring-boot-starter-test' } + +subprojects{ + apply plugin: 'java' + apply plugin : 'java-library' + + repositories { + mavenCentral() + } + + dependencies { + implementation 'org.springframework.boot:spring-boot-autoconfigure:2.6.6' + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1' + compileOnly 'org.projectlombok:lombok:1.18.22' + + } +} + + tasks.named('test') { useJUnitPlatform() } diff --git a/domain/build.gradle b/domain/build.gradle new file mode 100644 index 0000000..9e8fb62 --- /dev/null +++ b/domain/build.gradle @@ -0,0 +1,3 @@ +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' +} \ No newline at end of file diff --git a/infrastructure/build.gradle b/infrastructure/build.gradle new file mode 100644 index 0000000..5e1e5cc --- /dev/null +++ b/infrastructure/build.gradle @@ -0,0 +1,3 @@ +dependencies { + runtimeOnly 'mysql:mysql-connector-java' +} \ No newline at end of file diff --git a/server/build.gradle b/server/build.gradle new file mode 100644 index 0000000..fa6de07 --- /dev/null +++ b/server/build.gradle @@ -0,0 +1,4 @@ +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-web:2.6.6' + testImplementation 'org.springframework.boot:spring-boot-starter-test' +} \ No newline at end of file diff --git a/src/main/java/com/example/haklind/HaklindApplication.java b/server/src/main/java/haklind/HaklindApplication.java similarity index 91% rename from src/main/java/com/example/haklind/HaklindApplication.java rename to server/src/main/java/haklind/HaklindApplication.java index 88c2328..7268eb2 100644 --- a/src/main/java/com/example/haklind/HaklindApplication.java +++ b/server/src/main/java/haklind/HaklindApplication.java @@ -1,4 +1,4 @@ -package com.example.haklind; +package haklind; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/src/main/resources/application.properties b/server/src/main/resources/application.properties similarity index 100% rename from src/main/resources/application.properties rename to server/src/main/resources/application.properties diff --git a/settings.gradle b/settings.gradle index a1bb289..ad41917 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1 +1,7 @@ rootProject.name = 'haklind' +include 'api' +include 'application' +include 'domain' +include 'infrastructure' +include 'server' + diff --git a/src/test/java/com/example/haklind/HaklindApplicationTests.java b/src/test/java/com/example/haklind/HaklindApplicationTests.java deleted file mode 100644 index c5b5c0c..0000000 --- a/src/test/java/com/example/haklind/HaklindApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.example.haklind; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class HaklindApplicationTests { - - @Test - void contextLoads() { - } - -}