Skip to content

Commit d7806f6

Browse files
committed
[Feat] 오픈소스 라이센스 표기 (#244)
* modify: change to alias * add: oss licenses ing * add: oss licenses * chore: string [no ci]
1 parent cb42cd7 commit d7806f6

File tree

8 files changed

+67
-9
lines changed

8 files changed

+67
-9
lines changed

app/build.gradle.kts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import java.util.Properties
22

33
plugins {
4-
id("com.android.application")
5-
id("org.jetbrains.kotlin.android")
4+
alias(libs.plugins.android.application)
5+
alias(libs.plugins.kotlin.android)
6+
alias(libs.plugins.google.services)
7+
alias(libs.plugins.firebase.crashlytics)
8+
alias(libs.plugins.hilt.android)
69
id("kotlin-parcelize")
7-
id("com.google.gms.google-services")
8-
id("com.google.firebase.crashlytics")
910
id("kotlin-android")
1011
id("kotlin-kapt")
11-
id("dagger.hilt.android.plugin")
12+
id("com.google.android.gms.oss-licenses-plugin")
1213
}
1314

1415
android {
@@ -54,6 +55,7 @@ android {
5455

5556
debug {
5657
// applicationIdSuffix = ".debug"
58+
// isDebuggable = false
5759

5860
val p = Properties()
5961
p.load(project.rootProject.file("local.properties").reader())
@@ -150,6 +152,9 @@ dependencies {
150152

151153
// Timber for logging
152154
implementation(libs.timber)
155+
156+
// OSS
157+
implementation(libs.oss.licenses)
153158
}
154159

155160
kapt {

app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
android:theme="@style/Theme.EatSSUAndroid"
4242
android:usesCleartextTraffic="true"
4343
tools:targetApi="31">
44-
44+
<meta-data
45+
android:name="com.google.android.gms.oss.licenses.enabled"
46+
android:value="true" />
4547
<receiver
4648
android:name=".alarm.NotificationReceiver"
4749
android:enabled="true"

app/src/main/java/com/eatssu/android/presentation/mypage/MyPageActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import com.eatssu.android.presentation.mypage.myreview.MyReviewListActivity
2626
import com.eatssu.android.presentation.mypage.terms.WebViewActivity
2727
import com.eatssu.android.presentation.mypage.usernamechange.UserNameChangeActivity
2828
import com.eatssu.android.presentation.util.showToast
29+
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity
2930
import com.eatssu.android.presentation.util.startActivity
3031
import com.google.android.material.snackbar.Snackbar
3132
import dagger.hilt.android.AndroidEntryPoint
@@ -124,6 +125,10 @@ class MyPageActivity : BaseActivity<ActivityMyPageBinding>(ActivityMyPageBinding
124125
startActivity<DeveloperActivity>()
125126
}
126127

128+
binding.llOss.setOnClickListener {
129+
startActivity<OssLicensesMenuActivity>()
130+
}
131+
127132
binding.llAppVersion.setOnClickListener {
128133
moveToPlayStore()
129134
}

app/src/main/res/layout/activity_my_page.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,41 @@
312312
app:tint="@color/gray300" />
313313
</LinearLayout>
314314

315+
<!-- 오픈소스 라이브러리 -->
316+
<LinearLayout
317+
android:id="@+id/ll_oss"
318+
android:layout_width="match_parent"
319+
android:layout_height="match_parent"
320+
android:background="?android:attr/selectableItemBackground"
321+
android:orientation="horizontal"
322+
android:paddingStart="24dp"
323+
android:paddingTop="18dp"
324+
android:paddingEnd="24dp"
325+
android:paddingBottom="18dp">
326+
327+
<TextView
328+
style="@style/Body1"
329+
android:layout_width="wrap_content"
330+
android:layout_height="wrap_content"
331+
android:text="@string/oss_licenses"
332+
android:textColor="@color/black" />
333+
334+
<android.widget.Space
335+
android:layout_width="0dp"
336+
android:layout_height="0dp"
337+
android:layout_weight="1" />
338+
339+
<ImageButton
340+
android:id="@+id/btn_oss"
341+
android:layout_width="18dp"
342+
android:layout_height="18dp"
343+
android:layout_gravity="center"
344+
android:background="@android:color/transparent"
345+
android:scaleType="fitCenter"
346+
android:src="@drawable/ic_arrow_right"
347+
app:tint="@color/gray300" />
348+
</LinearLayout>
349+
315350
<!-- 탈퇴하기 -->
316351
<TextView
317352
android:id="@+id/tv_logout"

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,6 @@
167167
<string name="policy_url">https://github.com/EAT-SSU/Docs/wiki/EAT%E2%80%90SSU-%EA%B0%9C%EC%9D%B8%EC%A0%95%EB%B3%B4%EC%B2%98%EB%A6%AC%EB%B0%A9%EC%B9%A8</string>
168168
<string name="terms_url">https://github.com/EAT-SSU/Docs/wiki/EAT%E2%80%90SSU-%EC%84%9C%EB%B9%84%EC%8A%A4-%EC%9D%B4%EC%9A%A9%EC%95%BD%EA%B4%80</string>
169169
<string name="kakao_talk_channel_url">http://pf.kakao.com/_ZlVAn</string>
170+
171+
<string name="oss_licenses">오픈소스 라이브러리</string>
170172
</resources>

build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@ plugins {
77
alias(libs.plugins.firebase.crashlytics) apply false
88
alias(libs.plugins.hilt.android) apply false
99
}
10+
11+
buildscript {
12+
dependencies {
13+
classpath(libs.oss.licenses.plugin)
14+
}
15+
}

gradle/libs.versions.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ firebase-crashlytics = "2.9.9"
3333
timber = "5.0.1"
3434
google-services = "4.4.2"
3535
kotlin-android = "1.8.10"
36+
ossLicenses = "17.1.0"
37+
ossLicensesPlugin = "0.10.4"
3638

3739
[libraries]
3840
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidx-core" }
@@ -81,6 +83,9 @@ firebase-analytics = { module = "com.google.firebase:firebase-analytics" }
8183
firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics" }
8284

8385
timber = { group = "com.jakewharton.timber", name = "timber", version.ref = "timber" }
86+
oss-licenses = { group = "com.google.android.gms", name = "play-services-oss-licenses", version.ref = "ossLicenses" }
87+
oss-licenses-plugin = { group = "com.google.android.gms", name = "oss-licenses-plugin", version.ref = "ossLicensesPlugin" }
88+
8489

8590

8691

@@ -90,4 +95,4 @@ android-library = { id = "com.android.library", version.ref = "android" }
9095
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin-android" }
9196
google-services = { id = "com.google.gms.google-services", version.ref = "google-services" }
9297
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebase-crashlytics" }
93-
hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
98+
hilt-android = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }

settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ pluginManagement {
44
google()
55
mavenCentral()
66
maven { url='https://jitpack.io'}
7-
// maven { url 'https://devrepo.kakao.com/nexus/content/groups/public/' }
8-
97
}
108
}
119
dependencyResolutionManagement {

0 commit comments

Comments
 (0)