Skip to content

🚚 Chore : ν”„λ‘œμ νŠΈ μ΄ˆκΈ°ν™” #9

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

Merged
merged 20 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d3ac78b
✨ Feat : `.gitmessage`
ooMia Mar 22, 2024
699508a
✨ Feat : `.gitmessage` (#5)
ooMia Mar 22, 2024
a8de1ef
🚚 Chore : Spring ν”„λ‘œμ νŠΈ μ΄ˆκΈ°ν™”
ooMia Mar 22, 2024
11dbd19
πŸ› Fix : κ²½κ³  μ–΅μ œλ₯Ό μœ„ν•œ λΉŒλ“œ μ„€μ •
ooMia Mar 22, 2024
e45f326
✨ Feat : Build Optimizing
ooMia Mar 22, 2024
afb2937
ν”„λ‘œμ νŠΈ μ΄ˆκΈ°ν™” (#8)
ooMia Mar 22, 2024
7a1b196
🚚 Chore : GitHub Actions 톡합 ν…ŒμŠ€νŠΈ
ooMia Mar 22, 2024
8a32f24
πŸ› Fix : μœ νš¨ν•˜μ§€ μ•Šμ€ μΊμ‹œν‚€ 이슈
ooMia Mar 22, 2024
bf76ac8
πŸ› Fix : remove redundancy
ooMia Mar 22, 2024
a32a1dd
✨ Feat : test μ •μ±… λ³€κ²½
ooMia Mar 22, 2024
67cda93
πŸ› Fix : 캐싱 κΈ°λŠ₯
ooMia Mar 22, 2024
ab97641
πŸ› Fix : `main` 이외 브랜치 캐싱
ooMia Mar 22, 2024
313be39
🚚 Chore : GitHub Actions 톡합 ν…ŒμŠ€νŠΈ (#10)
ooMia Mar 22, 2024
08012af
Merge branch 'main' into develop
ooMia Mar 22, 2024
54cb01e
πŸ“ Docs : PR template
ooMia Mar 22, 2024
e5429f8
πŸ“ Docs : PR template (#12)
ooMia Mar 22, 2024
be9016c
πŸ› Fix : `.gitmessage` format μΆ”κ°€
ooMia Mar 22, 2024
f94eab1
πŸ› Fix : `.gitmessage` format μΆ”κ°€ (#13)
ooMia Mar 22, 2024
0387631
🎨 Style : polishing
ooMia Mar 24, 2024
453fdb6
🚚 Chore : simplify dependency
ooMia Mar 24, 2024
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
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 4
36 changes: 36 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## κ°œμš”

<!-- 이 PR은 무엇을 ν•˜λŠ”μ§€ κ°„λ‹¨νžˆ μ„€λͺ…ν•΄μ£Όμ„Έμš”.
- μƒˆλ‘œμš΄ 둜그인 κΈ°λŠ₯ μΆ”κ°€
-->

## λ³€κ²½ 사항

<!-- 이 PR둜 인해 μ–΄λ–€ 것이 λ³€κ²½λ˜λŠ”μ§€ λ‚˜μ—΄ν•΄μ£Όμ„Έμš”.
- [x] πŸ› Fix : 였λ₯˜ μˆ˜μ •
- [x] ✨ Feat : μƒˆλ‘œμš΄ κΈ°λŠ₯
- [x] πŸ”§ Modify : μœ„μΉ˜ λ³€κ²½
- [x] πŸ€– Refactor : μ½”λ“œ λ¦¬νŒ©ν† λ§
- [x] βœ… Test : ν…ŒμŠ€νŠΈ μ½”λ“œ μΆ”κ°€
- [x] πŸ’‘ Comment : ν•„μš”ν•œ 주석 μΆ”κ°€ 및 λ³€κ²½
- [x] 🚚 Chore : ν™˜κ²½μ„€μ • λ³€κ²½
- [x] 🎨 Style : 의미 μ—†λŠ” μ½”λ“œ ν˜•μ‹ μˆ˜μ •
- [x] πŸ”₯ Remove : μ‚­μ œ
- [x] πŸ“ Docs : λ¬Έμ„œ μˆ˜μ •
-->

## μΆ”κ°€ 정보

<!-- 이 PR에 λŒ€ν•΄ ν•„μš”ν•œ 후속 μž‘μ—…μ΄ μžˆλ‹€λ©΄ μΆ”κ°€ν•΄μ£Όμ„Έμš”.
- [ ] 둜그인 νŽ˜μ΄μ§€ μΆ”κ°€ ν•„μš”
- [ ] 둜그인 API μ—°κ²° ν•„μš”
-->

### κ΄€λ ¨ 이슈

<!--
문제λ₯Ό ν•΄κ²°ν•œλ‹€λ©΄ Fix λ˜λŠ” Resolve
μΌλ°˜μ μœΌλ‘œλŠ” Closes #123
-->


24 changes: 24 additions & 0 deletions .github/workflows/gradle-test-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Run gradlew clean test on main

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '17'

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

- name: Run gradlew clean test on main
run: ./gradlew clean test
32 changes: 32 additions & 0 deletions .github/workflows/gradle-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run gradlew test

on:
pull_request:
branches-ignore:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '17'

- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-

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

- name: Run gradlew test
run: ./gradlew test
36 changes: 35 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,40 @@
# intellij
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
# Compiled class file
*.class

Expand Down
10 changes: 10 additions & 0 deletions .gitmessage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
✨ Feat : μƒˆλ‘œμš΄ κΈ°λŠ₯
πŸ› Fix : 였λ₯˜ μˆ˜μ •
πŸ”§ Modify : μœ„μΉ˜ λ³€κ²½
πŸ”₯ Remove : μ‚­μ œ
πŸ€– Refactor : μ½”λ“œ λ¦¬νŒ©ν† λ§
βœ… Test : ν…ŒμŠ€νŠΈ μ½”λ“œ μΆ”κ°€
πŸ’‘ Comment : ν•„μš”ν•œ 주석 μΆ”κ°€ 및 λ³€κ²½
🚚 Chore : ν™˜κ²½μ„€μ • λ³€κ²½
🎨 Style : 의미 μ—†λŠ” μ½”λ“œ ν˜•μ‹ μˆ˜μ •
πŸ“ Docs : λ¬Έμ„œ μˆ˜μ •
38 changes: 38 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
plugins {
java
id("org.springframework.boot") version "3.2.4"
id("io.spring.dependency-management") version "1.1.4"
}

group = "com.thread"
version = "0.1.0-SNAPSHOT"

java {
sourceCompatibility = JavaVersion.VERSION_17
}

repositories {
mavenCentral()
}

dependencies {
implementation("org.springframework.boot:spring-boot-starter")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
}

tasks {
all {
outputs.cacheIf { true }
}
}

tasks.test {
jvmArgs("-Xshare:off")
useJUnitPlatform()
}

apply(from = "dumpJsa.gradle.kts")
tasks.withType<JavaExec> {
dependsOn("dumpJsa")
}
34 changes: 34 additions & 0 deletions dumpJsa.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import org.gradle.api.tasks.Exec
import org.gradle.api.tasks.bundling.Jar
import java.nio.file.Files
import java.nio.file.Paths

open class DumpJsa : Exec() {
init {
group = "application"
description = "Dumps the .jsa file if it does not exist or is not up-to-date."
val bootJarTask = project.tasks.named("bootJar").get()
val jarTask = bootJarTask as Jar
val jarFile = jarTask.archiveFile.get().asFile
bootJarTask.onlyIf {
!jarFile.exists() || jarTask.inputs.files.any { it.isFile && it.lastModified() > jarFile.lastModified() }
}
dependsOn(bootJarTask)
}
}

tasks.register<DumpJsa>("dumpJsa") {
val jsaPathMain = "build/resources/main/sharedArchive.jsa"
val jarPath = "build/libs/${project.name}-${project.version}.jar"

val jsaFile = Paths.get(jsaPathMain)
val jarFile = Paths.get(jarPath)
val isJsaOutdated =
Files.notExists(jsaFile) || Files.getLastModifiedTime(jarFile).toMillis() > Files.getLastModifiedTime(jsaFile)
.toMillis()

if (isJsaOutdated) {
val commandMain = listOf("java", "-Xshare:dump", "-XX:SharedArchiveFile=$jsaPathMain", "-jar", jarPath)
commandLine(commandMain)
}
}
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
22 changes: 22 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Copyright 2012-2024 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading