-
Notifications
You must be signed in to change notification settings - Fork 1
chore: JaCoCo와 SonarCloud를 연동한 Gradle 빌드 및 품질 관리 시스템 구축 #30
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
Changes from all commits
3b29c7f
c49bb9a
34bfabd
41a17e4
252293f
774ef36
77a7b26
09284b2
9c412a9
bf4fe3d
ed47f16
328cbcb
d6d0bda
a15892a
e57c642
4b9ea80
cd1c928
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,7 +8,8 @@ plugins { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kotlin(Plugins.Kotlin.Short.SPRING) version Versions.KOTLIN | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kotlin(Plugins.Kotlin.Short.JPA) version Versions.KOTLIN | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id(Plugins.DETEKT) version Versions.DETEKT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id(Plugins.KOVER) version Versions.KOVER | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id(Plugins.JACOCO) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| id(Plugins.SONAR_QUBE) version Versions.SONAR_QUBE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
move-hoon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| allprojects { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -19,29 +20,41 @@ allprojects { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // 테스트하지 않는 코드 패턴 (JaCoCo + SonarQube 커버리지 + CPD 공통) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| val testExclusionPatterns = listOf( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/*Application*", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/config/**", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/*Config*", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/exception/**", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/*Exception*", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/*ErrorCode*", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/dto/**", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/*Request*", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/*Response*", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/*Entity*", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/annotation/**", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/generated/**" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // SonarQube 전체 분석 제외 패턴 (분석 자체가 의미 없는 파일들) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| val sonarGlobalExclusions = listOf( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "**/build/**", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subprojects { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apply(plugin = Plugins.SPRING_BOOT) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apply(plugin = Plugins.SPRING_DEPENDENCY_MANAGEMENT) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apply(plugin = Plugins.Kotlin.SPRING) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apply(plugin = Plugins.Kotlin.JPA) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apply(plugin = Plugins.Kotlin.JVM) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apply(plugin = Plugins.JACOCO) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| java { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| toolchain { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| languageVersion.set(JavaLanguageVersion.of(Versions.JAVA_VERSION.toInt())) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dependencyManagement { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| imports { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mavenBom("org.springframework.cloud:spring-cloud-dependencies:2025.0.0") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.withType<Test> { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| useJUnitPlatform() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| plugins.withId(Plugins.Kotlin.ALLOPEN) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extensions.configure<org.jetbrains.kotlin.allopen.gradle.AllOpenExtension> { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| annotation("jakarta.persistence.Entity") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -53,14 +66,150 @@ subprojects { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Configure Kotlin compiler options | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| kotlinOptions { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| freeCompilerArgs = listOf("-Xjsr305=strict") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| freeCompilerArgs += listOf( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "-Xjsr305=strict", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "-Xconsistent-data-class-copy-visibility" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jvmTarget = Versions.JAVA_VERSION | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| freeCompilerArgs += "-Xconsistent-data-class-copy-visibility" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // 루트 프로젝트에서 모든 JaCoCo 설정 관리 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| configure(subprojects) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| jacoco { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| toolVersion = Versions.JACOCO | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.withType<Test> { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| useJUnitPlatform() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| finalizedBy("jacocoTestReport") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| testLogging { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| events("passed", "skipped", "failed") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| showStandardStreams = false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
move-hoon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // 각 서브모듈의 JaCoCo 테스트 리포트 설정 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.withType<JacocoReport> { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dependsOn("test") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reports { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| xml.required.set(true) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| csv.required.set(false) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| html.required.set(true) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| classDirectories.setFrom(fileTree(layout.buildDirectory.dir("classes/kotlin/main")) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exclude(testExclusionPatterns) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| executionData.setFrom(fileTree(layout.buildDirectory) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| include("jacoco/*.exec") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
move-hoon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| withType<Jar> { enabled = true } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| withType<BootJar> { enabled = false } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
move-hoon marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // 루트 프로젝트 JaCoCo 통합 리포트 설정 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.register<JacocoReport>("jacocoRootReport") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "Generates an aggregate report from all subprojects" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| group = "reporting" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dependsOn(subprojects.map { it.tasks.named("test") }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sourceDirectories.setFrom(subprojects.map { it.the<SourceSetContainer>()["main"].allSource.srcDirs }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| classDirectories.setFrom(subprojects.map { subproject -> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subproject.fileTree(subproject.layout.buildDirectory.get().asFile.resolve("classes/kotlin/main")) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| exclude(testExclusionPatterns) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| executionData.from(subprojects.map { subproject -> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subproject.fileTree(subproject.layout.buildDirectory.dir("jacoco")) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| include("**/*.exec") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+118
to
+135
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 통합 리포트에도
- executionData.from(subprojects.map { subproject ->
- subproject.fileTree(subproject.layout.buildDirectory.dir("jacoco")) {
- include("**/*.exec")
- }
- })
+ executionData.from(subprojects.map { sp ->
+ sp.fileTree("${sp.buildDir}/jacoco") {
+ include("**/*.exec")
+ }.filter { it.exists() }
+ })📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| reports { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| xml.required.set(true) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| csv.required.set(false) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| html.required.set(true) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // SonarQube 설정을 루트에서 모든 서브모듈에 대해 설정 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sonar { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| properties { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| property("sonar.projectKey", "YAPP-Github_26th-App-Team-1-BE") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| property("sonar.organization", "yapp-github") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| property("sonar.host.url", "https://sonarcloud.io") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| property( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "sonar.coverage.jacoco.xmlReportPaths", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "${layout.buildDirectory.get()}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| property("sonar.kotlin.coveragePlugin", Plugins.JACOCO) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| property("sonar.kotlin.version", Versions.KOTLIN) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| property("sonar.exclusions", sonarGlobalExclusions.joinToString(",")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| property("sonar.cpd.exclusions", testExclusionPatterns.joinToString(",")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| property("sonar.coverage.exclusions", testExclusionPatterns.joinToString(",")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // SonarQube 태스크가 통합 JaCoCo 리포트에 의존하도록 설정 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.named("sonar") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dependsOn("jacocoRootReport") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * CI용 - 전체 품질 검증 파이프라인을 실행합니다. (테스트, 커버리지, SonarQube 분석) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * GitHub Actions에서 이 태스크 하나만 호출합니다. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * 사용 예: ./gradlew fullCheck | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.register("fullCheck") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "Runs all tests, generates reports, and performs SonarQube analysis" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| group = "Verification" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dependsOn("testAll", "jacocoTestReportAll") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| finalizedBy("sonar") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * 로컬용 - SonarQube 분석 없이 빠르게 테스트 커버리지만 확인합니다. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * 사용 예: ./gradlew checkCoverage | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.register("checkCoverage") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "Runs tests and generates coverage reports without SonarQube analysis" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| group = "Verification" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dependsOn("testAll", "jacocoTestReportAll") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * 로컬용 - 빌드 과정에서 생성된 모든 리포트를 삭제합니다. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * 사용 예: ./gradlew cleanReports | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.register("cleanReports") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "Cleans all generated reports" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| group = "Cleanup" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| doLast { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| subprojects.forEach { subproject -> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| delete(subproject.layout.buildDirectory.dir("reports")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| delete(layout.buildDirectory.dir("reports")) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.register("testAll") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "Runs tests in all subprojects" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| group = "Verification" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dependsOn(subprojects.map { it.tasks.named("test") }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tasks.register("jacocoTestReportAll") { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description = "Generates JaCoCo test reports for all subprojects and creates aggregate report" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| group = "Verification" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| dependsOn(subprojects.map { it.tasks.named("jacocoTestReport") }) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| finalizedBy("jacocoRootReport") | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| rootProject.name = "multi-module-test" | ||
| rootProject.name = "reed" | ||
|
|
||
| include( | ||
| "admin", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.