Skip to content

Commit

Permalink
πŸ”€ :: (#477) ci google services 생성 νƒœμŠ€ν¬ μΆ”κ°€
Browse files Browse the repository at this point in the history
πŸ”€ :: (#477) ci google services 생성 νƒœμŠ€ν¬ μΆ”κ°€
  • Loading branch information
JunJaBoy authored Oct 5, 2023
2 parents 17f70c7 + 8faa0b3 commit fdc4566
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 30 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
echo $DEV_BASE_URL >> ./local.properties
cat
env:
PROD_BASE_URL: ${{secrets.PROD_BASE_URL}}
DEV_BASE_URL: ${{secrets.DEV_BASE_URL}}
PROD_BASE_URL: ${{secrets.PROD_BASE_URL}}
DEV_BASE_URL: ${{secrets.DEV_BASE_URL}}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generate local.properties
Expand All @@ -35,8 +35,11 @@ jobs:
echo $DEV_BASE_URL >> ./local.properties
cat
env:
PROD_BASE_URL: ${{secrets.PROD_BASE_URL}}
DEV_BASE_URL: ${{secrets.DEV_BASE_URL}}
PROD_BASE_URL: ${{secrets.PROD_BASE_URL}}
DEV_BASE_URL: ${{secrets.DEV_BASE_URL}}
- name: Generate google-services.json
run: |
echo '${{secrets.GOOGLE_SERVICES}}' > ./presentation/google-services.json
- name: Build with Gradle
run: ./gradlew build
- name: Run test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,41 @@ import android.app.NotificationChannelGroup
import android.app.NotificationManager
import android.content.Context
import android.os.Build
import team.aliens.presentation.BuildConfig
import androidx.annotation.RequiresApi
import team.aliens.presentation.R

// todo λ‚΄λΆ€ ν•¨μˆ˜ 뢄리 ν•„μš”
@RequiresApi(Build.VERSION_CODES.O)
internal fun Application.initNotification() {
val notificationManager =
getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager

if (BuildConfig.VERSION_CODE >= Build.VERSION_CODES.O) {
val groupId = getString(R.string.notification_group_notice_id)
val groupName = getString(R.string.notification_group_notice_title)
val groupId = getString(R.string.notification_group_notice_id)
val groupName = getString(R.string.notification_group_notice_title)

val notificationChannelGroup = NotificationChannelGroup(
groupId,
groupName,
)
val notificationChannelGroup = NotificationChannelGroup(
groupId,
groupName,
)

val channelId = getString(R.string.notification_channel_id)
val channelName = getString(R.string.notification_channel_notice_title)
val channelDescription = getString(R.string.notification_channel_notice_description)
val importance = NotificationManager.IMPORTANCE_DEFAULT
val channelId = getString(R.string.notification_channel_id)
val channelName = getString(R.string.notification_channel_notice_title)
val channelDescription = getString(R.string.notification_channel_notice_description)
val importance = NotificationManager.IMPORTANCE_DEFAULT

val notificationChannel = NotificationChannel(
channelId,
channelName,
importance,
).apply {
description = channelDescription
lightColor = getColor(R.color.primary)
enableLights(true)
group = groupId
}
val notificationChannel = NotificationChannel(
channelId,
channelName,
importance,
).apply {
description = channelDescription
lightColor = getColor(R.color.primary)
enableLights(true)
group = groupId
}

notificationManager.run {
createNotificationChannelGroup(notificationChannelGroup)
createNotificationChannel(notificationChannel)
}
notificationManager.run {
createNotificationChannelGroup(notificationChannelGroup)
createNotificationChannel(notificationChannel)
}
}

0 comments on commit fdc4566

Please sign in to comment.