-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from eshc123/dev
[RELEASE] test release
- Loading branch information
Showing
58 changed files
with
1,448 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: Feature Template | ||
about: Suggest an idea for this project | ||
title: "[FEATURE]" | ||
labels: feature | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Feature | ||
|
||
|
||
### ToDo | ||
- [ ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Android CD | ||
|
||
on: | ||
push: | ||
branches: | ||
- release | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
environment: Android CI/CD | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: gradle | ||
|
||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3 | ||
|
||
- name: Cache Gradle packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', '**/buildSrc/**/*.kt') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Access BASE_URL | ||
env: | ||
GNR_BASE_URL: ${{ secrets.GNR_BASE_URL }} | ||
run: echo GNR_BASE_URL=\"$GNR_BASE_URL\" > ./local.properties | ||
|
||
- name: Generate Debug Keystore file from Github Secrets | ||
run: | | ||
mkdir ./app/keystore | ||
echo "$KEYSTORE" > ./app/keystore/debug_keystore.b64 | ||
base64 -d -i ./app/keystore/debug_keystore.b64 > ./app/keystore/debug.keystore | ||
env: | ||
KEYSTORE: ${{ secrets.DEBUG_KEYSTORE_BASE64 }} | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew assembleDebug | ||
|
||
- name: Send APK to Slack | ||
uses: MeilCli/slack-upload-file@v1 | ||
with: | ||
slack_token: ${{ secrets.SLACK_BOT_TOKEN }} | ||
file_path: ./app/build/outputs/apk/debug/app-debug.apk | ||
channels: release-android | ||
file_name: debug_apk.apk | ||
file_type: apk | ||
initial_comment: ${{ github.event.head_commit.message }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
core/data/src/main/java/com/eshc/goonersapp/core/data/fake/FakeMatchRepositoryImpl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package com.eshc.goonersapp.core.data.fake | ||
|
||
import com.eshc.goonersapp.core.data.mapper.toDataResult | ||
import com.eshc.goonersapp.core.data.mapper.toModel | ||
import com.eshc.goonersapp.core.domain.model.DataResult | ||
import com.eshc.goonersapp.core.domain.model.match.Match | ||
import com.eshc.goonersapp.core.domain.model.match.MatchInformation | ||
import com.eshc.goonersapp.core.domain.model.match.MatchRecently | ||
import com.eshc.goonersapp.core.domain.model.match.MatchUpcoming | ||
import com.eshc.goonersapp.core.domain.repository.MatchRepository | ||
import com.eshc.goonersapp.core.network.fake.FakeMatchDataSource | ||
import kotlinx.coroutines.flow.Flow | ||
import kotlinx.coroutines.flow.flow | ||
import javax.inject.Inject | ||
|
||
class FakeMatchRepositoryImpl @Inject constructor( | ||
private val fakeMatchDataSource: FakeMatchDataSource | ||
) : MatchRepository { | ||
|
||
override fun getMatch(match: Int): Flow<DataResult<Match>> = flow { | ||
val result = fakeMatchDataSource | ||
.getMatch(match) | ||
.toDataResult { remote -> remote.match.toModel() } | ||
|
||
emit(result) | ||
} | ||
|
||
override fun getMatchInformation( | ||
match: Int, | ||
season: Int, | ||
opponent: Int, | ||
): Flow<DataResult<MatchInformation>> = flow { | ||
val result = fakeMatchDataSource | ||
.getMatchInformation( | ||
matchId = match, | ||
seasonId = season, | ||
opponentId = opponent | ||
).toDataResult { remote -> remote.toModel() } | ||
|
||
emit(result) | ||
} | ||
|
||
override fun getMatchesBySeason(season: String): Flow<DataResult<List<Match>>> = flow { | ||
val result = fakeMatchDataSource | ||
.getMatchesBySeason(seasonId = season.toInt()) | ||
.toDataResult { remote -> remote.map { response -> response.toModel() } } | ||
|
||
emit(result) | ||
} | ||
|
||
override fun getUpcomingMatches(): Flow<DataResult<List<MatchUpcoming>>> = flow { | ||
val result = fakeMatchDataSource | ||
.getUpcomingMatches() | ||
.toDataResult { remote -> remote.map { response -> response.toModel() } } | ||
|
||
emit(result) | ||
} | ||
|
||
override fun getRecentlyMatch(): Flow<DataResult<MatchRecently>> = flow { | ||
val result = fakeMatchDataSource | ||
.getRecentlyMatch() | ||
.toDataResult { remote -> remote.toModel() } | ||
|
||
emit(result) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.