-
Notifications
You must be signed in to change notification settings - Fork 5
[Week7] Database Jamie #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: jamie
Are you sure you want to change the base?
Changes from all commits
5b817c0
d2d49d9
2bfa87a
d57b16c
cbc7b96
2f4e6ca
c08df4f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| *.iml | ||
| .gradle | ||
| /local.properties | ||
| /.idea/caches | ||
| /.idea/libraries | ||
| /.idea/modules.xml | ||
| /.idea/workspace.xml | ||
| /.idea/navEditor.xml | ||
| /.idea/assetWizardSettings.xml | ||
| .DS_Store | ||
| /build | ||
| /captures | ||
| .externalNativeBuild | ||
| .cxx | ||
| local.properties |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /build |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| plugins { | ||
| alias(libs.plugins.android.application) | ||
| alias(libs.plugins.kotlin.android) | ||
| id("kotlin-kapt") | ||
| } | ||
|
|
||
| android { | ||
| namespace = "com.example.flo_clone" | ||
| compileSdk = 35 | ||
|
|
||
| defaultConfig { | ||
| applicationId = "com.example.flo_clone" | ||
| minSdk = 21 | ||
| targetSdk = 35 | ||
| versionCode = 1 | ||
| versionName = "1.0" | ||
|
|
||
| testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
| } | ||
|
|
||
| buildTypes { | ||
| release { | ||
| isMinifyEnabled = false | ||
| proguardFiles( | ||
| getDefaultProguardFile("proguard-android-optimize.txt"), | ||
| "proguard-rules.pro" | ||
| ) | ||
| } | ||
| } | ||
| compileOptions { | ||
| sourceCompatibility = JavaVersion.VERSION_1_8 | ||
| targetCompatibility = JavaVersion.VERSION_1_8 | ||
| } | ||
| kotlinOptions { | ||
| jvmTarget = "1.8" | ||
| } | ||
| buildFeatures { | ||
| viewBinding = true | ||
| } | ||
| } | ||
|
|
||
| dependencies { | ||
| implementation(libs.androidx.core.ktx) | ||
| implementation(libs.androidx.appcompat) | ||
| implementation(libs.material) | ||
| implementation(libs.androidx.constraintlayout) | ||
| implementation(libs.androidx.lifecycle.livedata.ktx) | ||
| implementation(libs.androidx.lifecycle.viewmodel.ktx) | ||
| implementation(libs.androidx.navigation.fragment.ktx) | ||
| implementation(libs.androidx.navigation.ui.ktx) | ||
| implementation(libs.gson) | ||
| implementation(libs.androidx.media3.common.ktx) | ||
| testImplementation(libs.junit) | ||
| androidTestImplementation(libs.androidx.junit) | ||
| androidTestImplementation(libs.androidx.espresso.core) | ||
|
|
||
| implementation(libs.androidx.room.ktx) | ||
| implementation(libs.androidx.room.runtime) | ||
| kapt(libs.androidx.room.compiler) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # Add project specific ProGuard rules here. | ||
| # You can control the set of applied configuration files using the | ||
| # proguardFiles setting in build.gradle. | ||
| # | ||
| # For more details, see | ||
| # http://developer.android.com/guide/developing/tools/proguard.html | ||
|
|
||
| # If your project uses WebView with JS, uncomment the following | ||
| # and specify the fully qualified class name to the JavaScript interface | ||
| # class: | ||
| #-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
| # public *; | ||
| #} | ||
|
|
||
| # Uncomment this to preserve the line number information for | ||
| # debugging stack traces. | ||
| #-keepattributes SourceFile,LineNumberTable | ||
|
|
||
| # If you keep the line number information, uncomment this to | ||
| # hide the original source file name. | ||
| #-renamesourcefileattribute SourceFile |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| package com.example.flo_clone | ||
|
|
||
| import androidx.test.platform.app.InstrumentationRegistry | ||
| import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
|
|
||
| import org.junit.Test | ||
| import org.junit.runner.RunWith | ||
|
|
||
| import org.junit.Assert.* | ||
|
|
||
| /** | ||
| * Instrumented test, which will execute on an Android device. | ||
| * | ||
| * See [testing documentation](http://d.android.com/tools/testing). | ||
| */ | ||
| @RunWith(AndroidJUnit4::class) | ||
| class ExampleInstrumentedTest { | ||
| @Test | ||
| fun useAppContext() { | ||
| // Context of the app under test. | ||
| val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
| assertEquals("com.example.flo_clone", appContext.packageName) | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| xmlns:tools="http://schemas.android.com/tools"> | ||
|
|
||
| <application | ||
| android:allowBackup="true" | ||
| android:dataExtractionRules="@xml/data_extraction_rules" | ||
| android:fullBackupContent="@xml/backup_rules" | ||
| android:icon="@mipmap/ic_launcher" | ||
| android:label="@string/app_name" | ||
| android:roundIcon="@mipmap/ic_launcher_round" | ||
| android:supportsRtl="true" | ||
| android:theme="@style/Theme.FLOclone" | ||
| tools:targetApi="31"> | ||
| <activity | ||
| android:name=".MainActivity" | ||
| android:exported="true" | ||
| android:label="@string/app_name"> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.MAIN" /> | ||
|
|
||
| <category android:name="android.intent.category.LAUNCHER" /> | ||
| </intent-filter> | ||
| </activity> | ||
|
|
||
| <activity | ||
| android:name=".SongActivity" | ||
| android:exported="true" /> | ||
| </application> | ||
|
|
||
| </manifest> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| package com.example.flo_clone | ||
|
|
||
| class Album ( | ||
| var title: String? = "", | ||
| var singer: String? ="", | ||
| var coverImg: Int? = null, | ||
| var songs: ArrayList<Song>? = null //์๋ก๊ณก ์๋ฏธ, ๊ฐ์์์๋ ์ฌ์ฉํ์ง ์์ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์จ๋ฒ์ ์ํ๋ ๋ ธ๋๋ฅผ ์ด๋ ๊ฒ ์ ์ฅํ๊ฒ ๋ ๊ฒฝ์ฐ Song ํ ์ด๋ธ์ ์ ๋ณด๊ฐ ๋ฐ๋์์ ๋ Album ์์ ์๋ก๊ณก ์ ๋ณด๋ฅผ ๋ฐ๋ก ์์ ํด์ค์ผ ํ๋ค๋ ๋ฒ๊ฑฐ๋ก์์ด ์๊ธธ ๊ฒ ๊ฐ์์! ์๋ก ๋ค๋ฅธ ํ ์ด๋ธ ๊ฐ ์ฐ๊ด๊ด๊ณ๊ฐ ์์ ๋๋ ์ธ๋ํค๋ ๋งคํ ํ ์ด๋ธ์ ๋๋ ๋ฐฉ์์ ์๊ฐํด๋ณผ ์ ์์ต๋๋ค. Album๊ณผ Song์ ์ฐ๊ฒฐํด์ค ๋ ๋ ํ ์ด๋ธ์ ๊ด๊ณ์ฑ์ ๋ด์ผ ํ๋๋ฐ
์ ์ํฉ์ ๊ณ ๋ คํด๋ณด๊ณ ํ์ฌ ๊ตฌํํ๋ ค๊ณ ํ๋ ์ฑ์์๋ ์ด๋ป๊ฒ ์ค๊ณํ๋ฉด ์ข์์ง ์๊ฐํด๋ณด์๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! |
||
| ) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๋ง ๊ฐ์์์ kapt๋ฅผ ์ฌ์ฉํ์ฌ ์ด๋ ธํ ์ด์ ์ฒ๋ฆฌํ๋ ๊ธฐ๋ฅ์ ์ถ๊ฐํด์ฃผ์๋ ๊ฒ ๊ฐ์๋ฐ kapt์ ๊ฒฝ์ฐ ๊ธฐ์กด ์ฝํ๋ฆฐ ์ธ์ด๋ฅผ java ์ธ์ด๋ก ๋ณํํ์ฌ java ๊ธฐ๋ฐ์ annotation processor๋ฅผ ์ด์ฉํ๋ ๋ฐฉ์์ด๋ค๋ณด๋ ์๋๊ฐ ๋๋ ค์ ธ ์ต๊ทผ์ ksp๋ผ๊ณ ์ฝํ๋ฆฐ ์์ฒด์์ ์ฝ๋๋ฅผ ๋ถ์ํ๋ ํด์ด ๋์์ด์! ์๋ ๊ด๋ จ ๋งํฌ ํ๋ฒ ๋ด๋ณด์๋ฉด ์ข์ ๊ฒ ๊ฐ์ ์ฝ๋ฉํธ ๋จ๊น๋๋ค.
kapt์์ KSP๋ก ์ด์