From 1e46fff95568aa6fe9b61d17ebd89ab7aae52e5e Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 16:43:47 +0900 Subject: [PATCH 01/19] build: version up --- android/gradle/libs.versions.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/gradle/libs.versions.toml b/android/gradle/libs.versions.toml index e470786c..504e9efe 100644 --- a/android/gradle/libs.versions.toml +++ b/android/gradle/libs.versions.toml @@ -3,8 +3,8 @@ applicationId = "poke.rogue.helper" compileSdk = "34" minSdk = "26" targetSdk = "34" -appVersion = "1.0.1" -versionCode = "10001" +appVersion = "1.0.3" +versionCode = "10003" agp = "8.3.2" # kotlin From 9bf9e8d9f0f8439d2b985ebf912db4a0e090c3eb Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 16:45:12 +0900 Subject: [PATCH 02/19] feat: drop DB --- .../java/poke/rogue/helper/local/db/PokeRogueDatabase.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android/local/src/main/java/poke/rogue/helper/local/db/PokeRogueDatabase.kt b/android/local/src/main/java/poke/rogue/helper/local/db/PokeRogueDatabase.kt index bb71fa1c..1426ad1b 100644 --- a/android/local/src/main/java/poke/rogue/helper/local/db/PokeRogueDatabase.kt +++ b/android/local/src/main/java/poke/rogue/helper/local/db/PokeRogueDatabase.kt @@ -31,5 +31,13 @@ abstract class PokeRogueDatabase : RoomDatabase() { ).build().also { instance = it } } } + + fun dropDatabase(context: Context) { + synchronized(this) { + instance?.close() + instance = null + context.deleteDatabase(DATABASE_NAME) + } + } } } From 9a9b245975f9b9affc44f8743d30fa1404fcd65c Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 16:46:09 +0900 Subject: [PATCH 03/19] =?UTF-8?q?feat:=20=EC=9E=84=EC=8B=9C=20=EB=B0=A9?= =?UTF-8?q?=ED=8E=B8=EC=9C=BC=EB=A1=9C=20=ED=94=84=EB=A1=9C=EC=84=B8?= =?UTF-8?q?=EC=8A=A4=20=EC=8B=A4=ED=96=89=EC=8B=9C=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20=EB=93=9C=EB=A1=AD=ED=95=98=EA=B3=A0=20Room=20?= =?UTF-8?q?=EB=8B=A4=EC=8B=9C=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/poke/rogue/helper/local/dao/PokemonDao.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/local/src/main/java/poke/rogue/helper/local/dao/PokemonDao.kt b/android/local/src/main/java/poke/rogue/helper/local/dao/PokemonDao.kt index 37f398be..6ddeb3fe 100644 --- a/android/local/src/main/java/poke/rogue/helper/local/dao/PokemonDao.kt +++ b/android/local/src/main/java/poke/rogue/helper/local/dao/PokemonDao.kt @@ -18,6 +18,8 @@ interface PokemonDao { companion object { fun instance(context: Context): PokemonDao { + // TODO 삭제될 블록 + PokeRogueDatabase.dropDatabase(context) return PokeRogueDatabase.instance(context).pokemonDao() } } From 9618f876178a16c65c5bf86372073c73767af54a Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 16:46:39 +0900 Subject: [PATCH 04/19] =?UTF-8?q?fix:=20Intro=20->=20Home=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EA=B0=88=EB=95=8C=20Activity=20Stack=20=EC=A0=84?= =?UTF-8?q?=EB=B6=80=20=EB=B9=84=EC=9A=B0=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rogue/helper/presentation/splash/PokemonIntroActivity.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroActivity.kt b/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroActivity.kt index 76128a83..0b60152d 100644 --- a/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroActivity.kt +++ b/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroActivity.kt @@ -14,13 +14,14 @@ import poke.rogue.helper.presentation.home.HomeActivity import poke.rogue.helper.presentation.util.context.startActivity import poke.rogue.helper.presentation.util.repeatOnStarted -class PokemonIntroActivity() : +class PokemonIntroActivity : ErrorHandleActivity(R.layout.activity_pokemon_intro) { private val viewModel by viewModels { PokemonIntroViewModel.factory(DefaultDexRepository.instance(), analyticsLogger()) } override val errorViewModel: ErrorHandleViewModel get() = viewModel + override val toolbar: Toolbar? = null override fun onCreate(savedInstanceState: Bundle?) { @@ -28,7 +29,7 @@ class PokemonIntroActivity() : super.onCreate(savedInstanceState) repeatOnStarted { viewModel.navigationToHomeEvent.collect { - finish() + finishAffinity() startActivity() } } From e14c44d03ae6634fb278a0925011ba6f66fcf2a2 Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 16:47:04 +0900 Subject: [PATCH 05/19] =?UTF-8?q?fix:=20warmUp=20=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=98=88=EC=99=B8=20=EB=B0=9C=EC=83=9D=EC=8B=9C=20=EC=98=88?= =?UTF-8?q?=EC=99=B8=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../splash/PokemonIntroViewModel.kt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroViewModel.kt b/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroViewModel.kt index 943fc080..d6e456e8 100644 --- a/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroViewModel.kt +++ b/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroViewModel.kt @@ -1,13 +1,12 @@ package poke.rogue.helper.presentation.splash import androidx.lifecycle.viewModelScope -import kotlinx.coroutines.async -import kotlinx.coroutines.awaitAll import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.delay import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.onStart +import kotlinx.coroutines.launch import kotlinx.coroutines.plus import poke.rogue.helper.analytics.AnalyticsLogger import poke.rogue.helper.data.repository.DexRepository @@ -27,12 +26,16 @@ class PokemonIntroViewModel( refreshEvent .onStart { emit(Unit) } .onEach { - coroutineScope { - val warmUp = async { pokemonRepository.warmUp() } - val delay = async { delay(1000) } - listOf(warmUp, delay).awaitAll() + try { + coroutineScope { + launch { pokemonRepository.warmUp() } + launch { delay(1000) } + } + } catch (e: Exception) { + handlePokemonError(e) + } finally { + _navigationToHomeEvent.emit(Unit) } - _navigationToHomeEvent.emit(Unit) } .launchIn(viewModelScope + errorHandler) } From fcde76507a229de97325efee285dc03ff93ad103 Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 17:38:56 +0900 Subject: [PATCH 06/19] feat: Android Release CD --- .github/workflows/Android_Release_CD.yml | 94 ++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 .github/workflows/Android_Release_CD.yml diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml new file mode 100644 index 00000000..a7960009 --- /dev/null +++ b/.github/workflows/Android_Release_CD.yml @@ -0,0 +1,94 @@ +name: Android PR Builder + +on: + pull_request: + branches: [ an/develop ] + push: + branches: [ an/develop ] + +jobs: + build: + name: PR Checker + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Gradle cache + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + + - name: Create Google-Services.json + env: + GOOGLE_SERVICES_ALPHA: ${{ secrets.GOOGLE_SERVICES_ALPHA }} + GOOGLE_SERVICES_BETA: ${{ secrets.GOOGLE_SERVICES_BETA }} + GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }} + run: | + touch ./app/src/debug/google-services.json + touch ./app/src/alpha/google-services.json + touch ./app/src/beta/google-services.json + mkdir ./app/src/release + touch ./app/src/release/google-services.json + echo $GOOGLE_SERVICES_ALPHA >> ./app/src/debug/google-services.json + echo $GOOGLE_SERVICES_ALPHA >> ./app/src/alpha/google-services.json + echo $GOOGLE_SERVICES_BETA >> ./app/src/beta/google-services.json + echo $GOOGLE_SERVICES >> ./app/src/release/google-services.json + working-directory: android + + - name: Create Local Properties + run: touch local.properties + working-directory: android + + - name: Access Local Properties + env: + POKE_BASE_URL: ${{ secrets.POKE_BASE_URL }} + # POKE_DEV_BASE_URL: ${{ secrets.HOST_RELEASE_URI }} + STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} + KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} + KEY_ALIAS: ${{ secrets.KEY_ALIAS }} + run: | + echo POKE_BASE_URL=\"${{ secrets.POKE_BASE_URL }}\" >> local.properties + echo STORE_PASSWORD= $STORE_PASSWORD >> local.properties + echo KEY_PASSWORD= $KEY_PASSWORD >> local.properties + echo KEY_ALIAS= $KEY_ALIAS >> local.properties + working-directory: android + + - name: Create RELEASE Key Store + env: + KEY_STORE: ${{secrets.RELEASE_KEY_STORE}} + run: | + echo "KEY_STORE" | base64 -d > ./poke_key.jks + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + working-directory: android + + - name: Build Release APK + run: ./gradlew assembleRelease + working-directory: android + + - name: Upload Release Build to Artifacts + uses: actions/upload-artifact@v3 + with: + name: release-artifacts + path: android/app/build/outputs/apk/release/ + if-no-files-found: error + + - name: Create Github Release + uses: softprops/action-gh-release@v1 + with: + generate_release_notes: true + files: | + android/app/build/outputs/apk/release/app-release.apk From bba511545da467209442ff4be36fa6ea9a7c721d Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 17:40:11 +0900 Subject: [PATCH 07/19] =?UTF-8?q?build:=20CD,=20CI=20main=20=EC=97=90=20?= =?UTF-8?q?=EB=8F=8C=EB=A6=AC=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Android_PR_Builder.yml | 4 ++-- .github/workflows/Android_Release_CD.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Android_PR_Builder.yml b/.github/workflows/Android_PR_Builder.yml index bff0c6fd..e482bb19 100644 --- a/.github/workflows/Android_PR_Builder.yml +++ b/.github/workflows/Android_PR_Builder.yml @@ -2,9 +2,9 @@ name: Android PR Builder on: pull_request: - branches: [ an/develop ] + branches: [ an/develop, main ] push: - branches: [ an/develop ] + branches: [ an/develop, main ] jobs: build: diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml index a7960009..625c2a09 100644 --- a/.github/workflows/Android_Release_CD.yml +++ b/.github/workflows/Android_Release_CD.yml @@ -2,9 +2,9 @@ name: Android PR Builder on: pull_request: - branches: [ an/develop ] + branches: [ main ] push: - branches: [ an/develop ] + branches: [ main ] jobs: build: From 8059466129fc2cf724b2c9111a8e2af8f1667f7e Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 17:49:45 +0900 Subject: [PATCH 08/19] =?UTF-8?q?fix:=20=EB=AA=85=EB=A0=B9=EC=96=B4?= =?UTF-8?q?=EC=97=90=20$=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Android_Release_CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml index 625c2a09..2ead3ed9 100644 --- a/.github/workflows/Android_Release_CD.yml +++ b/.github/workflows/Android_Release_CD.yml @@ -69,7 +69,7 @@ jobs: env: KEY_STORE: ${{secrets.RELEASE_KEY_STORE}} run: | - echo "KEY_STORE" | base64 -d > ./poke_key.jks + echo "$KEY_STORE" | base64 -d > ./poke_key.jks - name: Grant execute permission for gradlew run: chmod +x gradlew From 57fc723a86fdcb80fccda86db7300a7d39dbe3e4 Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 17:58:10 +0900 Subject: [PATCH 09/19] =?UTF-8?q?fix:=20keystore=20=EA=B2=BD=EB=A1=9C=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Android_Release_CD.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml index 2ead3ed9..38ed302a 100644 --- a/.github/workflows/Android_Release_CD.yml +++ b/.github/workflows/Android_Release_CD.yml @@ -8,7 +8,7 @@ on: jobs: build: - name: PR Checker + name: CD Release Builder runs-on: ubuntu-latest steps: @@ -69,7 +69,7 @@ jobs: env: KEY_STORE: ${{secrets.RELEASE_KEY_STORE}} run: | - echo "$KEY_STORE" | base64 -d > ./poke_key.jks + echo "$KEY_STORE" | base64 -d > ./keystore/poke_key.jks - name: Grant execute permission for gradlew run: chmod +x gradlew From 1876613e93a324ba2ffecbbf0730a8268149d4a4 Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 18:04:05 +0900 Subject: [PATCH 10/19] =?UTF-8?q?fix:=20work=20directory=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Android_Release_CD.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml index 38ed302a..6500e313 100644 --- a/.github/workflows/Android_Release_CD.yml +++ b/.github/workflows/Android_Release_CD.yml @@ -45,6 +45,7 @@ jobs: echo $GOOGLE_SERVICES_ALPHA >> ./app/src/alpha/google-services.json echo $GOOGLE_SERVICES_BETA >> ./app/src/beta/google-services.json echo $GOOGLE_SERVICES >> ./app/src/release/google-services.json + cat ./app/src/debug/google-services.json working-directory: android - name: Create Local Properties @@ -69,7 +70,9 @@ jobs: env: KEY_STORE: ${{secrets.RELEASE_KEY_STORE}} run: | + touch ./keystore/poke_key.jks echo "$KEY_STORE" | base64 -d > ./keystore/poke_key.jks + working-directory: android - name: Grant execute permission for gradlew run: chmod +x gradlew From 4d712d380441f45123657020da9dc2b7930531ef Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 18:15:40 +0900 Subject: [PATCH 11/19] =?UTF-8?q?build:=20version=20=EC=9C=BC=EB=A1=9C=20t?= =?UTF-8?q?ag=20=EC=83=9D=EC=84=B1=ED=95=B4=EC=84=9C=20release=20=EB=85=B8?= =?UTF-8?q?=ED=8A=B8=20=EB=A7=8C=EB=93=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Android_Release_CD.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml index 6500e313..a42b525d 100644 --- a/.github/workflows/Android_Release_CD.yml +++ b/.github/workflows/Android_Release_CD.yml @@ -88,10 +88,25 @@ jobs: name: release-artifacts path: android/app/build/outputs/apk/release/ if-no-files-found: error + + - name: Extract Version Name + shell: bash + env: + title: ${{ inputs.title }} + run: | + version=$(echo '${{ github.event.pull_request.title }}' | grep -oP '\d+\.\d+\.\d+') + if [ -z "$version" ]; then + echo "No version found in the title." + echo "version=none" >> $GITHUB_ENV + else + echo "version=v$version" >> $GITHUB_ENV + fi - name: Create Github Release uses: softprops/action-gh-release@v1 with: + tag_name: ${{ env.version }} + release_name: ${{ env.version }} generate_release_notes: true files: | - android/app/build/outputs/apk/release/app-release.apk + app/build/outputs/apk/release/app-release.apk From fd91e18c7883e53bdc5c863953a2110e61c21e8a Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 20:05:44 +0900 Subject: [PATCH 12/19] =?UTF-8?q?build:=20Release=20CI,=20CD=20=EB=B6=84?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Android_PR_Builder.yml | 6 +- .github/workflows/Android_Release_CD.yml | 4 +- .github/workflows/Android_Release_CI.yml | 89 ++++++++++++++++++++++++ 3 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/Android_Release_CI.yml diff --git a/.github/workflows/Android_PR_Builder.yml b/.github/workflows/Android_PR_Builder.yml index e482bb19..5987a54a 100644 --- a/.github/workflows/Android_PR_Builder.yml +++ b/.github/workflows/Android_PR_Builder.yml @@ -2,10 +2,10 @@ name: Android PR Builder on: pull_request: - branches: [ an/develop, main ] + branches: [ an/develop ] push: - branches: [ an/develop, main ] - + branches: [ an/develop ] + jobs: build: name: PR Checker diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml index a42b525d..e7d749c8 100644 --- a/.github/workflows/Android_Release_CD.yml +++ b/.github/workflows/Android_Release_CD.yml @@ -1,8 +1,6 @@ name: Android PR Builder on: - pull_request: - branches: [ main ] push: branches: [ main ] @@ -88,7 +86,7 @@ jobs: name: release-artifacts path: android/app/build/outputs/apk/release/ if-no-files-found: error - + - name: Extract Version Name shell: bash env: diff --git a/.github/workflows/Android_Release_CI.yml b/.github/workflows/Android_Release_CI.yml new file mode 100644 index 00000000..909bfea7 --- /dev/null +++ b/.github/workflows/Android_Release_CI.yml @@ -0,0 +1,89 @@ +name: Android PR Builder + +on: + pull_request: + branches: [ main ] + +jobs: + build: + name: CD Release Builder + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Gradle cache + uses: actions/cache@v3 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: 17 + + - name: Create Google-Services.json + env: + GOOGLE_SERVICES_ALPHA: ${{ secrets.GOOGLE_SERVICES_ALPHA }} + GOOGLE_SERVICES_BETA: ${{ secrets.GOOGLE_SERVICES_BETA }} + GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }} + run: | + touch ./app/src/debug/google-services.json + touch ./app/src/alpha/google-services.json + touch ./app/src/beta/google-services.json + mkdir ./app/src/release + touch ./app/src/release/google-services.json + echo $GOOGLE_SERVICES_ALPHA >> ./app/src/debug/google-services.json + echo $GOOGLE_SERVICES_ALPHA >> ./app/src/alpha/google-services.json + echo $GOOGLE_SERVICES_BETA >> ./app/src/beta/google-services.json + echo $GOOGLE_SERVICES >> ./app/src/release/google-services.json + cat ./app/src/debug/google-services.json + working-directory: android + + - name: Create Local Properties + run: touch local.properties + working-directory: android + + - name: Access Local Properties + env: + POKE_BASE_URL: ${{ secrets.POKE_BASE_URL }} + # POKE_DEV_BASE_URL: ${{ secrets.HOST_RELEASE_URI }} + STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }} + KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} + KEY_ALIAS: ${{ secrets.KEY_ALIAS }} + run: | + echo POKE_BASE_URL=\"${{ secrets.POKE_BASE_URL }}\" >> local.properties + echo STORE_PASSWORD= $STORE_PASSWORD >> local.properties + echo KEY_PASSWORD= $KEY_PASSWORD >> local.properties + echo KEY_ALIAS= $KEY_ALIAS >> local.properties + working-directory: android + + - name: Create RELEASE Key Store + env: + KEY_STORE: ${{secrets.RELEASE_KEY_STORE}} + run: | + touch ./keystore/poke_key.jks + echo "$KEY_STORE" | base64 -d > ./keystore/poke_key.jks + working-directory: android + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + working-directory: android + + - name: KT Lint + run: ./gradlew ktlintCheck + working-directory: android + + - name: Unit Test Release + run: ./gradlew testReleaseUnitTest + working-directory: android + + - name: Build Release APK + run: ./gradlew assembleRelease + working-directory: android From 3783a1d9860eb73f2fd586568fa31d6b52caf1b7 Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 20:22:14 +0900 Subject: [PATCH 13/19] =?UTF-8?q?build:=20PR=20closed=20=EB=90=A0=EB=95=8C?= =?UTF-8?q?=20=EB=A8=B8=EC=A7=80=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Android_Release_CD.yml | 5 ++++- .github/workflows/Android_Release_CI.yml | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml index e7d749c8..b2d290ba 100644 --- a/.github/workflows/Android_Release_CD.yml +++ b/.github/workflows/Android_Release_CD.yml @@ -2,7 +2,7 @@ name: Android PR Builder on: push: - branches: [ main ] + branches: [ "an/release*" ] jobs: build: @@ -12,6 +12,9 @@ jobs: steps: - uses: actions/checkout@v4 + - name: show github pull request + run: echo ${{ github.event.pull_request.title }} + - name: Gradle cache uses: actions/cache@v3 with: diff --git a/.github/workflows/Android_Release_CI.yml b/.github/workflows/Android_Release_CI.yml index 909bfea7..a7049d8b 100644 --- a/.github/workflows/Android_Release_CI.yml +++ b/.github/workflows/Android_Release_CI.yml @@ -1,8 +1,8 @@ name: Android PR Builder on: - pull_request: - branches: [ main ] + push: + branches: [ "an/release*" ] jobs: build: From a64f7cc7077b26a8a16186faac9f8f4f6b7acfce Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 20:51:43 +0900 Subject: [PATCH 14/19] =?UTF-8?q?fix:=20=EB=B8=8C=EB=9E=9C=EC=B9=98=20?= =?UTF-8?q?=EC=9D=B4=EB=A6=84=EC=9C=BC=EB=A1=9C=20=EB=B2=84=EC=A0=84=20?= =?UTF-8?q?=EC=B6=94=EC=B6=9C=ED=95=98=EB=8F=84=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Android_Release_CD.yml | 13 ++++++------- .github/workflows/Android_Release_CI.yml | 3 +-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml index b2d290ba..8671ab1e 100644 --- a/.github/workflows/Android_Release_CD.yml +++ b/.github/workflows/Android_Release_CD.yml @@ -90,17 +90,16 @@ jobs: path: android/app/build/outputs/apk/release/ if-no-files-found: error - - name: Extract Version Name + - name: Extract Version Name from Branch shell: bash - env: - title: ${{ inputs.title }} run: | - version=$(echo '${{ github.event.pull_request.title }}' | grep -oP '\d+\.\d+\.\d+') + branch_name=$(echo "${{ github.ref_name }}" | sed 's:.*/::') + version=$(echo "$branch_name" | grep -oP '\d+\.\d+\.\d+') if [ -z "$version" ]; then - echo "No version found in the title." - echo "version=none" >> $GITHUB_ENV + echo "No version found in branch name." + echo "version=none" >> $GITHUB_ENV else - echo "version=v$version" >> $GITHUB_ENV + echo "version=v$version" >> $GITHUB_ENV fi - name: Create Github Release diff --git a/.github/workflows/Android_Release_CI.yml b/.github/workflows/Android_Release_CI.yml index a7049d8b..562b9033 100644 --- a/.github/workflows/Android_Release_CI.yml +++ b/.github/workflows/Android_Release_CI.yml @@ -3,10 +3,9 @@ name: Android PR Builder on: push: branches: [ "an/release*" ] - jobs: build: - name: CD Release Builder + name: CI Release Builder runs-on: ubuntu-latest steps: From e1019fbd172dde6b34165825dc3888534896255f Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 20:58:56 +0900 Subject: [PATCH 15/19] add release folder --- .github/workflows/Android_Release_CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml index 8671ab1e..9988cc3e 100644 --- a/.github/workflows/Android_Release_CD.yml +++ b/.github/workflows/Android_Release_CD.yml @@ -109,4 +109,4 @@ jobs: release_name: ${{ env.version }} generate_release_notes: true files: | - app/build/outputs/apk/release/app-release.apk + android/app/build/outputs/apk/release/app-release.apk From 5a3132c1116119490d2a813098df056e3dcb9a05 Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 21:25:37 +0900 Subject: [PATCH 16/19] =?UTF-8?q?tag=5Fname,=20release=5Fname=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=ED=95=B4=EB=B3=B4=EC=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Android_Release_CD.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml index 9988cc3e..e3421fc4 100644 --- a/.github/workflows/Android_Release_CD.yml +++ b/.github/workflows/Android_Release_CD.yml @@ -105,8 +105,6 @@ jobs: - name: Create Github Release uses: softprops/action-gh-release@v1 with: - tag_name: ${{ env.version }} - release_name: ${{ env.version }} generate_release_notes: true files: | android/app/build/outputs/apk/release/app-release.apk From 13476c3596ddfba3ff8cc23d49922804c429a042 Mon Sep 17 00:00:00 2001 From: murjune Date: Tue, 22 Oct 2024 21:45:39 +0900 Subject: [PATCH 17/19] =?UTF-8?q?tag=20=EC=9D=BC=EB=95=8C=EB=A7=8C=20?= =?UTF-8?q?=EB=8F=99=EC=9E=91=ED=95=98=EB=8F=84=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/Android_Release_CD.yml | 25 ++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/Android_Release_CD.yml b/.github/workflows/Android_Release_CD.yml index e3421fc4..4e7a4e10 100644 --- a/.github/workflows/Android_Release_CD.yml +++ b/.github/workflows/Android_Release_CD.yml @@ -2,7 +2,8 @@ name: Android PR Builder on: push: - branches: [ "an/release*" ] + tags: + - "v*.*.*" jobs: build: @@ -90,17 +91,17 @@ jobs: path: android/app/build/outputs/apk/release/ if-no-files-found: error - - name: Extract Version Name from Branch - shell: bash - run: | - branch_name=$(echo "${{ github.ref_name }}" | sed 's:.*/::') - version=$(echo "$branch_name" | grep -oP '\d+\.\d+\.\d+') - if [ -z "$version" ]; then - echo "No version found in branch name." - echo "version=none" >> $GITHUB_ENV - else - echo "version=v$version" >> $GITHUB_ENV - fi +# - name: Extract Version Name from Branch +# shell: bash +# run: | +# branch_name=$(echo "${{ github.ref_name }}" | sed 's:.*/::') +# version=$(echo "$branch_name" | grep -oP '\d+\.\d+\.\d+') +# if [ -z "$version" ]; then +# echo "No version found in branch name." +# echo "version=none" >> $GITHUB_ENV +# else +# echo "version=v$version" >> $GITHUB_ENV +# fi - name: Create Github Release uses: softprops/action-gh-release@v1 From aa7490226920a0fef4fc438a9dc1a2c7ae3ea035 Mon Sep 17 00:00:00 2001 From: murjune Date: Wed, 23 Oct 2024 13:37:19 +0900 Subject: [PATCH 18/19] style ktformat --- .../rogue/helper/presentation/splash/PokemonIntroViewModel.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroViewModel.kt b/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroViewModel.kt index 9c9cc67b..250400d9 100644 --- a/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroViewModel.kt +++ b/android/app/src/main/java/poke/rogue/helper/presentation/splash/PokemonIntroViewModel.kt @@ -15,7 +15,6 @@ import poke.rogue.helper.presentation.base.BaseViewModelFactory import poke.rogue.helper.presentation.base.error.ErrorHandleViewModel import poke.rogue.helper.presentation.util.event.MutableEventFlow import poke.rogue.helper.presentation.util.event.asEventFlow -import timber.log.Timber class PokemonIntroViewModel( private val pokemonRepository: DexRepository, From ab383345ed34b6fbcd32c986f73c152656239934 Mon Sep 17 00:00:00 2001 From: murjune Date: Wed, 23 Oct 2024 13:41:38 +0900 Subject: [PATCH 19/19] =?UTF-8?q?feat:=20dataBase=20Drop=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/poke/rogue/helper/local/dao/PokemonDao.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/android/local/src/main/java/poke/rogue/helper/local/dao/PokemonDao.kt b/android/local/src/main/java/poke/rogue/helper/local/dao/PokemonDao.kt index 86bc8c6f..2133677e 100644 --- a/android/local/src/main/java/poke/rogue/helper/local/dao/PokemonDao.kt +++ b/android/local/src/main/java/poke/rogue/helper/local/dao/PokemonDao.kt @@ -21,8 +21,6 @@ interface PokemonDao { companion object { fun instance(context: Context): PokemonDao { - // TODO 삭제될 블록 - PokeRogueDatabase.dropDatabase(context) return PokeRogueDatabase.instance(context).pokemonDao() } }