Skip to content

Commit e31149b

Browse files
committed
build: upgrade to kotlin 2.1.0 and android gradle plugin 8.5.2
1 parent 281c081 commit e31149b

File tree

13 files changed

+147
-43
lines changed

13 files changed

+147
-43
lines changed

.github/pull_request_template.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# 셀프 체크리스트
2+
3+
<!--
4+
모든 항목을 점검한 후 리뷰를 요청하면, 보다 의미 있는 피드백을 받을 수 있습니다.
5+
-->
6+
7+
- [ ] 프로그램이 정상적으로 작동하는가?
8+
- [ ] 모든 테스트가 통과하는가?
9+
- [ ] 이전에 받은 피드백을 모두 반영하였는가?
10+
- [ ] 코딩 스타일 가이드를 준수하였는가?
11+
- [ ] IDE 코드 자동 정렬을 적용하였는가?
12+
- [ ] 린트 검사를 통과하였는가?
13+
- [ ] 프로그래밍 요구 사항을 준수하였는가?
14+
- [ ] `README.md`에 기능 목록을 정리하고 명확히 기술하였는가?
15+
16+
# 어떤 부분에 집중하여 리뷰해야 할까요?
17+
18+
<!--
19+
학습 목표에 맞게 구현하였는지 점검하고, 피드백을 받을 준비가 되었는지 확인하세요.
20+
정답을 묻기보다, 자신의 생각과 의사 결정 과정을 공유하며 피드백을 통해 논의하는 것이 좋습니다.
21+
-->
22+
23+
-
24+
25+
## 코드 리뷰 커뮤니케이션
26+
27+
<!--
28+
리뷰어에게 질문이 있다면, PR에 직접 코멘트를 남겨 보세요.
29+
특정 코드 줄에 의견을 남기면 보다 구체적인 피드백을 받을 수 있습니다.
30+
-->
31+
32+
📌 [GitHub에서 PR에 댓글 남기는 방법](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request)
33+
34+
## 참고 자료
35+
36+
<!-- 관련 문서나 참고할 만한 자료를 추가하세요. -->
37+
38+
## 스크린샷
39+
40+
<!-- 필요하다면 스크린샷을 첨부하세요. -->
41+
42+
![]()

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,8 @@ google-services.json
3232
# Android Profiling
3333
*.hprof
3434

35+
# Kotlin
36+
.kotlin
37+
3538
# Mac OS
3639
.DS_Store

app/build.gradle.kts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
plugins {
2-
id("com.android.application")
3-
id("org.jetbrains.kotlin.android")
4-
id("de.mannodermaus.android-junit5") version "1.10.0.0"
2+
alias(libs.plugins.android.application)
3+
alias(libs.plugins.android.junit5)
4+
alias(libs.plugins.kotlin.android)
55
}
66

