Skip to content

Commit

Permalink
#1 Fix: build.gradle 모듈별 내용 수정
Browse files Browse the repository at this point in the history
- root build.gradle: java, Springboot 내용 제거, subproject, allproject 메서드 제거 -> 각 모듈별로 설정
- core build.gradle: java 플러그인 적용
- api build.gradle: java, Springboot 플러그인 적용
- stream build.gradle: java, Springboot 플러그인 적용
  • Loading branch information
rivkode committed Aug 23, 2024
1 parent 135316a commit d31777e
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 54 deletions.
49 changes: 1 addition & 48 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,49 +1,3 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.8'
id 'io.spring.dependency-management' version '1.1.6'
}

bootJar.enabled = false

allprojects {
group = 'com'
version = '0.0.1-SNAPSHOT'

repositories {
mavenCentral()
}
}

subprojects {
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

tasks.named('test') {
useJUnitPlatform()
}

}

// module core에 module-api, module-stream이 의존
project(':module-api') {
dependencies {
Expand All @@ -55,5 +9,4 @@ project(':module-stream') {
dependencies {
implementation(project(':module-core'))
}
}

}
25 changes: 23 additions & 2 deletions module-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
bootJar.enabled = false
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
}

jar.enabled = true
group = 'com'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

tasks.named('test') {
useJUnitPlatform()
}
20 changes: 18 additions & 2 deletions module-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
bootJar.enabled = false
plugins {
id 'java'
}

jar.enabled = true
bootJar.enabled = false // 실행 가능한 jar 파일 생성
jar.enabled = true // 컴파일된 클래스 파일만 포함된 jar 파일 생성

group = 'com'
version = '0.0.1-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
}

test {
useJUnitPlatform()
}
26 changes: 24 additions & 2 deletions module-stream/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
bootJar.enabled = false
plugins {
id 'java'
id 'org.springframework.boot' version '3.3.0'
id 'io.spring.dependency-management' version '1.1.5'
}

group = 'com'
version = '0.0.1-SNAPSHOT'

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

jar.enabled = true
repositories {
mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

tasks.named('test') {
useJUnitPlatform()
}

0 comments on commit d31777e

Please sign in to comment.