Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BSVR-52] Gradle refreshVersion 플러그인 적용 #5

Merged
merged 3 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies {
implementation("org.springframework:spring-aspects")

// swagger
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:_")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refreshVersion가 만들어주는 versions.properties에서 버전 정보를 관리하므로, 직접 하드코딩 하지 않고 _로 표기해주면 돼!

}

// spring boot main application이므로 실행 가능한 jar를 생성한다.
Expand Down
14 changes: 7 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("java")
id("org.springframework.boot") version "3.0.1"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
id("com.diffplug.spotless") version "6.21.0"
id("org.springframework.boot")
id("io.spring.dependency-management")
id("com.diffplug.spotless")
}

allprojects {
Expand All @@ -29,12 +29,12 @@ subprojects {
// subproject 모두에 필요한 의존성을 관리합니다.
dependencies {
// lombok
compileOnly("org.projectlombok:lombok:1.18.30")
annotationProcessor("org.projectlombok:lombok:1.18.30")
compileOnly("org.projectlombok:lombok:_")
annotationProcessor("org.projectlombok:lombok:_")

// test
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.springframework.boot:spring-boot-starter-test:_")
testImplementation(platform("org.junit:junit-bom:_"))
testImplementation("org.junit.jupiter:junit-jupiter")
}

Expand Down
6 changes: 6 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
rootProject.name = "SPOT-server"

plugins {
// See https://jmfayard.github.io/refreshVersions
id("de.fayard.refreshVersions") version "0.60.5"
}
Comment on lines +3 to +6
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 플러그인을 사용해서 버전을 중앙 관리 하는 것~~


include("domain")
include("application")
22 changes: 22 additions & 0 deletions versions.properties
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 파일은 refreshVersions 하면 자동으로 생성되는 파일!
처음 생성된 이후에는, ./gradlew refreshVersions 하면 versions.properties에 기재되어 있는 의존성들의 최신 버전 목록을 주석으로 보여줘.

예시 동작은 공홈 참고 )) https://www.youtube.com/watch?v=VhYERonB8co

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인!

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#### Dependencies and Plugin versions with their available updates.
#### Generated by `./gradlew refreshVersions` version 0.60.5
####
#### Don't manually edit or split the comments that start with four hashtags (####),
#### they will be overwritten by refreshVersions.
####
#### suppress inspection "SpellCheckingInspection" for whole file
#### suppress inspection "UnusedProperty" for whole file

plugin.org.springframework.boot=3.0.1

plugin.io.spring.dependency-management=1.0.11.RELEASE

plugin.com.diffplug.spotless=6.21.0

version.junit=5.9.1

version.org.projectlombok..lombok=1.18.30

version.org.springframework.boot..spring-boot-starter-test=3.0.1

version.org.springdoc..springdoc-openapi-starter-webmvc-ui=2.5.0