77
android {
88
namespace = "woowacourse.shopping"
9-
compileSdk = 34
9+
compileSdk = 35
1010

1111
defaultConfig {
1212
applicationId = "woowacourse.shopping"
1313
minSdk = 26
14-
targetSdk = 34
14+
targetSdk = 35
1515
versionCode = 1
1616
versionName = "1.0"
1717

@@ -29,11 +29,11 @@ android {
2929
}
3030
}
3131
compileOptions {
32-
sourceCompatibility = JavaVersion.VERSION_17
33-
targetCompatibility = JavaVersion.VERSION_17
32+
sourceCompatibility = JavaVersion.VERSION_21
33+
targetCompatibility = JavaVersion.VERSION_21
3434
}
3535
kotlinOptions {
36-
jvmTarget = "17"
36+
jvmTarget = "21"
3737
}
3838
packaging {
3939
resources {
@@ -44,20 +44,20 @@ android {
4444
}
4545

4646
dependencies {
47-
implementation("androidx.core:core-ktx:1.10.1")
48-
implementation("androidx.appcompat:appcompat:1.6.1")
49-
implementation("com.google.android.material:material:1.10.0")
50-
implementation("androidx.activity:activity-ktx:1.8.2")
51-
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
52-
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
53-
testImplementation("org.assertj:assertj-core:3.25.3")
54-
testImplementation("io.kotest:kotest-runner-junit5:5.8.0")
55-
androidTestImplementation("androidx.test.ext:junit:1.1.5")
56-
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
57-
androidTestImplementation("androidx.test:runner:1.4.0")
58-
androidTestImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
59-
androidTestImplementation("org.assertj:assertj-core:3.25.3")
60-
androidTestImplementation("io.kotest:kotest-runner-junit5:5.8.0")
61-
androidTestImplementation("de.mannodermaus.junit5:android-test-core:1.3.0")
62-
androidTestRuntimeOnly("de.mannodermaus.junit5:android-test-runner:1.3.0")
47+
implementation(libs.androidx.activity.ktx)
48+
implementation(libs.androidx.appcompat)
49+
implementation(libs.androidx.constraintlayout)
50+
implementation(libs.androidx.core.ktx)
51+
implementation(libs.google.material)
52+
testImplementation(libs.assertj.core)
53+
testImplementation(libs.junit.jupiter)
54+
testImplementation(libs.kotest.runner.junit5)
55+
androidTestImplementation(libs.androidx.espresso.core)
56+
androidTestImplementation(libs.androidx.test.ext.junit)
57+
androidTestImplementation(libs.androidx.test.runner)
58+
androidTestImplementation(libs.assertj.core)
59+
androidTestImplementation(libs.junit.jupiter)
60+
androidTestImplementation(libs.kotest.runner.junit5)
61+
androidTestImplementation(libs.mannodermaus.junit5.core)
62+
androidTestRuntimeOnly(libs.mannodermaus.junit5.runner)
6363
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
package woowacourse.shopping
22

33
import android.os.Bundle
4+
import androidx.activity.enableEdgeToEdge
45
import androidx.appcompat.app.AppCompatActivity
6+
import androidx.core.view.ViewCompat
7+
import androidx.core.view.WindowInsetsCompat
58

69
class MainActivity : AppCompatActivity() {
710
override fun onCreate(savedInstanceState: Bundle?) {
811
super.onCreate(savedInstanceState)
12+
enableEdgeToEdge()
913
setContentView(R.layout.activity_main)
14+
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
15+
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
16+
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
17+
insets
18+
}
1019
}
1120
}

app/src/main/res/layout/activity_main.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
5+
android:id="@+id/main"
56
android:layout_width="match_parent"
67
android:layout_height="match_parent"
78
tools:context=".MainActivity">

app/src/main/res/xml/backup_rules.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Sample backup rules file; uncomment and customize as necessary.
33
See https://developer.android.com/guide/topics/data/autobackup
44
for details.
5-
Note: This file is ignored for devices older that API 31
5+
Note: This file is ignored for devices older than API 31
66
See https://developer.android.com/about/versions/12/backup-restore
77
-->
88
<full-backup-content>

build.gradle.kts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
plugins {
3-
id("com.android.application") version "8.3.1" apply false
4-
id("org.jetbrains.kotlin.android") version "1.9.0" apply false
5-
id("org.jlleitschuh.gradle.ktlint") version "12.1.0" apply false
3+
alias(libs.plugins.android.application) apply false
4+
alias(libs.plugins.kotlin.android) apply false
5+
alias(libs.plugins.ktlint) apply false
66
}
77

88
allprojects {
9-
apply(plugin = "org.jlleitschuh.gradle.ktlint")
9+
apply(plugin = rootProject.libs.plugins.ktlint.get().pluginId)
1010
}

gradle/libs.versions.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[versions]
2+
android-gradle-plugin = "8.5.2"
3+
android-junit5 = "1.12.0.0"
4+
androidx-activity-ktx = "1.10.1"
5+
androidx-appcompat = "1.7.0"
6+
androidx-constraintlayout = "2.2.1"
7+
androidx-core-ktx = "1.15.0"
8+
androidx-espresso-core = "3.6.1"
9+
androidx-test-ext-junit = "1.2.1"
10+
androidx-test-runner = "1.6.2"
11+
assertj-core = "3.27.3"
12+
google-material = "1.12.0"
13+
junit-jupiter = "5.12.0"
14+
kotest-runner-junit5 = "5.9.1"
15+
kotlin = "2.1.0"
16+
ktlint = "12.1.0"
17+
mannodermaus-junit5 = "1.7.0"
18+
19+
[libraries]
20+
androidx-activity-ktx = { group = "androidx.activity", name = "activity-ktx", version.ref = "androidx-activity-ktx" }
21+
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "androidx-appcompat" }
22+
androidx-constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "androidx-constraintlayout" }
23+
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core-ktx" }
24+
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "androidx-espresso-core" }
25+
androidx-test-ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "androidx-test-ext-junit" }
26+
androidx-test-runner = { group = "androidx.test", name = "runner", version.ref = "androidx-test-runner" }
27+
assertj-core = { group = "org.assertj", name = "assertj-core", version.ref = "assertj-core" }
28+
google-material = { group = "com.google.android.material", name = "material", version.ref = "google-material" }
29+
junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit-jupiter" }
30+
kotest-runner-junit5 = { group = "io.kotest", name = "kotest-runner-junit5", version.ref = "kotest-runner-junit5" }
31+
mannodermaus-junit5-core = { group = "de.mannodermaus.junit5", name = "android-test-core", version.ref = "mannodermaus-junit5" }
32+
mannodermaus-junit5-runner = { group = "de.mannodermaus.junit5", name = "android-test-runner", version.ref = "mannodermaus-junit5" }
33+
34+
[plugins]
35+
android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
36+
android-junit5 = { id = "de.mannodermaus.android-junit5", version.ref = "android-junit5" }
37+
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
38+
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }

gradle/wrapper/gradle-wrapper.jar

-19.7 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,8 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
8891

8992
# Use the maximum available, or set MAX_FD != -1 to use that value.
9093
MAX_FD=maximum

gradlew.bat

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
4345
%JAVA_EXE% -version >NUL 2>&1
4446
if %ERRORLEVEL% equ 0 goto execute
4547

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
48+
echo. 1>&2
49+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50+
echo. 1>&2
51+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52+
echo location of your Java installation. 1>&2
5153

5254
goto fail
5355

@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5759

5860
if exist "%JAVA_EXE%" goto execute
5961

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
62+
echo. 1>&2
63+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64+
echo. 1>&2
65+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66+
echo location of your Java installation. 1>&2
6567

6668
goto fail
6769

settings.gradle.kts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
pluginManagement {
22
repositories {
3-
google()
3+
google {
4+
content {
5+
includeGroupByRegex("com\\.android.*")
6+
includeGroupByRegex("com\\.google.*")
7+
includeGroupByRegex("androidx.*")
8+
}
9+
}
410
mavenCentral()
511
gradlePluginPortal()
612
}

0 commit comments

Comments
 (0)