diff --git a/app/build.gradle.kts b/app/build.gradle.kts index cc35c6cb..017d9253 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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 { diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index cec7c47f..0b6a35bb 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -33,6 +33,12 @@ + + + + + \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 42c7e3c3..ae0f17bd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -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 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 331d51f4..87f9d9a5 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -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" } @@ -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"] diff --git a/presentation/build.gradle.kts b/presentation/build.gradle.kts index 701595be..4fac0651 100644 --- a/presentation/build.gradle.kts +++ b/presentation/build.gradle.kts @@ -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) diff --git a/presentation/src/main/java/com/whyranoid/presentation/screens/setting/SettingScreen.kt b/presentation/src/main/java/com/whyranoid/presentation/screens/setting/SettingScreen.kt index c5d2a6d5..66effc2e 100644 --- a/presentation/src/main/java/com/whyranoid/presentation/screens/setting/SettingScreen.kt +++ b/presentation/src/main/java/com/whyranoid/presentation/screens/setting/SettingScreen.kt @@ -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 @@ -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( diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index 5caacd3e..f37c9213 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -22,5 +22,6 @@ 사용자 문의 사항 문제가 발생한 화면을 함께 첨부해주시면 더욱 빠른 처리가 가능합니다. 저희 서비스를 이용해주셔서 감사합니다. 이메일 앱을 선택해주세요 + 오픈소스 라이센스 \ No newline at end of file