Skip to content

Commit e1664ed

Browse files
authored
Merge pull request #176 from YAPP-Github/refactor/#175-improve-build
[Refactor/#175] 빌드 성능 개선 작업을 진행합니다.
2 parents 1b110ce + f336b8d commit e1664ed

4 files changed

Lines changed: 20 additions & 35 deletions

File tree

.github/.gitkeep

Whitespace-only changes.

.github/workflows/develop_branch.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,9 @@ jobs:
1414
- name: check out repository
1515
uses: actions/checkout@v4
1616

17-
- name: Decode Keystore
17+
- name: Decode Keystore & Generate local.properties
1818
env:
1919
RELEASE_STORE_BASE_64: ${{ secrets.RELEASE_STORE_BASE_64 }}
20-
run: |
21-
echo $RELEASE_STORE_BASE_64 > encoded_keystore.txt
22-
base64 --decode encoded_keystore.txt > release.jks
23-
24-
- name: Generate local.properties
25-
env:
2620
KAKAO_NATIVE_APP_KEY: ${{ secrets.KAKAO_NATIVE_APP_KEY }}
2721
KAKAO_REST_API_KEY: ${{ secrets.KAKAO_REST_API_KEY }}
2822
BITNAGIL_DEV_URL: ${{ secrets.BITNAGIL_DEV_URL }}
@@ -31,6 +25,11 @@ jobs:
3125
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }}
3226
RELEASE_STORE_PASSWORD: ${{ secrets.RELEASE_STORE_PASSWORD }}
3327
run: |
28+
# Keystore Decoding
29+
echo $RELEASE_STORE_BASE_64 > encoded_keystore.txt
30+
base64 --decode encoded_keystore.txt > release.jks
31+
32+
# Generate local.properties
3433
echo "kakao.native.app.key=$KAKAO_NATIVE_APP_KEY" >> local.properties
3534
echo "kakao.rest.api.key=$KAKAO_REST_API_KEY" >> local.properties
3635
echo "bitnagil.dev.url=$BITNAGIL_DEV_URL" >> local.properties
@@ -45,13 +44,11 @@ jobs:
4544
with:
4645
java-version: '17'
4746
distribution: 'temurin'
48-
cache: gradle
4947

50-
- name: Run ktlint
51-
run: ./gradlew ktlintCheck
52-
53-
- name: Run unit tests
54-
run: ./gradlew testDebugUnitTest
48+
- name: Setup Gradle
49+
uses: gradle/actions/setup-gradle@v4
50+
with:
51+
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
5552

56-
- name: Build with Gradle
57-
run: ./gradlew assembleDebug
53+
- name: Build and Verify
54+
run: ./gradlew ktlintCheck testDebugUnitTest assembleDebug

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ gen-external-apklibs
4545
### Kotlin ###
4646
# Compiled class file
4747
*.class
48+
.kotlin/
49+
.kotlin
4850

4951
# Log file
5052

gradle.properties

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
# Project-wide Gradle settings.
2-
# IDE (e.g. Android Studio) users:
3-
# Gradle settings configured through the IDE *will override*
4-
# any settings specified in this file.
5-
# For more details on how to configure your build environment visit
6-
# http://www.gradle.org/docs/current/userguide/build_environment.html
7-
# Specifies the JVM arguments used for the daemon process.
8-
# The setting is particularly useful for tweaking memory settings.
9-
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10-
# When configured, Gradle will run in incubating parallel mode.
11-
# This option should only be used with decoupled projects. For more details, visit
12-
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
13-
# org.gradle.parallel=true
14-
# AndroidX package structure to make it clearer which packages are bundled with the
15-
# Android operating system, and which are packaged with your app's APK
16-
# https://developer.android.com/topic/libraries/support-library/androidx-rn
17-
android.useAndroidX=true
18-
# Kotlin code style for this project: "official" or "obsolete":
2+
org.gradle.jvmargs=-Xmx4g -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8
3+
org.gradle.parallel=true
4+
org.gradle.caching=true
5+
org.gradle.configuration-cache=true
6+
kotlin.daemon.jvmargs=-Xmx2g -XX:+UseParallelGC
197
kotlin.code.style=official
20-
# Enables namespacing of each library's R class so that its R class includes only the
21-
# resources declared in the library itself and none from the library's dependencies,
22-
# thereby reducing the size of the R class for that library
8+
android.useAndroidX=true
239
android.nonTransitiveRClass=true

0 commit comments

Comments
 (0)