Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…ER_V2 into test/#68
  • Loading branch information
마현우 committed Apr 8, 2024
2 parents d2b3c43 + ec0525e commit 6902231
Show file tree
Hide file tree
Showing 134 changed files with 3,641 additions and 1,775 deletions.
1,211 changes: 1,211 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle

on:
Expand All @@ -18,9 +11,7 @@ permissions:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
Expand All @@ -31,6 +22,9 @@ jobs:

- name: Grant execute permission for gradlew
run: chmod +x gradlew


- name: checkStyle
run: ./gradlew check

- name: Build with Gradle
run: ./gradlew build
38 changes: 36 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ plugins {
id 'org.sonarqube' version "5.0.0.4638"
//SonarCloud test coverage
id "jacoco"
//CheckStyle
id "checkstyle"
//git hooks
id "com.star-zero.gradle.githook" version "1.2.1"
id "it.nicolasfarabegoli.conventional-commits" version "3.1.3"
}

group = 'com.project'
version = '0.0.1-SNAPSHOT'
//noinspection GroovyUnusedAssignment
sourceCompatibility = '17'

repositories {
Expand Down Expand Up @@ -73,12 +79,12 @@ tasks.named('test') {
useJUnitPlatform()
}


//querydsl 추가
def querydslDir = "$buildDir/generated/querydsl"
def querydslDir = layout.buildDirectory.dir("generated/querydsl").get().asFile
tasks.withType(JavaCompile).configureEach {
options.getGeneratedSourceOutputDirectory().set(file(querydslDir))
}

sourceSets {
main.java.srcDirs += [querydslDir]
}
Expand All @@ -90,6 +96,7 @@ configurations {
querydsl.extendsFrom compileClasspath
}


clean {
delete file(querydslDir)
}
Expand All @@ -105,6 +112,7 @@ sonarqube {
property "sonar.projectKey", "Team-INSERT_BUMAWIKI_SERVER_V2"
property "sonar.organization", "team-insert"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.java.checkstyle.reportPaths", "build/reports/checkstyle/main.xml"
}
}

Expand Down Expand Up @@ -153,4 +161,30 @@ jar {
enabled = false
}

//checkstyle
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'

tasks.withType(Checkstyle).configureEach {
reports {
xml.required = true
html.required = true
}
}

checkstyle {
maxWarnings = 0
configFile = file("checkstyle/naver-checkstyle-rules.xml")
configProperties = ["suppressionFile": "checkstyle/naver-checkstyle-suppressions.xml"]
}
checkstyleMain.source = fileTree('src/main/java')

githook {
failOnMissingHooksDir = false
createHooksDirIfNotExist = true
hooks {
"pre-commit" {
task = "check"
}
}
}
Loading

0 comments on commit 6902231

Please sign in to comment.