Skip to content

Commit

Permalink
✨ 오픈소스 라이센스 목록 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-j0y committed Nov 17, 2024
1 parent 1bb342e commit 92cacac
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
id("org.jetbrains.kotlin.android")
id("kotlin-kapt")
id("com.google.firebase.crashlytics")
id("com.google.android.gms.oss-licenses-plugin")
}

android {
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
android:theme="@style/AppTheme" />
<activity
android:name="com.google.android.gms.oss.licenses.OssLicensesActivity"
android:theme="@style/AppTheme" />
<service
android:name="androidx.work.impl.foreground.SystemForegroundService"
android:foregroundServiceType="location"
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/values/style.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:statusBarColor">@android:color/white</item>
<item name="android:windowLightStatusBar">true</item>
</style>
</resources>
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.google.android.gms:oss-licenses-plugin:0.10.6")
}
}

plugins {
id("com.android.application") version "7.4.2" apply false
id("com.android.library") version "7.4.2" apply false
Expand Down
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ android-material = "1.8.0"
junit = "4.13.2"
androidx-test-junit = "1.1.5"
espresso-core = "3.5.1"
play-services-oss-licenses = "17.1.0"

[libraries]
androidx-navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version.ref = "androidx-navigation" }
Expand All @@ -34,6 +35,7 @@ hilt = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
hilt-complier = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" }

javax-inject = { module = "javax.inject:javax.inject", version.ref = "javax-inject" }
play-services-oss-licenses = { group = "com.google.android.gms", name = "play-services-oss-licenses", version.ref = "play-services-oss-licenses" }

[bundles]
navigation = ["androidx-navigation-fragment-ktx", "androidx-navigation-ui-ktx", "androidx-navigation-dynamic-features-fragment"]
Expand Down
1 change: 1 addition & 0 deletions presentation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ dependencies {
implementation(project(":domain"))

implementation(libs.bundles.android.base)
implementation(libs.play.services.oss.licenses)

val composeBom = platform("androidx.compose:compose-bom:2024.05.00")
implementation(composeBom)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.core.content.ContextCompat.getString
import androidx.navigation.NavHostController
import coil.compose.AsyncImage
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
import com.whyranoid.presentation.R
import com.whyranoid.presentation.reusable.MenuItem
import com.whyranoid.presentation.screens.Screen
Expand Down Expand Up @@ -195,10 +197,15 @@ fun SettingsList(
},
)

OssLicensesMenuActivity.setActivityTitle(getString(context, R.string.open_source_license))
val ossLicensesIntent = Intent(context, OssLicensesMenuActivity::class.java)

MenuItem(
text = R.string.license,
icon = R.drawable.ic_info,
onClick = { },
onClick = {
context.startActivity(ossLicensesIntent)
},
)

MenuItem(
Expand Down
1 change: 1 addition & 0 deletions presentation/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
<string name="customer_service_email_title">사용자 문의 사항</string>
<string name="customer_service_email_content">문제가 발생한 화면을 함께 첨부해주시면 더욱 빠른 처리가 가능합니다. 저희 서비스를 이용해주셔서 감사합니다.</string>
<string name="customer_service_email_chooser">이메일 앱을 선택해주세요</string>
<string name="open_source_license">오픈소스 라이센스</string>

</resources>

0 comments on commit 92cacac

Please sign in to comment.