-
Notifications
You must be signed in to change notification settings - Fork 2
[NDGL-16] detekt, ktlint 적용 및 CI/CD 구성 #7
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
abd9a43
a02ddec
8c28b89
8d8295a
4c427ae
03d04db
ef05712
949dc88
09e1549
9debc34
8401319
a97bc22
0968f61
2279fed
f768925
72b96c0
a9b729a
6839670
6e8871e
5b19517
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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "permissions": { | ||
| "allow": [ | ||
| "Bash(git add:*)", | ||
| "Bash(git rebase:*)", | ||
| "Bash(git fetch:*)" | ||
| ] | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| indent_size = 4 | ||
| indent_style = space | ||
| max_line_length = 150 | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.{kt,kts}] | ||
| ij_kotlin_allow_trailing_comma = true | ||
| ij_kotlin_allow_trailing_comma_on_call_site = true | ||
| ktlint_function_naming_ignore_when_annotated_with = Composable |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Android CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "develop" ] | ||
| pull_request: | ||
| branches: [ "develop" ] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@v4 | ||
| with: | ||
| gradle-home-cache-cleanup: true | ||
|
|
||
| - name: Set up JDK 21 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
|
|
||
| - name: Grant execute permission for gradlew | ||
| run: chmod +x gradlew | ||
|
|
||
| - name: Set up local.properties | ||
| run: echo "${{ secrets.LOCAL_PROPERTIES }}" > local.properties | ||
|
|
||
| - name: Code style checks | ||
| run: ./gradlew ktlintCheck detekt | ||
|
|
||
| - name: Run build | ||
| run: ./gradlew assembleDebug --stacktrace |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,6 +4,12 @@ plugins { | |||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| android { | ||||||||||||||||||||||||||||||
| namespace = Configuration.APPLICATION_ID | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| buildTypes { | ||||||||||||||||||||||||||||||
| release { | ||||||||||||||||||||||||||||||
| isMinifyEnabled = true | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
Comment on lines
+8
to
+12
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. release 빌드에 ProGuard 설정이 누락되었습니다.
🔧 ProGuard 파일 추가 제안 buildTypes {
release {
isMinifyEnabled = true
+ proguardFiles(
+ getDefaultProguardFile("proguard-android-optimize.txt"),
+ "proguard-rules.pro",
+ )
}
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
Contributor
Author
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. Project.configureKotlinAndroid()에 포함되어 있음 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. 🧩 Analysis chain🏁 Script executed: Length of output: 2093
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro",
)
}
}기본 설정에서 ProGuard 파일이 지정되어 있고, ✏️ Learnings added
|
||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| dependencies { | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,4 +20,3 @@ class MainActivity : ComponentActivity() { | |
| } | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,35 @@ | ||
|
|
||
| import extensions.configureKotlinJvm | ||
| import org.gradle.api.Plugin | ||
| import org.gradle.api.Project | ||
| import org.gradle.api.plugins.JavaPluginExtension | ||
| import org.gradle.kotlin.dsl.configure | ||
| import org.gradle.kotlin.dsl.dependencies | ||
| import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
| import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension | ||
| import util.libs | ||
|
|
||
| class NDGLKotlinLibraryPlugin : Plugin<Project> { | ||
| override fun apply(target: Project): Unit = with(target) { | ||
| with(pluginManager) { | ||
| apply("org.jetbrains.kotlin.jvm") | ||
| } | ||
|
|
||
| configureKotlinJvm() | ||
|
|
||
| dependencies { | ||
| "detektPlugins"(libs.findLibrary("detekt.formatting").get()) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| internal fun Project.configureKotlinJvm() { | ||
| extensions.configure<JavaPluginExtension> { | ||
| sourceCompatibility = Configuration.JAVA_VERSION | ||
| targetCompatibility = Configuration.JAVA_VERSION | ||
| } | ||
|
|
||
| extensions.configure<KotlinJvmProjectExtension> { | ||
| compilerOptions { | ||
| jvmTarget.set(JvmTarget.fromTarget(Configuration.JVM_TARGET)) | ||
| } | ||
| } | ||
| } |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: YAPP-Github/27th-App-Team-1-Android
Length of output: 688
.claude/settings.local.json의 용도 명확히 필요파일명의 "local" 접미사는 로컬 전용 설정을 의미하나, 현재 커밋되어 있어 프로젝트 관례와 불일치합니다. 다음 중 하나로 정리를 권장합니다:
.gitignore에 추가settings.json으로 명명 변경 또는 공유/로컬 버전 분리🤖 Prompt for AI Agents