From 97ab905536cfead018e221ec6f3e22a578743a71 Mon Sep 17 00:00:00 2001 From: jinukeu Date: Fri, 17 Nov 2023 17:43:16 +0900 Subject: [PATCH 1/6] =?UTF-8?q?refactor:=20local:timetable=20-=20viewer,?= =?UTF-8?q?=20editor=20=ED=95=98=EB=82=98=EB=A1=9C=20=ED=86=B5=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app-compose/build.gradle.kts | 3 +-- local/timetable/{editor => }/.gitignore | 0 local/timetable/{editor => }/build.gradle.kts | 3 ++- .../timetable/{editor => }/consumer-rules.pro | 0 .../editor/ExampleInstrumentedTest.kt | 22 ------------------ .../editor/di/LocalDataSourceModule.kt | 20 ---------------- .../timetable/editor/ExampleUnitTest.kt | 16 ------------- .../timetable/{editor => }/proguard-rules.pro | 0 .../{editor => }/src/main/AndroidManifest.xml | 0 .../converter/Timetable.kt | 2 +- .../converter/TimetableData.kt | 2 +- .../LocalTimetableProviderDatasourceImpl.kt | 4 ++-- .../LocalTimetableStorageDatasourceImpl.kt | 4 ++-- .../di/LocalDataSourceModule.kt | 12 ++++++++-- local/timetable/viewer/.gitignore | 1 - local/timetable/viewer/build.gradle.kts | 23 ------------------- local/timetable/viewer/consumer-rules.pro | 0 local/timetable/viewer/proguard-rules.pro | 21 ----------------- .../viewer/ExampleInstrumentedTest.kt | 22 ------------------ .../viewer/src/main/AndroidManifest.xml | 4 ---- .../timetable/viewer/ExampleUnitTest.kt | 16 ------------- settings.gradle.kts | 3 +-- 22 files changed, 20 insertions(+), 158 deletions(-) rename local/timetable/{editor => }/.gitignore (100%) rename local/timetable/{editor => }/build.gradle.kts (84%) rename local/timetable/{editor => }/consumer-rules.pro (100%) delete mode 100644 local/timetable/editor/src/androidTest/java/com/suwiki/timetable/editor/ExampleInstrumentedTest.kt delete mode 100644 local/timetable/editor/src/main/java/com/suwiki/local/timetable/editor/di/LocalDataSourceModule.kt delete mode 100644 local/timetable/editor/src/test/java/com/suwiki/timetable/editor/ExampleUnitTest.kt rename local/timetable/{editor => }/proguard-rules.pro (100%) rename local/timetable/{editor => }/src/main/AndroidManifest.xml (100%) rename local/timetable/{viewer/src/main/java/com/suwiki/local/timetable/viewer => src/main/java/com.suwiki.local.timetable}/converter/Timetable.kt (84%) rename local/timetable/{editor/src/main/java/com/suwiki/local/timetable/editor => src/main/java/com.suwiki.local.timetable}/converter/TimetableData.kt (86%) rename local/timetable/{viewer/src/main/java/com/suwiki/local/timetable/viewer => src/main/java/com.suwiki.local.timetable}/datasource/LocalTimetableProviderDatasourceImpl.kt (82%) rename local/timetable/{editor/src/main/java/com/suwiki/local/timetable/editor => src/main/java/com.suwiki.local.timetable}/datasource/LocalTimetableStorageDatasourceImpl.kt (88%) rename local/timetable/{viewer/src/main/java/com/suwiki/local/timetable/viewer => src/main/java/com.suwiki.local.timetable}/di/LocalDataSourceModule.kt (52%) delete mode 100644 local/timetable/viewer/.gitignore delete mode 100644 local/timetable/viewer/build.gradle.kts delete mode 100644 local/timetable/viewer/consumer-rules.pro delete mode 100644 local/timetable/viewer/proguard-rules.pro delete mode 100644 local/timetable/viewer/src/androidTest/java/com/suwiki/timetable/viewer/ExampleInstrumentedTest.kt delete mode 100644 local/timetable/viewer/src/main/AndroidManifest.xml delete mode 100644 local/timetable/viewer/src/test/java/com/suwiki/timetable/viewer/ExampleUnitTest.kt diff --git a/app-compose/build.gradle.kts b/app-compose/build.gradle.kts index 6f0edc68e..f7b1db0ca 100644 --- a/app-compose/build.gradle.kts +++ b/app-compose/build.gradle.kts @@ -37,8 +37,7 @@ dependencies { implementation(projects.domain.openmajor) implementation(projects.local.openmajor) - implementation(projects.local.timetable.editor) - implementation(projects.local.timetable.viewer) + implementation(projects.local.timetable) implementation(projects.local.user) implementation(projects.remote.lectureevaluation.editor) diff --git a/local/timetable/editor/.gitignore b/local/timetable/.gitignore similarity index 100% rename from local/timetable/editor/.gitignore rename to local/timetable/.gitignore diff --git a/local/timetable/editor/build.gradle.kts b/local/timetable/build.gradle.kts similarity index 84% rename from local/timetable/editor/build.gradle.kts rename to local/timetable/build.gradle.kts index 420fa16d1..bce05c34c 100644 --- a/local/timetable/editor/build.gradle.kts +++ b/local/timetable/build.gradle.kts @@ -6,11 +6,12 @@ plugins { } android { - namespace = "com.suwiki.local.timetable.editor" + namespace = "com.suwiki.local.timetable" } dependencies { implementation(projects.core.model) + implementation(projects.data.timetable.viewer) implementation(projects.data.timetable.editor) implementation(projects.core.database) diff --git a/local/timetable/editor/consumer-rules.pro b/local/timetable/consumer-rules.pro similarity index 100% rename from local/timetable/editor/consumer-rules.pro rename to local/timetable/consumer-rules.pro diff --git a/local/timetable/editor/src/androidTest/java/com/suwiki/timetable/editor/ExampleInstrumentedTest.kt b/local/timetable/editor/src/androidTest/java/com/suwiki/timetable/editor/ExampleInstrumentedTest.kt deleted file mode 100644 index 76aeccffe..000000000 --- a/local/timetable/editor/src/androidTest/java/com/suwiki/timetable/editor/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.suwiki.timetable.editor - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import junit.framework.TestCase.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * 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.suwiki.timetable.editor.test", appContext.packageName) - } -} diff --git a/local/timetable/editor/src/main/java/com/suwiki/local/timetable/editor/di/LocalDataSourceModule.kt b/local/timetable/editor/src/main/java/com/suwiki/local/timetable/editor/di/LocalDataSourceModule.kt deleted file mode 100644 index b5079a97b..000000000 --- a/local/timetable/editor/src/main/java/com/suwiki/local/timetable/editor/di/LocalDataSourceModule.kt +++ /dev/null @@ -1,20 +0,0 @@ -package com.suwiki.local.timetable.editor.di - -import com.suwiki.data.timetable.editor.datasource.LocalTimetableStorageDatasource -import com.suwiki.local.timetable.editor.datasource.LocalTimetableStorageDatasourceImpl -import dagger.Binds -import dagger.Module -import dagger.hilt.InstallIn -import dagger.hilt.components.SingletonComponent -import javax.inject.Singleton - -@Module -@InstallIn(SingletonComponent::class) -abstract class LocalDataSourceModule { - - @Singleton - @Binds - abstract fun bindLocalTimetableStorageDataSource( - localTimetableStorageDataSourceImpl: LocalTimetableStorageDatasourceImpl, - ): LocalTimetableStorageDatasource -} diff --git a/local/timetable/editor/src/test/java/com/suwiki/timetable/editor/ExampleUnitTest.kt b/local/timetable/editor/src/test/java/com/suwiki/timetable/editor/ExampleUnitTest.kt deleted file mode 100644 index f533a34ea..000000000 --- a/local/timetable/editor/src/test/java/com/suwiki/timetable/editor/ExampleUnitTest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.suwiki.timetable.editor - -import junit.framework.TestCase.assertEquals -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/local/timetable/editor/proguard-rules.pro b/local/timetable/proguard-rules.pro similarity index 100% rename from local/timetable/editor/proguard-rules.pro rename to local/timetable/proguard-rules.pro diff --git a/local/timetable/editor/src/main/AndroidManifest.xml b/local/timetable/src/main/AndroidManifest.xml similarity index 100% rename from local/timetable/editor/src/main/AndroidManifest.xml rename to local/timetable/src/main/AndroidManifest.xml diff --git a/local/timetable/viewer/src/main/java/com/suwiki/local/timetable/viewer/converter/Timetable.kt b/local/timetable/src/main/java/com.suwiki.local.timetable/converter/Timetable.kt similarity index 84% rename from local/timetable/viewer/src/main/java/com/suwiki/local/timetable/viewer/converter/Timetable.kt rename to local/timetable/src/main/java/com.suwiki.local.timetable/converter/Timetable.kt index 4b120236c..bbf8347b3 100644 --- a/local/timetable/viewer/src/main/java/com/suwiki/local/timetable/viewer/converter/Timetable.kt +++ b/local/timetable/src/main/java/com.suwiki.local.timetable/converter/Timetable.kt @@ -1,4 +1,4 @@ -package com.suwiki.local.timetable.viewer.converter +package com.suwiki.local.timetable.converter import com.suwiki.core.database.model.TimetableEntity import com.suwiki.core.model.timetable.TimetableData diff --git a/local/timetable/editor/src/main/java/com/suwiki/local/timetable/editor/converter/TimetableData.kt b/local/timetable/src/main/java/com.suwiki.local.timetable/converter/TimetableData.kt similarity index 86% rename from local/timetable/editor/src/main/java/com/suwiki/local/timetable/editor/converter/TimetableData.kt rename to local/timetable/src/main/java/com.suwiki.local.timetable/converter/TimetableData.kt index 41353fd5f..6c171f908 100644 --- a/local/timetable/editor/src/main/java/com/suwiki/local/timetable/editor/converter/TimetableData.kt +++ b/local/timetable/src/main/java/com.suwiki.local.timetable/converter/TimetableData.kt @@ -1,4 +1,4 @@ -package com.suwiki.local.timetable.editor.converter +package com.suwiki.local.timetable.converter import com.suwiki.core.database.model.TimetableEntity import com.suwiki.core.model.timetable.TimetableData diff --git a/local/timetable/viewer/src/main/java/com/suwiki/local/timetable/viewer/datasource/LocalTimetableProviderDatasourceImpl.kt b/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableProviderDatasourceImpl.kt similarity index 82% rename from local/timetable/viewer/src/main/java/com/suwiki/local/timetable/viewer/datasource/LocalTimetableProviderDatasourceImpl.kt rename to local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableProviderDatasourceImpl.kt index b4e4fafda..613e1353d 100644 --- a/local/timetable/viewer/src/main/java/com/suwiki/local/timetable/viewer/datasource/LocalTimetableProviderDatasourceImpl.kt +++ b/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableProviderDatasourceImpl.kt @@ -1,9 +1,9 @@ -package com.suwiki.local.timetable.viewer.datasource +package com.suwiki.local.timetable.datasource import com.suwiki.core.database.TimetableDatabase import com.suwiki.core.model.timetable.TimetableData import com.suwiki.data.timetable.viewer.datasource.LocalTimetableProviderDatasource -import com.suwiki.local.timetable.viewer.converter.toModel +import com.suwiki.local.timetable.converter.toModel import javax.inject.Inject class LocalTimetableProviderDatasourceImpl @Inject constructor( diff --git a/local/timetable/editor/src/main/java/com/suwiki/local/timetable/editor/datasource/LocalTimetableStorageDatasourceImpl.kt b/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableStorageDatasourceImpl.kt similarity index 88% rename from local/timetable/editor/src/main/java/com/suwiki/local/timetable/editor/datasource/LocalTimetableStorageDatasourceImpl.kt rename to local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableStorageDatasourceImpl.kt index 20ee4b670..4e7829752 100644 --- a/local/timetable/editor/src/main/java/com/suwiki/local/timetable/editor/datasource/LocalTimetableStorageDatasourceImpl.kt +++ b/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableStorageDatasourceImpl.kt @@ -1,9 +1,9 @@ -package com.suwiki.local.timetable.editor.datasource +package com.suwiki.local.timetable.datasource import com.suwiki.core.database.TimetableDatabase import com.suwiki.core.model.timetable.TimetableData import com.suwiki.data.timetable.editor.datasource.LocalTimetableStorageDatasource -import com.suwiki.local.timetable.editor.converter.toEntity +import com.suwiki.local.timetable.converter.toEntity import javax.inject.Inject class LocalTimetableStorageDatasourceImpl @Inject constructor( diff --git a/local/timetable/viewer/src/main/java/com/suwiki/local/timetable/viewer/di/LocalDataSourceModule.kt b/local/timetable/src/main/java/com.suwiki.local.timetable/di/LocalDataSourceModule.kt similarity index 52% rename from local/timetable/viewer/src/main/java/com/suwiki/local/timetable/viewer/di/LocalDataSourceModule.kt rename to local/timetable/src/main/java/com.suwiki.local.timetable/di/LocalDataSourceModule.kt index a97bdc2d7..f99aa9d7c 100644 --- a/local/timetable/viewer/src/main/java/com/suwiki/local/timetable/viewer/di/LocalDataSourceModule.kt +++ b/local/timetable/src/main/java/com.suwiki.local.timetable/di/LocalDataSourceModule.kt @@ -1,7 +1,9 @@ -package com.suwiki.local.timetable.viewer.di +package com.suwiki.local.timetable.di +import com.suwiki.data.timetable.editor.datasource.LocalTimetableStorageDatasource import com.suwiki.data.timetable.viewer.datasource.LocalTimetableProviderDatasource -import com.suwiki.local.timetable.viewer.datasource.LocalTimetableProviderDatasourceImpl +import com.suwiki.local.timetable.datasource.LocalTimetableProviderDatasourceImpl +import com.suwiki.local.timetable.datasource.LocalTimetableStorageDatasourceImpl import dagger.Binds import dagger.Module import dagger.hilt.InstallIn @@ -12,6 +14,12 @@ import javax.inject.Singleton @InstallIn(SingletonComponent::class) abstract class LocalDataSourceModule { + @Singleton + @Binds + abstract fun bindLocalTimetableStorageDataSource( + localTimetableStorageDataSourceImpl: LocalTimetableStorageDatasourceImpl, + ): LocalTimetableStorageDatasource + @Singleton @Binds abstract fun bindLocalTimetableProviderDataSource( diff --git a/local/timetable/viewer/.gitignore b/local/timetable/viewer/.gitignore deleted file mode 100644 index 42afabfd2..000000000 --- a/local/timetable/viewer/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/local/timetable/viewer/build.gradle.kts b/local/timetable/viewer/build.gradle.kts deleted file mode 100644 index 3e3542746..000000000 --- a/local/timetable/viewer/build.gradle.kts +++ /dev/null @@ -1,23 +0,0 @@ -@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed -plugins { - id("suwiki.android.library") - id("suwiki.android.hilt") - id("com.google.devtools.ksp") -} - -android { - namespace = "com.suwiki.local.timetable.viewer" -} - -dependencies { - implementation(projects.core.model) - implementation(projects.data.timetable.viewer) - implementation(projects.core.database) - - ksp(libs.room.compiler) - implementation(libs.room.runtime) - implementation(libs.room.ktx) - - testImplementation(libs.junit4) - androidTestImplementation(libs.junit) -} diff --git a/local/timetable/viewer/consumer-rules.pro b/local/timetable/viewer/consumer-rules.pro deleted file mode 100644 index e69de29bb..000000000 diff --git a/local/timetable/viewer/proguard-rules.pro b/local/timetable/viewer/proguard-rules.pro deleted file mode 100644 index 481bb4348..000000000 --- a/local/timetable/viewer/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# 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 \ No newline at end of file diff --git a/local/timetable/viewer/src/androidTest/java/com/suwiki/timetable/viewer/ExampleInstrumentedTest.kt b/local/timetable/viewer/src/androidTest/java/com/suwiki/timetable/viewer/ExampleInstrumentedTest.kt deleted file mode 100644 index c2ce13f13..000000000 --- a/local/timetable/viewer/src/androidTest/java/com/suwiki/timetable/viewer/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.suwiki.timetable.viewer - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import junit.framework.TestCase.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * 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.suwiki.timetable.viewer.test", appContext.packageName) - } -} diff --git a/local/timetable/viewer/src/main/AndroidManifest.xml b/local/timetable/viewer/src/main/AndroidManifest.xml deleted file mode 100644 index a5918e68a..000000000 --- a/local/timetable/viewer/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/local/timetable/viewer/src/test/java/com/suwiki/timetable/viewer/ExampleUnitTest.kt b/local/timetable/viewer/src/test/java/com/suwiki/timetable/viewer/ExampleUnitTest.kt deleted file mode 100644 index 04b40b63b..000000000 --- a/local/timetable/viewer/src/test/java/com/suwiki/timetable/viewer/ExampleUnitTest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.suwiki.timetable.viewer - -import junit.framework.TestCase.assertEquals -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/settings.gradle.kts b/settings.gradle.kts index 9dbf5a895..f0815aee7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -39,8 +39,7 @@ include(":remote:notice") include(":remote:user") include(":core:database") include(":local:openmajor") -include(":local:timetable:viewer") -include(":local:timetable:editor") +include(":local:timetable") include(":local:user") include(":data:openmajor") include(":data:timetable:viewer") From b438c06908a009f8f244514c9a10afac86a7ca35 Mon Sep 17 00:00:00 2001 From: jinukeu Date: Fri, 17 Nov 2023 17:56:58 +0900 Subject: [PATCH 2/6] rename: remote:timetable:viewer -> remote:timetable --- app-compose/build.gradle.kts | 2 +- remote/timetable/{viewer => }/.gitignore | 0 .../timetable/{viewer => }/build.gradle.kts | 2 +- .../timetable/{viewer => }/consumer-rules.pro | 0 .../timetable/{viewer => }/proguard-rules.pro | 0 .../{viewer => }/src/main/AndroidManifest.xml | 0 .../RemoteTimetableDataSourceImpl.kt | 2 +- .../di/RemoteDataSourceModule.kt | 4 ++-- .../viewer/ExampleInstrumentedTest.kt | 22 ------------------- .../timetable/viewer/ExampleUnitTest.kt | 16 -------------- settings.gradle.kts | 2 +- 11 files changed, 6 insertions(+), 44 deletions(-) rename remote/timetable/{viewer => }/.gitignore (100%) rename remote/timetable/{viewer => }/build.gradle.kts (85%) rename remote/timetable/{viewer => }/consumer-rules.pro (100%) rename remote/timetable/{viewer => }/proguard-rules.pro (100%) rename remote/timetable/{viewer => }/src/main/AndroidManifest.xml (100%) rename remote/timetable/{viewer/src/main/java/com/suwiki/remote/timetable/viewer => src/main/java/com.suwiki.remote.timetable}/datasource/RemoteTimetableDataSourceImpl.kt (97%) rename remote/timetable/{viewer/src/main/java/com/suwiki/remote/timetable/viewer => src/main/java/com.suwiki.remote.timetable}/di/RemoteDataSourceModule.kt (78%) delete mode 100644 remote/timetable/viewer/src/androidTest/java/com/suwiki/remote/timetable/viewer/ExampleInstrumentedTest.kt delete mode 100644 remote/timetable/viewer/src/test/java/com/suwiki/remote/timetable/viewer/ExampleUnitTest.kt diff --git a/app-compose/build.gradle.kts b/app-compose/build.gradle.kts index f7b1db0ca..a2d0c7fd0 100644 --- a/app-compose/build.gradle.kts +++ b/app-compose/build.gradle.kts @@ -47,7 +47,7 @@ dependencies { implementation(projects.remote.notice) implementation(projects.remote.openmajor) implementation(projects.remote.signup) - implementation(projects.remote.timetable.viewer) + implementation(projects.remote.timetable) implementation(projects.remote.user) implementation(projects.presentation) diff --git a/remote/timetable/viewer/.gitignore b/remote/timetable/.gitignore similarity index 100% rename from remote/timetable/viewer/.gitignore rename to remote/timetable/.gitignore diff --git a/remote/timetable/viewer/build.gradle.kts b/remote/timetable/build.gradle.kts similarity index 85% rename from remote/timetable/viewer/build.gradle.kts rename to remote/timetable/build.gradle.kts index 58582b452..fc6b6e358 100644 --- a/remote/timetable/viewer/build.gradle.kts +++ b/remote/timetable/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } android { - namespace = "com.suwiki.remote.timetable.viewer" + namespace = "com.suwiki.remote.timetable" } dependencies { diff --git a/remote/timetable/viewer/consumer-rules.pro b/remote/timetable/consumer-rules.pro similarity index 100% rename from remote/timetable/viewer/consumer-rules.pro rename to remote/timetable/consumer-rules.pro diff --git a/remote/timetable/viewer/proguard-rules.pro b/remote/timetable/proguard-rules.pro similarity index 100% rename from remote/timetable/viewer/proguard-rules.pro rename to remote/timetable/proguard-rules.pro diff --git a/remote/timetable/viewer/src/main/AndroidManifest.xml b/remote/timetable/src/main/AndroidManifest.xml similarity index 100% rename from remote/timetable/viewer/src/main/AndroidManifest.xml rename to remote/timetable/src/main/AndroidManifest.xml diff --git a/remote/timetable/viewer/src/main/java/com/suwiki/remote/timetable/viewer/datasource/RemoteTimetableDataSourceImpl.kt b/remote/timetable/src/main/java/com.suwiki.remote.timetable/datasource/RemoteTimetableDataSourceImpl.kt similarity index 97% rename from remote/timetable/viewer/src/main/java/com/suwiki/remote/timetable/viewer/datasource/RemoteTimetableDataSourceImpl.kt rename to remote/timetable/src/main/java/com.suwiki.remote.timetable/datasource/RemoteTimetableDataSourceImpl.kt index 057a228d8..fe3b36977 100644 --- a/remote/timetable/viewer/src/main/java/com/suwiki/remote/timetable/viewer/datasource/RemoteTimetableDataSourceImpl.kt +++ b/remote/timetable/src/main/java/com.suwiki.remote.timetable/datasource/RemoteTimetableDataSourceImpl.kt @@ -1,4 +1,4 @@ -package com.suwiki.remote.timetable.viewer.datasource +package com.suwiki.remote.timetable.datasource import com.google.firebase.database.FirebaseDatabase import com.suwiki.core.model.timetable.TimetableData diff --git a/remote/timetable/viewer/src/main/java/com/suwiki/remote/timetable/viewer/di/RemoteDataSourceModule.kt b/remote/timetable/src/main/java/com.suwiki.remote.timetable/di/RemoteDataSourceModule.kt similarity index 78% rename from remote/timetable/viewer/src/main/java/com/suwiki/remote/timetable/viewer/di/RemoteDataSourceModule.kt rename to remote/timetable/src/main/java/com.suwiki.remote.timetable/di/RemoteDataSourceModule.kt index e31fe0ab0..e8e2ef606 100644 --- a/remote/timetable/viewer/src/main/java/com/suwiki/remote/timetable/viewer/di/RemoteDataSourceModule.kt +++ b/remote/timetable/src/main/java/com.suwiki.remote.timetable/di/RemoteDataSourceModule.kt @@ -1,7 +1,7 @@ -package com.suwiki.remote.timetable.viewer.di +package com.suwiki.remote.timetable.di import com.suwiki.data.timetable.viewer.datasource.RemoteTimetableDataSource -import com.suwiki.remote.timetable.viewer.datasource.RemoteTimetableDataSourceImpl +import com.suwiki.remote.timetable.datasource.RemoteTimetableDataSourceImpl import dagger.Binds import dagger.Module import dagger.hilt.InstallIn diff --git a/remote/timetable/viewer/src/androidTest/java/com/suwiki/remote/timetable/viewer/ExampleInstrumentedTest.kt b/remote/timetable/viewer/src/androidTest/java/com/suwiki/remote/timetable/viewer/ExampleInstrumentedTest.kt deleted file mode 100644 index f1a08b226..000000000 --- a/remote/timetable/viewer/src/androidTest/java/com/suwiki/remote/timetable/viewer/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.suwiki.remote.timetable.viewer - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import junit.framework.TestCase.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * 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.suwiki.remote.timetable.editor.test", appContext.packageName) - } -} diff --git a/remote/timetable/viewer/src/test/java/com/suwiki/remote/timetable/viewer/ExampleUnitTest.kt b/remote/timetable/viewer/src/test/java/com/suwiki/remote/timetable/viewer/ExampleUnitTest.kt deleted file mode 100644 index 60674ee78..000000000 --- a/remote/timetable/viewer/src/test/java/com/suwiki/remote/timetable/viewer/ExampleUnitTest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.suwiki.remote.timetable.viewer - -import junit.framework.TestCase.assertEquals -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/settings.gradle.kts b/settings.gradle.kts index f0815aee7..5a0fa6434 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -29,7 +29,7 @@ include(":di") include(":core:network") include(":core:security") include(":remote:openmajor") -include(":remote:timetable:viewer") +include(":remote:timetable") include(":remote:lectureevaluation:viewer") include(":remote:lectureevaluation:report") include(":remote:lectureevaluation:my") From e4df1fe30ef7de7890b8b1fcffb3938bc7a953db Mon Sep 17 00:00:00 2001 From: jinukeu Date: Fri, 17 Nov 2023 20:54:52 +0900 Subject: [PATCH 3/6] =?UTF-8?q?rename:=20data:timetable:viewer,=20editor?= =?UTF-8?q?=20->=20data:timetable=EB=A1=9C=20=ED=86=B5=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app-compose/build.gradle.kts | 3 +-- data/timetable/{editor => }/.gitignore | 0 data/timetable/{editor => }/build.gradle.kts | 2 +- .../timetable/{editor => }/consumer-rules.pro | 0 .../editor/ExampleInstrumentedTest.kt | 22 ------------------- .../data/timetable/editor/ExampleUnitTest.kt | 16 -------------- .../timetable/{editor => }/proguard-rules.pro | 0 .../{editor => }/src/main/AndroidManifest.xml | 0 .../LocalTimetableProviderDatasource.kt | 2 +- .../LocalTimetableStorageDatasource.kt | 2 +- .../datasource/RemoteTimetableDataSource.kt | 2 +- data/timetable/viewer/.gitignore | 1 - data/timetable/viewer/build.gradle.kts | 8 ------- data/timetable/viewer/consumer-rules.pro | 0 data/timetable/viewer/proguard-rules.pro | 21 ------------------ .../viewer/ExampleInstrumentedTest.kt | 22 ------------------- .../viewer/src/main/AndroidManifest.xml | 4 ---- .../data/timetable/viewer/ExampleUnitTest.kt | 16 -------------- local/timetable/build.gradle.kts | 3 +-- remote/timetable/build.gradle.kts | 2 +- settings.gradle.kts | 3 +-- 21 files changed, 8 insertions(+), 121 deletions(-) rename data/timetable/{editor => }/.gitignore (100%) rename data/timetable/{editor => }/build.gradle.kts (72%) rename data/timetable/{editor => }/consumer-rules.pro (100%) delete mode 100644 data/timetable/editor/src/androidTest/java/com/suwiki/data/timetable/editor/ExampleInstrumentedTest.kt delete mode 100644 data/timetable/editor/src/test/java/com/suwiki/data/timetable/editor/ExampleUnitTest.kt rename data/timetable/{editor => }/proguard-rules.pro (100%) rename data/timetable/{editor => }/src/main/AndroidManifest.xml (100%) rename data/timetable/{viewer/src/main/java/com/suwiki/data/timetable/viewer => src/main/java/com/suwiki/data/timetable}/datasource/LocalTimetableProviderDatasource.kt (75%) rename data/timetable/{editor/src/main/java/com/suwiki/data/timetable/editor => src/main/java/com/suwiki/data/timetable}/datasource/LocalTimetableStorageDatasource.kt (85%) rename data/timetable/{viewer/src/main/java/com/suwiki/data/timetable/viewer => src/main/java/com/suwiki/data/timetable}/datasource/RemoteTimetableDataSource.kt (79%) delete mode 100644 data/timetable/viewer/.gitignore delete mode 100644 data/timetable/viewer/build.gradle.kts delete mode 100644 data/timetable/viewer/consumer-rules.pro delete mode 100644 data/timetable/viewer/proguard-rules.pro delete mode 100644 data/timetable/viewer/src/androidTest/java/com/suwiki/data/timetable/viewer/ExampleInstrumentedTest.kt delete mode 100644 data/timetable/viewer/src/main/AndroidManifest.xml delete mode 100644 data/timetable/viewer/src/test/java/com/suwiki/data/timetable/viewer/ExampleUnitTest.kt diff --git a/app-compose/build.gradle.kts b/app-compose/build.gradle.kts index a2d0c7fd0..6a786233d 100644 --- a/app-compose/build.gradle.kts +++ b/app-compose/build.gradle.kts @@ -22,8 +22,7 @@ dependencies { implementation(projects.data) implementation(projects.data.openmajor) - implementation(projects.data.timetable.viewer) - implementation(projects.data.timetable.editor) + implementation(projects.data.timetable) implementation(projects.data.lectureevaluation.editor) implementation(projects.data.lectureevaluation.viewer) implementation(projects.data.lectureevaluation.report) diff --git a/data/timetable/editor/.gitignore b/data/timetable/.gitignore similarity index 100% rename from data/timetable/editor/.gitignore rename to data/timetable/.gitignore diff --git a/data/timetable/editor/build.gradle.kts b/data/timetable/build.gradle.kts similarity index 72% rename from data/timetable/editor/build.gradle.kts rename to data/timetable/build.gradle.kts index 8792220ef..a1ea4305a 100644 --- a/data/timetable/editor/build.gradle.kts +++ b/data/timetable/build.gradle.kts @@ -4,5 +4,5 @@ plugins { } android { - namespace = "com.suwiki.data.timetable.editor" + namespace = "com.suwiki.data.timetable" } diff --git a/data/timetable/editor/consumer-rules.pro b/data/timetable/consumer-rules.pro similarity index 100% rename from data/timetable/editor/consumer-rules.pro rename to data/timetable/consumer-rules.pro diff --git a/data/timetable/editor/src/androidTest/java/com/suwiki/data/timetable/editor/ExampleInstrumentedTest.kt b/data/timetable/editor/src/androidTest/java/com/suwiki/data/timetable/editor/ExampleInstrumentedTest.kt deleted file mode 100644 index 21f5b70e9..000000000 --- a/data/timetable/editor/src/androidTest/java/com/suwiki/data/timetable/editor/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.suwiki.data.timetable.editor - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import junit.framework.TestCase.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * 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.suwiki.data.timetable.editor.test", appContext.packageName) - } -} diff --git a/data/timetable/editor/src/test/java/com/suwiki/data/timetable/editor/ExampleUnitTest.kt b/data/timetable/editor/src/test/java/com/suwiki/data/timetable/editor/ExampleUnitTest.kt deleted file mode 100644 index 5d4a2db7f..000000000 --- a/data/timetable/editor/src/test/java/com/suwiki/data/timetable/editor/ExampleUnitTest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.suwiki.data.timetable.editor - -import junit.framework.TestCase.assertEquals -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/data/timetable/editor/proguard-rules.pro b/data/timetable/proguard-rules.pro similarity index 100% rename from data/timetable/editor/proguard-rules.pro rename to data/timetable/proguard-rules.pro diff --git a/data/timetable/editor/src/main/AndroidManifest.xml b/data/timetable/src/main/AndroidManifest.xml similarity index 100% rename from data/timetable/editor/src/main/AndroidManifest.xml rename to data/timetable/src/main/AndroidManifest.xml diff --git a/data/timetable/viewer/src/main/java/com/suwiki/data/timetable/viewer/datasource/LocalTimetableProviderDatasource.kt b/data/timetable/src/main/java/com/suwiki/data/timetable/datasource/LocalTimetableProviderDatasource.kt similarity index 75% rename from data/timetable/viewer/src/main/java/com/suwiki/data/timetable/viewer/datasource/LocalTimetableProviderDatasource.kt rename to data/timetable/src/main/java/com/suwiki/data/timetable/datasource/LocalTimetableProviderDatasource.kt index 813fd3ac5..6c37d4c58 100644 --- a/data/timetable/viewer/src/main/java/com/suwiki/data/timetable/viewer/datasource/LocalTimetableProviderDatasource.kt +++ b/data/timetable/src/main/java/com/suwiki/data/timetable/datasource/LocalTimetableProviderDatasource.kt @@ -1,4 +1,4 @@ -package com.suwiki.data.timetable.viewer.datasource +package com.suwiki.data.timetable.datasource import com.suwiki.core.model.timetable.TimetableData diff --git a/data/timetable/editor/src/main/java/com/suwiki/data/timetable/editor/datasource/LocalTimetableStorageDatasource.kt b/data/timetable/src/main/java/com/suwiki/data/timetable/datasource/LocalTimetableStorageDatasource.kt similarity index 85% rename from data/timetable/editor/src/main/java/com/suwiki/data/timetable/editor/datasource/LocalTimetableStorageDatasource.kt rename to data/timetable/src/main/java/com/suwiki/data/timetable/datasource/LocalTimetableStorageDatasource.kt index 2e6977660..dfb0d37c1 100644 --- a/data/timetable/editor/src/main/java/com/suwiki/data/timetable/editor/datasource/LocalTimetableStorageDatasource.kt +++ b/data/timetable/src/main/java/com/suwiki/data/timetable/datasource/LocalTimetableStorageDatasource.kt @@ -1,4 +1,4 @@ -package com.suwiki.data.timetable.editor.datasource +package com.suwiki.data.timetable.datasource import com.suwiki.core.model.timetable.TimetableData diff --git a/data/timetable/viewer/src/main/java/com/suwiki/data/timetable/viewer/datasource/RemoteTimetableDataSource.kt b/data/timetable/src/main/java/com/suwiki/data/timetable/datasource/RemoteTimetableDataSource.kt similarity index 79% rename from data/timetable/viewer/src/main/java/com/suwiki/data/timetable/viewer/datasource/RemoteTimetableDataSource.kt rename to data/timetable/src/main/java/com/suwiki/data/timetable/datasource/RemoteTimetableDataSource.kt index ed3551cef..bc918c749 100644 --- a/data/timetable/viewer/src/main/java/com/suwiki/data/timetable/viewer/datasource/RemoteTimetableDataSource.kt +++ b/data/timetable/src/main/java/com/suwiki/data/timetable/datasource/RemoteTimetableDataSource.kt @@ -1,4 +1,4 @@ -package com.suwiki.data.timetable.viewer.datasource +package com.suwiki.data.timetable.datasource import com.suwiki.core.model.timetable.TimetableData diff --git a/data/timetable/viewer/.gitignore b/data/timetable/viewer/.gitignore deleted file mode 100644 index 42afabfd2..000000000 --- a/data/timetable/viewer/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/data/timetable/viewer/build.gradle.kts b/data/timetable/viewer/build.gradle.kts deleted file mode 100644 index 3c79b0505..000000000 --- a/data/timetable/viewer/build.gradle.kts +++ /dev/null @@ -1,8 +0,0 @@ -@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed -plugins { - id("suwiki.android.data") -} - -android { - namespace = "com.suwiki.data.timetable.viewer" -} diff --git a/data/timetable/viewer/consumer-rules.pro b/data/timetable/viewer/consumer-rules.pro deleted file mode 100644 index e69de29bb..000000000 diff --git a/data/timetable/viewer/proguard-rules.pro b/data/timetable/viewer/proguard-rules.pro deleted file mode 100644 index 481bb4348..000000000 --- a/data/timetable/viewer/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# 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 \ No newline at end of file diff --git a/data/timetable/viewer/src/androidTest/java/com/suwiki/data/timetable/viewer/ExampleInstrumentedTest.kt b/data/timetable/viewer/src/androidTest/java/com/suwiki/data/timetable/viewer/ExampleInstrumentedTest.kt deleted file mode 100644 index 5b08a01b7..000000000 --- a/data/timetable/viewer/src/androidTest/java/com/suwiki/data/timetable/viewer/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.suwiki.data.timetable.viewer - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import junit.framework.TestCase.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * 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.suwiki.data.timetable.viewer.test", appContext.packageName) - } -} diff --git a/data/timetable/viewer/src/main/AndroidManifest.xml b/data/timetable/viewer/src/main/AndroidManifest.xml deleted file mode 100644 index a5918e68a..000000000 --- a/data/timetable/viewer/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/data/timetable/viewer/src/test/java/com/suwiki/data/timetable/viewer/ExampleUnitTest.kt b/data/timetable/viewer/src/test/java/com/suwiki/data/timetable/viewer/ExampleUnitTest.kt deleted file mode 100644 index 45421415b..000000000 --- a/data/timetable/viewer/src/test/java/com/suwiki/data/timetable/viewer/ExampleUnitTest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.suwiki.data.timetable.viewer - -import junit.framework.TestCase.assertEquals -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/local/timetable/build.gradle.kts b/local/timetable/build.gradle.kts index bce05c34c..675632d44 100644 --- a/local/timetable/build.gradle.kts +++ b/local/timetable/build.gradle.kts @@ -11,8 +11,7 @@ android { dependencies { implementation(projects.core.model) - implementation(projects.data.timetable.viewer) - implementation(projects.data.timetable.editor) + implementation(projects.data.timetable) implementation(projects.core.database) ksp(libs.room.compiler) diff --git a/remote/timetable/build.gradle.kts b/remote/timetable/build.gradle.kts index fc6b6e358..305bf62ec 100644 --- a/remote/timetable/build.gradle.kts +++ b/remote/timetable/build.gradle.kts @@ -8,7 +8,7 @@ android { } dependencies { - implementation(projects.data.timetable.viewer) + implementation(projects.data.timetable) val bom = libs.firebase.bom add("implementation", platform(bom)) diff --git a/settings.gradle.kts b/settings.gradle.kts index 5a0fa6434..b2d703ffe 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -42,8 +42,7 @@ include(":local:openmajor") include(":local:timetable") include(":local:user") include(":data:openmajor") -include(":data:timetable:viewer") -include(":data:timetable:editor") +include(":data:timetable") include(":data:lectureevaluation:report") include(":data:lectureevaluation:viewer") include(":data:lectureevaluation:editor") From 80515fea1cd84bca09c3870cef2dc9c5d07b8bc8 Mon Sep 17 00:00:00 2001 From: jinukeu Date: Fri, 17 Nov 2023 21:30:15 +0900 Subject: [PATCH 4/6] =?UTF-8?q?rename:=20remote:lectureevaluation:viewer,?= =?UTF-8?q?=20reporter=20=ED=86=B5=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app-compose/build.gradle.kts | 3 +- .../LocalTimetableProviderDatasourceImpl.kt | 2 +- .../LocalTimetableStorageDatasourceImpl.kt | 2 +- .../di/LocalDataSourceModule.kt | 4 +- .../suwiki/report/ExampleInstrumentedTest.kt | 22 ---------- .../lectureevaluation/report/di/ApiModule.kt | 28 ------------ .../report/di/RemoteDataSourceModule.kt | 28 ------------ .../java/com/suwiki/report/ExampleUnitTest.kt | 16 ------- remote/lectureevaluation/viewer/.gitignore | 1 - .../lectureevaluation/viewer/build.gradle.kts | 17 ------- .../viewer/consumer-rules.pro | 0 .../viewer/proguard-rules.pro | 21 --------- .../viewer/ExampleInstrumentedTest.kt | 22 ---------- .../viewer/src/main/AndroidManifest.xml | 4 -- .../lectureevaluation/viewer/di/ApiModule.kt | 28 ------------ .../viewer/di/RemoteDataSourceModule.kt | 28 ------------ .../{report => viewerreporter}/.gitignore | 0 .../build.gradle.kts | 3 +- .../consumer-rules.pro | 0 .../proguard-rules.pro | 0 .../viewerreporter/ExampleInstrumentedTest.kt | 27 ++++++++++++ .../src/main/AndroidManifest.xml | 2 +- .../viewerreporter}/api/ExamReportApi.kt | 8 ++-- .../viewerreporter}/api/ExamViewerApi.kt | 6 +-- .../viewerreporter}/api/LectureReportApi.kt | 4 +- .../viewerreporter}/api/LectureViewerApi.kt | 10 ++--- .../RemoteExamProviderDataSourceImpl.kt | 6 +-- .../RemoteExamReportDataSourceImpl.kt | 6 +-- .../RemoteLectureProviderDataSourceImpl.kt | 6 +-- .../RemoteLectureReportDataSourceImpl.kt | 6 +-- .../viewerreporter/di/ApiModule.kt | 42 ++++++++++++++++++ .../di/RemoteDataSourceModule.kt | 44 +++++++++++++++++++ .../request/ReportExamRequest.kt | 2 +- .../request/ReportLectureRequest.kt | 2 +- .../viewerreporter}/response/DataResponse.kt | 2 +- .../exam/LectureDetailExamDataResponse.kt | 2 +- .../response/exam/LectureExamResponse.kt | 2 +- .../response/exam/PurchaseHistoryResponse.kt | 2 +- .../LectureDetailEvaluationDataResponse.kt | 2 +- .../lecture/LectureDetailInfoResponse.kt | 2 +- .../response/lecture/LectureMainResponse.kt | 2 +- .../viewerreporter}/ExampleUnitTest.kt | 13 +++--- .../RemoteTimetableDataSourceImpl.kt | 2 +- .../di/RemoteDataSourceModule.kt | 2 +- settings.gradle.kts | 3 +- 45 files changed, 166 insertions(+), 268 deletions(-) delete mode 100644 remote/lectureevaluation/report/src/androidTest/java/com/suwiki/report/ExampleInstrumentedTest.kt delete mode 100644 remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/di/ApiModule.kt delete mode 100644 remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/di/RemoteDataSourceModule.kt delete mode 100644 remote/lectureevaluation/report/src/test/java/com/suwiki/report/ExampleUnitTest.kt delete mode 100644 remote/lectureevaluation/viewer/.gitignore delete mode 100644 remote/lectureevaluation/viewer/build.gradle.kts delete mode 100644 remote/lectureevaluation/viewer/consumer-rules.pro delete mode 100644 remote/lectureevaluation/viewer/proguard-rules.pro delete mode 100644 remote/lectureevaluation/viewer/src/androidTest/java/com/suwiki/lectureevaluation/viewer/ExampleInstrumentedTest.kt delete mode 100644 remote/lectureevaluation/viewer/src/main/AndroidManifest.xml delete mode 100644 remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/di/ApiModule.kt delete mode 100644 remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/di/RemoteDataSourceModule.kt rename remote/lectureevaluation/{report => viewerreporter}/.gitignore (100%) rename remote/lectureevaluation/{report => viewerreporter}/build.gradle.kts (75%) rename remote/lectureevaluation/{report => viewerreporter}/consumer-rules.pro (100%) rename remote/lectureevaluation/{report => viewerreporter}/proguard-rules.pro (100%) create mode 100644 remote/lectureevaluation/viewerreporter/src/androidTest/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleInstrumentedTest.kt rename remote/lectureevaluation/{report => viewerreporter}/src/main/AndroidManifest.xml (90%) rename remote/lectureevaluation/{report/src/main/java/com/suwiki/remote/lectureevaluation/report => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/api/ExamReportApi.kt (54%) rename remote/lectureevaluation/{viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/api/ExamViewerApi.kt (70%) rename remote/lectureevaluation/{report/src/main/java/com/suwiki/remote/lectureevaluation/report => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/api/LectureReportApi.kt (71%) rename remote/lectureevaluation/{viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/api/LectureViewerApi.kt (76%) rename remote/lectureevaluation/{viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/datasource/RemoteExamProviderDataSourceImpl.kt (74%) rename remote/lectureevaluation/{report/src/main/java/com/suwiki/remote/lectureevaluation/report => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/datasource/RemoteExamReportDataSourceImpl.kt (67%) rename remote/lectureevaluation/{viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/datasource/RemoteLectureProviderDataSourceImpl.kt (86%) rename remote/lectureevaluation/{report/src/main/java/com/suwiki/remote/lectureevaluation/report => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/datasource/RemoteLectureReportDataSourceImpl.kt (67%) create mode 100644 remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/ApiModule.kt create mode 100644 remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt rename remote/lectureevaluation/{report/src/main/java/com/suwiki/remote/lectureevaluation/report => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/request/ReportExamRequest.kt (56%) rename remote/lectureevaluation/{report/src/main/java/com/suwiki/remote/lectureevaluation/report => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/request/ReportLectureRequest.kt (57%) rename remote/lectureevaluation/{viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/response/DataResponse.kt (59%) rename remote/lectureevaluation/{viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/response/exam/LectureDetailExamDataResponse.kt (93%) rename remote/lectureevaluation/{viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/response/exam/LectureExamResponse.kt (92%) rename remote/lectureevaluation/{viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/response/exam/PurchaseHistoryResponse.kt (88%) rename remote/lectureevaluation/{viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/response/lecture/LectureDetailEvaluationDataResponse.kt (93%) rename remote/lectureevaluation/{viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/response/lecture/LectureDetailInfoResponse.kt (93%) rename remote/lectureevaluation/{viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter}/response/lecture/LectureMainResponse.kt (91%) rename remote/lectureevaluation/{viewer/src/test/java/com/suwiki/lectureevaluation/viewer => viewerreporter/src/test/java/com/suwiki/remote/lectureevaluation/viewerreporter}/ExampleUnitTest.kt (56%) diff --git a/app-compose/build.gradle.kts b/app-compose/build.gradle.kts index 6a786233d..5eb8b55b1 100644 --- a/app-compose/build.gradle.kts +++ b/app-compose/build.gradle.kts @@ -41,8 +41,7 @@ dependencies { implementation(projects.remote.lectureevaluation.editor) implementation(projects.remote.lectureevaluation.my) - implementation(projects.remote.lectureevaluation.report) - implementation(projects.remote.lectureevaluation.viewer) + implementation(projects.remote.lectureevaluation.viewerreporter) implementation(projects.remote.notice) implementation(projects.remote.openmajor) implementation(projects.remote.signup) diff --git a/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableProviderDatasourceImpl.kt b/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableProviderDatasourceImpl.kt index 613e1353d..df1e2b612 100644 --- a/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableProviderDatasourceImpl.kt +++ b/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableProviderDatasourceImpl.kt @@ -2,7 +2,7 @@ package com.suwiki.local.timetable.datasource import com.suwiki.core.database.TimetableDatabase import com.suwiki.core.model.timetable.TimetableData -import com.suwiki.data.timetable.viewer.datasource.LocalTimetableProviderDatasource +import com.suwiki.data.timetable.datasource.LocalTimetableProviderDatasource import com.suwiki.local.timetable.converter.toModel import javax.inject.Inject diff --git a/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableStorageDatasourceImpl.kt b/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableStorageDatasourceImpl.kt index 4e7829752..14d56f41e 100644 --- a/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableStorageDatasourceImpl.kt +++ b/local/timetable/src/main/java/com.suwiki.local.timetable/datasource/LocalTimetableStorageDatasourceImpl.kt @@ -2,7 +2,7 @@ package com.suwiki.local.timetable.datasource import com.suwiki.core.database.TimetableDatabase import com.suwiki.core.model.timetable.TimetableData -import com.suwiki.data.timetable.editor.datasource.LocalTimetableStorageDatasource +import com.suwiki.data.timetable.datasource.LocalTimetableStorageDatasource import com.suwiki.local.timetable.converter.toEntity import javax.inject.Inject diff --git a/local/timetable/src/main/java/com.suwiki.local.timetable/di/LocalDataSourceModule.kt b/local/timetable/src/main/java/com.suwiki.local.timetable/di/LocalDataSourceModule.kt index f99aa9d7c..4111d1352 100644 --- a/local/timetable/src/main/java/com.suwiki.local.timetable/di/LocalDataSourceModule.kt +++ b/local/timetable/src/main/java/com.suwiki.local.timetable/di/LocalDataSourceModule.kt @@ -1,7 +1,7 @@ package com.suwiki.local.timetable.di -import com.suwiki.data.timetable.editor.datasource.LocalTimetableStorageDatasource -import com.suwiki.data.timetable.viewer.datasource.LocalTimetableProviderDatasource +import com.suwiki.data.timetable.datasource.LocalTimetableProviderDatasource +import com.suwiki.data.timetable.datasource.LocalTimetableStorageDatasource import com.suwiki.local.timetable.datasource.LocalTimetableProviderDatasourceImpl import com.suwiki.local.timetable.datasource.LocalTimetableStorageDatasourceImpl import dagger.Binds diff --git a/remote/lectureevaluation/report/src/androidTest/java/com/suwiki/report/ExampleInstrumentedTest.kt b/remote/lectureevaluation/report/src/androidTest/java/com/suwiki/report/ExampleInstrumentedTest.kt deleted file mode 100644 index f5062d41a..000000000 --- a/remote/lectureevaluation/report/src/androidTest/java/com/suwiki/report/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.suwiki.report - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import junit.framework.TestCase.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * 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.suwiki.report.test", appContext.packageName) - } -} diff --git a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/di/ApiModule.kt b/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/di/ApiModule.kt deleted file mode 100644 index 36b788f15..000000000 --- a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/di/ApiModule.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.suwiki.remote.lectureevaluation.report.di - -import com.suwiki.core.network.di.AuthRetrofit -import com.suwiki.remote.lectureevaluation.report.api.ExamReportApi -import com.suwiki.remote.lectureevaluation.report.api.LectureReportApi -import dagger.Module -import dagger.Provides -import dagger.hilt.InstallIn -import dagger.hilt.components.SingletonComponent -import retrofit2.Retrofit -import javax.inject.Singleton - -@Module -@InstallIn(SingletonComponent::class) -object ApiModule { - - @Singleton - @Provides - fun provideExamReportApi(@AuthRetrofit retrofit: Retrofit): ExamReportApi { - return retrofit.create(ExamReportApi::class.java) - } - - @Singleton - @Provides - fun provideLectureReportApi(@AuthRetrofit retrofit: Retrofit): LectureReportApi { - return retrofit.create(LectureReportApi::class.java) - } -} diff --git a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/di/RemoteDataSourceModule.kt b/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/di/RemoteDataSourceModule.kt deleted file mode 100644 index 4ba9b1b6f..000000000 --- a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/di/RemoteDataSourceModule.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.suwiki.remote.lectureevaluation.report.di - -import com.suwiki.data.lectureevaluation.report.datasource.RemoteExamReportDataSource -import com.suwiki.data.lectureevaluation.report.datasource.RemoteLectureReportDataSource -import com.suwiki.remote.lectureevaluation.report.datasource.RemoteExamReportDataSourceImpl -import com.suwiki.remote.lectureevaluation.report.datasource.RemoteLectureReportDataSourceImpl -import dagger.Binds -import dagger.Module -import dagger.hilt.InstallIn -import dagger.hilt.components.SingletonComponent -import javax.inject.Singleton - -@Module -@InstallIn(SingletonComponent::class) -abstract class RemoteDataSourceModule { - - @Singleton - @Binds - abstract fun bindRemoteExamReportDatasource( - remoteOpenMajorDataSourceImpl: RemoteExamReportDataSourceImpl, - ): RemoteExamReportDataSource - - @Singleton - @Binds - abstract fun bindLectureExamReportDatasource( - remoteOpenMajorDataSourceImpl: RemoteLectureReportDataSourceImpl, - ): RemoteLectureReportDataSource -} diff --git a/remote/lectureevaluation/report/src/test/java/com/suwiki/report/ExampleUnitTest.kt b/remote/lectureevaluation/report/src/test/java/com/suwiki/report/ExampleUnitTest.kt deleted file mode 100644 index 10486b772..000000000 --- a/remote/lectureevaluation/report/src/test/java/com/suwiki/report/ExampleUnitTest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.suwiki.report - -import junit.framework.TestCase.assertEquals -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/remote/lectureevaluation/viewer/.gitignore b/remote/lectureevaluation/viewer/.gitignore deleted file mode 100644 index 42afabfd2..000000000 --- a/remote/lectureevaluation/viewer/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/remote/lectureevaluation/viewer/build.gradle.kts b/remote/lectureevaluation/viewer/build.gradle.kts deleted file mode 100644 index de2336f59..000000000 --- a/remote/lectureevaluation/viewer/build.gradle.kts +++ /dev/null @@ -1,17 +0,0 @@ -@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed -plugins { - id("suwiki.android.remote") - id("org.jetbrains.kotlin.plugin.serialization") -} - -android { - namespace = "com.suwiki.remote.lectureevaluation.viewer" -} - -dependencies { - implementation(projects.data.lectureevaluation.viewer) - - implementation(libs.retrofit.core) - implementation(libs.kotlinx.serialization.json) - implementation(libs.kotlinx.datetime) -} diff --git a/remote/lectureevaluation/viewer/consumer-rules.pro b/remote/lectureevaluation/viewer/consumer-rules.pro deleted file mode 100644 index e69de29bb..000000000 diff --git a/remote/lectureevaluation/viewer/proguard-rules.pro b/remote/lectureevaluation/viewer/proguard-rules.pro deleted file mode 100644 index 481bb4348..000000000 --- a/remote/lectureevaluation/viewer/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# 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 \ No newline at end of file diff --git a/remote/lectureevaluation/viewer/src/androidTest/java/com/suwiki/lectureevaluation/viewer/ExampleInstrumentedTest.kt b/remote/lectureevaluation/viewer/src/androidTest/java/com/suwiki/lectureevaluation/viewer/ExampleInstrumentedTest.kt deleted file mode 100644 index 86cf1789b..000000000 --- a/remote/lectureevaluation/viewer/src/androidTest/java/com/suwiki/lectureevaluation/viewer/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.suwiki.lectureevaluation.viewer - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import junit.framework.TestCase.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * 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.suwiki.lectureevaluation.viewer.test", appContext.packageName) - } -} diff --git a/remote/lectureevaluation/viewer/src/main/AndroidManifest.xml b/remote/lectureevaluation/viewer/src/main/AndroidManifest.xml deleted file mode 100644 index a5918e68a..000000000 --- a/remote/lectureevaluation/viewer/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/di/ApiModule.kt b/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/di/ApiModule.kt deleted file mode 100644 index 0df2c62d8..000000000 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/di/ApiModule.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.suwiki.remote.lectureevaluation.viewer.di - -import com.suwiki.core.network.di.AuthRetrofit -import com.suwiki.remote.lectureevaluation.viewer.api.ExamViewerApi -import com.suwiki.remote.lectureevaluation.viewer.api.LectureViewerApi -import dagger.Module -import dagger.Provides -import dagger.hilt.InstallIn -import dagger.hilt.components.SingletonComponent -import retrofit2.Retrofit -import javax.inject.Singleton - -@Module -@InstallIn(SingletonComponent::class) -object ApiModule { - - @Singleton - @Provides - fun provideExamViewerApi(@AuthRetrofit retrofit: Retrofit): ExamViewerApi { - return retrofit.create(ExamViewerApi::class.java) - } - - @Singleton - @Provides - fun provideLectureViewerApi(@AuthRetrofit retrofit: Retrofit): LectureViewerApi { - return retrofit.create(LectureViewerApi::class.java) - } -} diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/di/RemoteDataSourceModule.kt b/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/di/RemoteDataSourceModule.kt deleted file mode 100644 index ab79d4ad0..000000000 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/di/RemoteDataSourceModule.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.suwiki.remote.lectureevaluation.viewer.di - -import com.suwiki.data.lectureevaluation.viewer.datasource.RemoteExamProviderDataSource -import com.suwiki.data.lectureevaluation.viewer.datasource.RemoteLectureProviderDataSource -import com.suwiki.remote.lectureevaluation.viewer.datasource.RemoteExamProviderDataSourceImpl -import com.suwiki.remote.lectureevaluation.viewer.datasource.RemoteLectureProviderDataSourceImpl -import dagger.Binds -import dagger.Module -import dagger.hilt.InstallIn -import dagger.hilt.components.SingletonComponent -import javax.inject.Singleton - -@Module -@InstallIn(SingletonComponent::class) -abstract class RemoteDataSourceModule { - - @Singleton - @Binds - abstract fun bindRemoteLectureProviderDatasource( - remoteLectureProviderDataSourceImpl: RemoteLectureProviderDataSourceImpl, - ): RemoteLectureProviderDataSource - - @Singleton - @Binds - abstract fun bindRemoteExamProviderDatasource( - remoteExamProviderDataSourceImpl: RemoteExamProviderDataSourceImpl, - ): RemoteExamProviderDataSource -} diff --git a/remote/lectureevaluation/report/.gitignore b/remote/lectureevaluation/viewerreporter/.gitignore similarity index 100% rename from remote/lectureevaluation/report/.gitignore rename to remote/lectureevaluation/viewerreporter/.gitignore diff --git a/remote/lectureevaluation/report/build.gradle.kts b/remote/lectureevaluation/viewerreporter/build.gradle.kts similarity index 75% rename from remote/lectureevaluation/report/build.gradle.kts rename to remote/lectureevaluation/viewerreporter/build.gradle.kts index f7349750b..bf939beef 100644 --- a/remote/lectureevaluation/report/build.gradle.kts +++ b/remote/lectureevaluation/viewerreporter/build.gradle.kts @@ -5,10 +5,11 @@ plugins { } android { - namespace = "com.suwiki.remote.lectureevaluation.report" + namespace = "com.suwiki.remote.lectureevaluation.viewerreporter" } dependencies { + implementation(projects.data.lectureevaluation.viewer) implementation(projects.data.lectureevaluation.report) implementation(libs.retrofit.core) diff --git a/remote/lectureevaluation/report/consumer-rules.pro b/remote/lectureevaluation/viewerreporter/consumer-rules.pro similarity index 100% rename from remote/lectureevaluation/report/consumer-rules.pro rename to remote/lectureevaluation/viewerreporter/consumer-rules.pro diff --git a/remote/lectureevaluation/report/proguard-rules.pro b/remote/lectureevaluation/viewerreporter/proguard-rules.pro similarity index 100% rename from remote/lectureevaluation/report/proguard-rules.pro rename to remote/lectureevaluation/viewerreporter/proguard-rules.pro diff --git a/remote/lectureevaluation/viewerreporter/src/androidTest/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleInstrumentedTest.kt b/remote/lectureevaluation/viewerreporter/src/androidTest/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleInstrumentedTest.kt new file mode 100644 index 000000000..3668fc019 --- /dev/null +++ b/remote/lectureevaluation/viewerreporter/src/androidTest/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleInstrumentedTest.kt @@ -0,0 +1,27 @@ +package com.suwiki.remote.lectureevaluation.viewerreporter + +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.suwiki.remote.lectureevaluation.viewerreporter.test", + appContext.packageName + ) + } +} diff --git a/remote/lectureevaluation/report/src/main/AndroidManifest.xml b/remote/lectureevaluation/viewerreporter/src/main/AndroidManifest.xml similarity index 90% rename from remote/lectureevaluation/report/src/main/AndroidManifest.xml rename to remote/lectureevaluation/viewerreporter/src/main/AndroidManifest.xml index a5918e68a..8bdb7e14b 100644 --- a/remote/lectureevaluation/report/src/main/AndroidManifest.xml +++ b/remote/lectureevaluation/viewerreporter/src/main/AndroidManifest.xml @@ -1,4 +1,4 @@ - \ No newline at end of file + diff --git a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/api/ExamReportApi.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/ExamReportApi.kt similarity index 54% rename from remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/api/ExamReportApi.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/ExamReportApi.kt index bbe7b2ee3..abba739dd 100644 --- a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/api/ExamReportApi.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/ExamReportApi.kt @@ -1,9 +1,9 @@ -package com.suwiki.remote.lectureevaluation.report.api +package com.suwiki.remote.lectureevaluation.viewerreporter.api import com.suwiki.core.network.retrofit.ApiResult -import com.suwiki.remote.lectureevaluation.report.api.LectureReportApi.Companion.REPORT -import com.suwiki.remote.lectureevaluation.report.api.LectureReportApi.Companion.USER -import com.suwiki.remote.lectureevaluation.report.request.ReportExamRequest +import com.suwiki.remote.lectureevaluation.viewerreporter.api.LectureReportApi.Companion.REPORT +import com.suwiki.remote.lectureevaluation.viewerreporter.api.LectureReportApi.Companion.USER +import com.suwiki.remote.lectureevaluation.viewerreporter.request.ReportExamRequest import retrofit2.http.Body import retrofit2.http.POST diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/api/ExamViewerApi.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/ExamViewerApi.kt similarity index 70% rename from remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/api/ExamViewerApi.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/ExamViewerApi.kt index 972592ebb..06af7e417 100644 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/api/ExamViewerApi.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/ExamViewerApi.kt @@ -1,8 +1,8 @@ -package com.suwiki.remote.lectureevaluation.viewer.api +package com.suwiki.remote.lectureevaluation.viewerreporter.api import com.suwiki.core.network.retrofit.ApiResult -import com.suwiki.remote.lectureevaluation.viewer.api.LectureViewerApi.Companion.QUERY_LECTURE_ID -import com.suwiki.remote.lectureevaluation.viewer.response.exam.LectureDetailExamDataResponse +import com.suwiki.remote.lectureevaluation.viewerreporter.api.LectureViewerApi.Companion.QUERY_LECTURE_ID +import com.suwiki.remote.lectureevaluation.viewerreporter.response.exam.LectureDetailExamDataResponse import retrofit2.http.GET import retrofit2.http.POST import retrofit2.http.Query diff --git a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/api/LectureReportApi.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/LectureReportApi.kt similarity index 71% rename from remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/api/LectureReportApi.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/LectureReportApi.kt index 5fcbeef9a..e16956b00 100644 --- a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/api/LectureReportApi.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/LectureReportApi.kt @@ -1,7 +1,7 @@ -package com.suwiki.remote.lectureevaluation.report.api +package com.suwiki.remote.lectureevaluation.viewerreporter.api import com.suwiki.core.network.retrofit.ApiResult -import com.suwiki.remote.lectureevaluation.report.request.ReportLectureRequest +import com.suwiki.remote.lectureevaluation.viewerreporter.request.ReportLectureRequest import retrofit2.http.Body import retrofit2.http.POST diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/api/LectureViewerApi.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/LectureViewerApi.kt similarity index 76% rename from remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/api/LectureViewerApi.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/LectureViewerApi.kt index 585d191b1..09756e3da 100644 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/api/LectureViewerApi.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/api/LectureViewerApi.kt @@ -1,10 +1,10 @@ -package com.suwiki.remote.lectureevaluation.viewer.api +package com.suwiki.remote.lectureevaluation.viewerreporter.api import com.suwiki.core.network.retrofit.ApiResult -import com.suwiki.remote.lectureevaluation.viewer.response.DataResponse -import com.suwiki.remote.lectureevaluation.viewer.response.lecture.LectureDetailEvaluationDataResponse -import com.suwiki.remote.lectureevaluation.viewer.response.lecture.LectureDetailInfoResponse -import com.suwiki.remote.lectureevaluation.viewer.response.lecture.LectureMainResponse +import com.suwiki.remote.lectureevaluation.viewerreporter.response.DataResponse +import com.suwiki.remote.lectureevaluation.viewerreporter.response.lecture.LectureDetailEvaluationDataResponse +import com.suwiki.remote.lectureevaluation.viewerreporter.response.lecture.LectureDetailInfoResponse +import com.suwiki.remote.lectureevaluation.viewerreporter.response.lecture.LectureMainResponse import retrofit2.http.GET import retrofit2.http.Query diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/datasource/RemoteExamProviderDataSourceImpl.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamProviderDataSourceImpl.kt similarity index 74% rename from remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/datasource/RemoteExamProviderDataSourceImpl.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamProviderDataSourceImpl.kt index d192fe157..227b2386f 100644 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/datasource/RemoteExamProviderDataSourceImpl.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamProviderDataSourceImpl.kt @@ -1,9 +1,9 @@ -package com.suwiki.remote.lectureevaluation.viewer.datasource +package com.suwiki.remote.lectureevaluation.viewerreporter.datasource import com.suwiki.core.model.lectureevaluation.LectureDetailExamData import com.suwiki.data.lectureevaluation.viewer.datasource.RemoteExamProviderDataSource -import com.suwiki.remote.lectureevaluation.viewer.api.ExamViewerApi -import com.suwiki.remote.lectureevaluation.viewer.response.exam.toModel +import com.suwiki.remote.lectureevaluation.viewerreporter.api.ExamViewerApi +import com.suwiki.remote.lectureevaluation.viewerreporter.response.exam.toModel import javax.inject.Inject class RemoteExamProviderDataSourceImpl @Inject constructor( diff --git a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/datasource/RemoteExamReportDataSourceImpl.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamReportDataSourceImpl.kt similarity index 67% rename from remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/datasource/RemoteExamReportDataSourceImpl.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamReportDataSourceImpl.kt index f1975d419..9109679cc 100644 --- a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/datasource/RemoteExamReportDataSourceImpl.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamReportDataSourceImpl.kt @@ -1,8 +1,8 @@ -package com.suwiki.remote.lectureevaluation.report.datasource +package com.suwiki.remote.lectureevaluation.viewerreporter.datasource import com.suwiki.data.lectureevaluation.report.datasource.RemoteExamReportDataSource -import com.suwiki.remote.lectureevaluation.report.api.ExamReportApi -import com.suwiki.remote.lectureevaluation.report.request.ReportExamRequest +import com.suwiki.remote.lectureevaluation.viewerreporter.api.ExamReportApi +import com.suwiki.remote.lectureevaluation.viewerreporter.request.ReportExamRequest import javax.inject.Inject class RemoteExamReportDataSourceImpl @Inject constructor( diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/datasource/RemoteLectureProviderDataSourceImpl.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureProviderDataSourceImpl.kt similarity index 86% rename from remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/datasource/RemoteLectureProviderDataSourceImpl.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureProviderDataSourceImpl.kt index 7538425ea..860de64ad 100644 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/datasource/RemoteLectureProviderDataSourceImpl.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureProviderDataSourceImpl.kt @@ -1,11 +1,11 @@ -package com.suwiki.remote.lectureevaluation.viewer.datasource +package com.suwiki.remote.lectureevaluation.viewerreporter.datasource import com.suwiki.core.model.lectureevaluation.LectureDetailEvaluationData import com.suwiki.core.model.lectureevaluation.LectureDetailInfo import com.suwiki.core.model.lectureevaluation.LectureMain import com.suwiki.data.lectureevaluation.viewer.datasource.RemoteLectureProviderDataSource -import com.suwiki.remote.lectureevaluation.viewer.api.LectureViewerApi -import com.suwiki.remote.lectureevaluation.viewer.response.lecture.toModel +import com.suwiki.remote.lectureevaluation.viewerreporter.api.LectureViewerApi +import com.suwiki.remote.lectureevaluation.viewerreporter.response.lecture.toModel import javax.inject.Inject class RemoteLectureProviderDataSourceImpl @Inject constructor( diff --git a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/datasource/RemoteLectureReportDataSourceImpl.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureReportDataSourceImpl.kt similarity index 67% rename from remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/datasource/RemoteLectureReportDataSourceImpl.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureReportDataSourceImpl.kt index af42d4b48..3aa9f249e 100644 --- a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/datasource/RemoteLectureReportDataSourceImpl.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureReportDataSourceImpl.kt @@ -1,8 +1,8 @@ -package com.suwiki.remote.lectureevaluation.report.datasource +package com.suwiki.remote.lectureevaluation.viewerreporter.datasource import com.suwiki.data.lectureevaluation.report.datasource.RemoteLectureReportDataSource -import com.suwiki.remote.lectureevaluation.report.api.LectureReportApi -import com.suwiki.remote.lectureevaluation.report.request.ReportLectureRequest +import com.suwiki.remote.lectureevaluation.viewerreporter.api.LectureReportApi +import com.suwiki.remote.lectureevaluation.viewerreporter.request.ReportLectureRequest import javax.inject.Inject class RemoteLectureReportDataSourceImpl @Inject constructor( diff --git a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/ApiModule.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/ApiModule.kt new file mode 100644 index 000000000..9abc83059 --- /dev/null +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/ApiModule.kt @@ -0,0 +1,42 @@ +package com.suwiki.remote.lectureevaluation.viewerreporter.di + +import com.suwiki.core.network.di.AuthRetrofit +import com.suwiki.remote.lectureevaluation.viewerreporter.api.ExamReportApi +import com.suwiki.remote.lectureevaluation.viewerreporter.api.ExamViewerApi +import com.suwiki.remote.lectureevaluation.viewerreporter.api.LectureReportApi +import com.suwiki.remote.lectureevaluation.viewerreporter.api.LectureViewerApi +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import retrofit2.Retrofit +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object ApiModule { + + @Singleton + @Provides + fun provideExamReportApi(@AuthRetrofit retrofit: Retrofit): ExamReportApi { + return retrofit.create(ExamReportApi::class.java) + } + + @Singleton + @Provides + fun provideLectureReportApi(@AuthRetrofit retrofit: Retrofit): LectureReportApi { + return retrofit.create(LectureReportApi::class.java) + } + + @Singleton + @Provides + fun provideExamViewerApi(@AuthRetrofit retrofit: Retrofit): ExamViewerApi { + return retrofit.create(ExamViewerApi::class.java) + } + + @Singleton + @Provides + fun provideLectureViewerApi(@AuthRetrofit retrofit: Retrofit): LectureViewerApi { + return retrofit.create(LectureViewerApi::class.java) + } +} diff --git a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt new file mode 100644 index 000000000..340370d53 --- /dev/null +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt @@ -0,0 +1,44 @@ +package com.suwiki.remote.lectureevaluation.viewerreporter.di + +import com.suwiki.data.lectureevaluation.report.datasource.RemoteExamReportDataSource +import com.suwiki.data.lectureevaluation.report.datasource.RemoteLectureReportDataSource +import com.suwiki.data.lectureevaluation.viewer.datasource.RemoteExamProviderDataSource +import com.suwiki.data.lectureevaluation.viewer.datasource.RemoteLectureProviderDataSource +import com.suwiki.remote.lectureevaluation.viewerreporter.datasource.RemoteExamProviderDataSourceImpl +import com.suwiki.remote.lectureevaluation.viewerreporter.datasource.RemoteExamReportDataSourceImpl +import com.suwiki.remote.lectureevaluation.viewerreporter.datasource.RemoteLectureProviderDataSourceImpl +import com.suwiki.remote.lectureevaluation.viewerreporter.datasource.RemoteLectureReportDataSourceImpl +import dagger.Binds +import dagger.Module +import dagger.hilt.InstallIn +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +abstract class RemoteDataSourceModule { + + @Singleton + @Binds + abstract fun bindRemoteLectureProviderDatasource( + remoteLectureProviderDataSourceImpl: RemoteLectureProviderDataSourceImpl, + ): RemoteLectureProviderDataSource + + @Singleton + @Binds + abstract fun bindRemoteExamProviderDatasource( + remoteExamProviderDataSourceImpl: RemoteExamProviderDataSourceImpl, + ): RemoteExamProviderDataSource + + @Singleton + @Binds + abstract fun bindRemoteExamReportDatasource( + remoteOpenMajorDataSourceImpl: RemoteExamReportDataSourceImpl, + ): RemoteExamReportDataSource + + @Singleton + @Binds + abstract fun bindLectureExamReportDatasource( + remoteOpenMajorDataSourceImpl: RemoteLectureReportDataSourceImpl, + ): RemoteLectureReportDataSource +} diff --git a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/request/ReportExamRequest.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/request/ReportExamRequest.kt similarity index 56% rename from remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/request/ReportExamRequest.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/request/ReportExamRequest.kt index a80393ebe..214f6d2a0 100644 --- a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/request/ReportExamRequest.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/request/ReportExamRequest.kt @@ -1,4 +1,4 @@ -package com.suwiki.remote.lectureevaluation.report.request +package com.suwiki.remote.lectureevaluation.viewerreporter.request data class ReportExamRequest( val evaluateIdx: Long, diff --git a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/request/ReportLectureRequest.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/request/ReportLectureRequest.kt similarity index 57% rename from remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/request/ReportLectureRequest.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/request/ReportLectureRequest.kt index ce32b9aff..407d32477 100644 --- a/remote/lectureevaluation/report/src/main/java/com/suwiki/remote/lectureevaluation/report/request/ReportLectureRequest.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/request/ReportLectureRequest.kt @@ -1,4 +1,4 @@ -package com.suwiki.remote.lectureevaluation.report.request +package com.suwiki.remote.lectureevaluation.viewerreporter.request data class ReportLectureRequest( val evaluateIdx: Long, diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/DataResponse.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/DataResponse.kt similarity index 59% rename from remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/DataResponse.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/DataResponse.kt index 88d3200ad..13f366ee2 100644 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/DataResponse.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/DataResponse.kt @@ -1,4 +1,4 @@ -package com.suwiki.remote.lectureevaluation.viewer.response +package com.suwiki.remote.lectureevaluation.viewerreporter.response import kotlinx.serialization.Serializable diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/exam/LectureDetailExamDataResponse.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/exam/LectureDetailExamDataResponse.kt similarity index 93% rename from remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/exam/LectureDetailExamDataResponse.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/exam/LectureDetailExamDataResponse.kt index d97740eef..c515a818b 100644 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/exam/LectureDetailExamDataResponse.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/exam/LectureDetailExamDataResponse.kt @@ -1,4 +1,4 @@ -package com.suwiki.remote.lectureevaluation.viewer.response.exam +package com.suwiki.remote.lectureevaluation.viewerreporter.response.exam import com.suwiki.core.model.lectureevaluation.LectureDetailExam import com.suwiki.core.model.lectureevaluation.LectureDetailExamData diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/exam/LectureExamResponse.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/exam/LectureExamResponse.kt similarity index 92% rename from remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/exam/LectureExamResponse.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/exam/LectureExamResponse.kt index 94f2d0ce5..9f516ecfc 100644 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/exam/LectureExamResponse.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/exam/LectureExamResponse.kt @@ -1,4 +1,4 @@ -package com.suwiki.remote.lectureevaluation.viewer.response.exam +package com.suwiki.remote.lectureevaluation.viewerreporter.response.exam import com.suwiki.core.model.lectureevaluation.LectureExam import kotlinx.serialization.Serializable diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/exam/PurchaseHistoryResponse.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/exam/PurchaseHistoryResponse.kt similarity index 88% rename from remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/exam/PurchaseHistoryResponse.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/exam/PurchaseHistoryResponse.kt index 78af93a8f..4a15dd14c 100644 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/exam/PurchaseHistoryResponse.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/exam/PurchaseHistoryResponse.kt @@ -1,4 +1,4 @@ -package com.suwiki.remote.lectureevaluation.viewer.response.exam +package com.suwiki.remote.lectureevaluation.viewerreporter.response.exam import com.suwiki.core.model.lectureevaluation.PurchaseHistory import kotlinx.datetime.LocalDateTime diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/lecture/LectureDetailEvaluationDataResponse.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/lecture/LectureDetailEvaluationDataResponse.kt similarity index 93% rename from remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/lecture/LectureDetailEvaluationDataResponse.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/lecture/LectureDetailEvaluationDataResponse.kt index e76f01736..5fd15c07e 100644 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/lecture/LectureDetailEvaluationDataResponse.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/lecture/LectureDetailEvaluationDataResponse.kt @@ -1,4 +1,4 @@ -package com.suwiki.remote.lectureevaluation.viewer.response.lecture +package com.suwiki.remote.lectureevaluation.viewerreporter.response.lecture import com.suwiki.core.model.lectureevaluation.LectureDetailEvaluation import com.suwiki.core.model.lectureevaluation.LectureDetailEvaluationData diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/lecture/LectureDetailInfoResponse.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/lecture/LectureDetailInfoResponse.kt similarity index 93% rename from remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/lecture/LectureDetailInfoResponse.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/lecture/LectureDetailInfoResponse.kt index 6b377c755..b0f541fa4 100644 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/lecture/LectureDetailInfoResponse.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/lecture/LectureDetailInfoResponse.kt @@ -1,4 +1,4 @@ -package com.suwiki.remote.lectureevaluation.viewer.response.lecture +package com.suwiki.remote.lectureevaluation.viewerreporter.response.lecture import com.suwiki.core.model.lectureevaluation.LectureDetailInfo import kotlinx.serialization.SerialName diff --git a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/lecture/LectureMainResponse.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/lecture/LectureMainResponse.kt similarity index 91% rename from remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/lecture/LectureMainResponse.kt rename to remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/lecture/LectureMainResponse.kt index 2e3a1e75b..597d9be36 100644 --- a/remote/lectureevaluation/viewer/src/main/java/com/suwiki/remote/lectureevaluation/viewer/response/lecture/LectureMainResponse.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/response/lecture/LectureMainResponse.kt @@ -1,4 +1,4 @@ -package com.suwiki.remote.lectureevaluation.viewer.response.lecture +package com.suwiki.remote.lectureevaluation.viewerreporter.response.lecture import com.suwiki.core.model.lectureevaluation.LectureMain import kotlinx.serialization.SerialName diff --git a/remote/lectureevaluation/viewer/src/test/java/com/suwiki/lectureevaluation/viewer/ExampleUnitTest.kt b/remote/lectureevaluation/viewerreporter/src/test/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleUnitTest.kt similarity index 56% rename from remote/lectureevaluation/viewer/src/test/java/com/suwiki/lectureevaluation/viewer/ExampleUnitTest.kt rename to remote/lectureevaluation/viewerreporter/src/test/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleUnitTest.kt index 290b7de3c..1948464e2 100644 --- a/remote/lectureevaluation/viewer/src/test/java/com/suwiki/lectureevaluation/viewer/ExampleUnitTest.kt +++ b/remote/lectureevaluation/viewerreporter/src/test/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleUnitTest.kt @@ -1,16 +1,17 @@ -package com.suwiki.lectureevaluation.viewer +package com.suwiki.remote.lectureevaluation.viewerreporter -import junit.framework.TestCase.assertEquals import org.junit.Test +import org.junit.Assert.* + /** * Example local unit test, which will execute on the development machine (host). * * See [testing documentation](http://d.android.com/tools/testing). */ class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } } diff --git a/remote/timetable/src/main/java/com.suwiki.remote.timetable/datasource/RemoteTimetableDataSourceImpl.kt b/remote/timetable/src/main/java/com.suwiki.remote.timetable/datasource/RemoteTimetableDataSourceImpl.kt index fe3b36977..536217885 100644 --- a/remote/timetable/src/main/java/com.suwiki.remote.timetable/datasource/RemoteTimetableDataSourceImpl.kt +++ b/remote/timetable/src/main/java/com.suwiki.remote.timetable/datasource/RemoteTimetableDataSourceImpl.kt @@ -2,7 +2,7 @@ package com.suwiki.remote.timetable.datasource import com.google.firebase.database.FirebaseDatabase import com.suwiki.core.model.timetable.TimetableData -import com.suwiki.data.timetable.viewer.datasource.RemoteTimetableDataSource +import com.suwiki.data.timetable.datasource.RemoteTimetableDataSource import kotlinx.coroutines.tasks.await import javax.inject.Inject diff --git a/remote/timetable/src/main/java/com.suwiki.remote.timetable/di/RemoteDataSourceModule.kt b/remote/timetable/src/main/java/com.suwiki.remote.timetable/di/RemoteDataSourceModule.kt index e8e2ef606..b6f3a00aa 100644 --- a/remote/timetable/src/main/java/com.suwiki.remote.timetable/di/RemoteDataSourceModule.kt +++ b/remote/timetable/src/main/java/com.suwiki.remote.timetable/di/RemoteDataSourceModule.kt @@ -1,6 +1,6 @@ package com.suwiki.remote.timetable.di -import com.suwiki.data.timetable.viewer.datasource.RemoteTimetableDataSource +import com.suwiki.data.timetable.datasource.RemoteTimetableDataSource import com.suwiki.remote.timetable.datasource.RemoteTimetableDataSourceImpl import dagger.Binds import dagger.Module diff --git a/settings.gradle.kts b/settings.gradle.kts index b2d703ffe..def07203b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -30,8 +30,7 @@ include(":core:network") include(":core:security") include(":remote:openmajor") include(":remote:timetable") -include(":remote:lectureevaluation:viewer") -include(":remote:lectureevaluation:report") +include(":remote:lectureevaluation:viewerreporter") include(":remote:lectureevaluation:my") include(":remote:lectureevaluation:editor") include(":remote:signup") From f91d80ccbfa2dbc59591356b359fa1539e178ecd Mon Sep 17 00:00:00 2001 From: jinukeu Date: Fri, 17 Nov 2023 21:44:19 +0900 Subject: [PATCH 5/6] =?UTF-8?q?refactor:=20data:lectureevaluation:viewer,?= =?UTF-8?q?=20reporter=20=ED=86=B5=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app-compose/build.gradle.kts | 3 +-- .../report/ExampleInstrumentedTest.kt | 22 ------------------- data/lectureevaluation/viewer/.gitignore | 1 - .../lectureevaluation/viewer/build.gradle.kts | 8 ------- .../viewer/consumer-rules.pro | 0 .../viewer/proguard-rules.pro | 21 ------------------ .../viewer/src/main/AndroidManifest.xml | 4 ---- .../viewer/ExampleUnitTest.kt | 16 -------------- .../{report => viewerreporter}/.gitignore | 0 .../build.gradle.kts | 2 +- .../consumer-rules.pro | 0 .../proguard-rules.pro | 0 .../ExampleInstrumentedTest.kt | 2 +- .../src/main/AndroidManifest.xml | 0 .../RemoteExamProviderDataSource.kt | 2 +- .../datasource/RemoteExamReportDataSource.kt | 2 +- .../RemoteLectureProviderDataSource.kt | 2 +- .../RemoteLectureReportDataSource.kt | 2 +- .../viewerreporter}/ExampleUnitTest.kt | 2 +- .../viewerreporter/build.gradle.kts | 3 +-- .../RemoteExamProviderDataSourceImpl.kt | 2 +- .../RemoteExamReportDataSourceImpl.kt | 2 +- .../RemoteLectureProviderDataSourceImpl.kt | 2 +- .../RemoteLectureReportDataSourceImpl.kt | 2 +- .../di/RemoteDataSourceModule.kt | 8 +++---- settings.gradle.kts | 3 +-- 26 files changed, 18 insertions(+), 93 deletions(-) delete mode 100644 data/lectureevaluation/report/src/androidTest/java/com/suwiki/data/lectureevaluation/report/ExampleInstrumentedTest.kt delete mode 100644 data/lectureevaluation/viewer/.gitignore delete mode 100644 data/lectureevaluation/viewer/build.gradle.kts delete mode 100644 data/lectureevaluation/viewer/consumer-rules.pro delete mode 100644 data/lectureevaluation/viewer/proguard-rules.pro delete mode 100644 data/lectureevaluation/viewer/src/main/AndroidManifest.xml delete mode 100644 data/lectureevaluation/viewer/src/test/java/com/suwiki/data/lectureevaluation/viewer/ExampleUnitTest.kt rename data/lectureevaluation/{report => viewerreporter}/.gitignore (100%) rename data/lectureevaluation/{report => viewerreporter}/build.gradle.kts (66%) rename data/lectureevaluation/{report => viewerreporter}/consumer-rules.pro (100%) rename data/lectureevaluation/{report => viewerreporter}/proguard-rules.pro (100%) rename data/lectureevaluation/{viewer/src/androidTest/java/com/suwiki/data/lectureevaluation/viewer => viewerreporter/src/androidTest/java/com/suwiki/data/lectureevaluation/viewerreporter}/ExampleInstrumentedTest.kt (92%) rename data/lectureevaluation/{report => viewerreporter}/src/main/AndroidManifest.xml (100%) rename data/lectureevaluation/{viewer/src/main/java/com/suwiki/data/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter}/datasource/RemoteExamProviderDataSource.kt (78%) rename data/lectureevaluation/{report/src/main/java/com/suwiki/data/lectureevaluation/report => viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter}/datasource/RemoteExamReportDataSource.kt (64%) rename data/lectureevaluation/{viewer/src/main/java/com/suwiki/data/lectureevaluation/viewer => viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter}/datasource/RemoteLectureProviderDataSource.kt (91%) rename data/lectureevaluation/{report/src/main/java/com/suwiki/data/lectureevaluation/report => viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter}/datasource/RemoteLectureReportDataSource.kt (65%) rename data/lectureevaluation/{report/src/test/java/com/suwiki/data/lectureevaluation/report => viewerreporter/src/test/java/com/suwiki/data/lectureevaluation/viewerreporter}/ExampleUnitTest.kt (85%) diff --git a/app-compose/build.gradle.kts b/app-compose/build.gradle.kts index 5eb8b55b1..8cbf4bafa 100644 --- a/app-compose/build.gradle.kts +++ b/app-compose/build.gradle.kts @@ -24,8 +24,7 @@ dependencies { implementation(projects.data.openmajor) implementation(projects.data.timetable) implementation(projects.data.lectureevaluation.editor) - implementation(projects.data.lectureevaluation.viewer) - implementation(projects.data.lectureevaluation.report) + implementation(projects.data.lectureevaluation.viewerreporter) implementation(projects.data.lectureevaluation.my) implementation(projects.data.user) implementation(projects.data.notice) diff --git a/data/lectureevaluation/report/src/androidTest/java/com/suwiki/data/lectureevaluation/report/ExampleInstrumentedTest.kt b/data/lectureevaluation/report/src/androidTest/java/com/suwiki/data/lectureevaluation/report/ExampleInstrumentedTest.kt deleted file mode 100644 index 5dbfa58d2..000000000 --- a/data/lectureevaluation/report/src/androidTest/java/com/suwiki/data/lectureevaluation/report/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,22 +0,0 @@ -package com.suwiki.data.lectureevaluation.report - -import androidx.test.ext.junit.runners.AndroidJUnit4 -import androidx.test.platform.app.InstrumentationRegistry -import junit.framework.TestCase.assertEquals -import org.junit.Test -import org.junit.runner.RunWith - -/** - * 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.suwiki.data.lectureevaluation.report.test", appContext.packageName) - } -} diff --git a/data/lectureevaluation/viewer/.gitignore b/data/lectureevaluation/viewer/.gitignore deleted file mode 100644 index 42afabfd2..000000000 --- a/data/lectureevaluation/viewer/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/data/lectureevaluation/viewer/build.gradle.kts b/data/lectureevaluation/viewer/build.gradle.kts deleted file mode 100644 index ce96b83bb..000000000 --- a/data/lectureevaluation/viewer/build.gradle.kts +++ /dev/null @@ -1,8 +0,0 @@ -@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed -plugins { - id("suwiki.android.data") -} - -android { - namespace = "com.suwiki.data.lectureevalution.viewer" -} diff --git a/data/lectureevaluation/viewer/consumer-rules.pro b/data/lectureevaluation/viewer/consumer-rules.pro deleted file mode 100644 index e69de29bb..000000000 diff --git a/data/lectureevaluation/viewer/proguard-rules.pro b/data/lectureevaluation/viewer/proguard-rules.pro deleted file mode 100644 index 481bb4348..000000000 --- a/data/lectureevaluation/viewer/proguard-rules.pro +++ /dev/null @@ -1,21 +0,0 @@ -# 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 \ No newline at end of file diff --git a/data/lectureevaluation/viewer/src/main/AndroidManifest.xml b/data/lectureevaluation/viewer/src/main/AndroidManifest.xml deleted file mode 100644 index a5918e68a..000000000 --- a/data/lectureevaluation/viewer/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/data/lectureevaluation/viewer/src/test/java/com/suwiki/data/lectureevaluation/viewer/ExampleUnitTest.kt b/data/lectureevaluation/viewer/src/test/java/com/suwiki/data/lectureevaluation/viewer/ExampleUnitTest.kt deleted file mode 100644 index 244d9c8dd..000000000 --- a/data/lectureevaluation/viewer/src/test/java/com/suwiki/data/lectureevaluation/viewer/ExampleUnitTest.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.suwiki.data.lectureevaluation.viewer - -import junit.framework.TestCase.assertEquals -import org.junit.Test - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} diff --git a/data/lectureevaluation/report/.gitignore b/data/lectureevaluation/viewerreporter/.gitignore similarity index 100% rename from data/lectureevaluation/report/.gitignore rename to data/lectureevaluation/viewerreporter/.gitignore diff --git a/data/lectureevaluation/report/build.gradle.kts b/data/lectureevaluation/viewerreporter/build.gradle.kts similarity index 66% rename from data/lectureevaluation/report/build.gradle.kts rename to data/lectureevaluation/viewerreporter/build.gradle.kts index 162f69e17..c2061fb0e 100644 --- a/data/lectureevaluation/report/build.gradle.kts +++ b/data/lectureevaluation/viewerreporter/build.gradle.kts @@ -4,5 +4,5 @@ plugins { } android { - namespace = "com.suwiki.data.lectureevalution.report" + namespace = "com.suwiki.data.lectureevalution.viewerreporter" } diff --git a/data/lectureevaluation/report/consumer-rules.pro b/data/lectureevaluation/viewerreporter/consumer-rules.pro similarity index 100% rename from data/lectureevaluation/report/consumer-rules.pro rename to data/lectureevaluation/viewerreporter/consumer-rules.pro diff --git a/data/lectureevaluation/report/proguard-rules.pro b/data/lectureevaluation/viewerreporter/proguard-rules.pro similarity index 100% rename from data/lectureevaluation/report/proguard-rules.pro rename to data/lectureevaluation/viewerreporter/proguard-rules.pro diff --git a/data/lectureevaluation/viewer/src/androidTest/java/com/suwiki/data/lectureevaluation/viewer/ExampleInstrumentedTest.kt b/data/lectureevaluation/viewerreporter/src/androidTest/java/com/suwiki/data/lectureevaluation/viewerreporter/ExampleInstrumentedTest.kt similarity index 92% rename from data/lectureevaluation/viewer/src/androidTest/java/com/suwiki/data/lectureevaluation/viewer/ExampleInstrumentedTest.kt rename to data/lectureevaluation/viewerreporter/src/androidTest/java/com/suwiki/data/lectureevaluation/viewerreporter/ExampleInstrumentedTest.kt index 94e97c466..459f50995 100644 --- a/data/lectureevaluation/viewer/src/androidTest/java/com/suwiki/data/lectureevaluation/viewer/ExampleInstrumentedTest.kt +++ b/data/lectureevaluation/viewerreporter/src/androidTest/java/com/suwiki/data/lectureevaluation/viewerreporter/ExampleInstrumentedTest.kt @@ -1,4 +1,4 @@ -package com.suwiki.data.lectureevaluation.viewer +package com.suwiki.data.lectureevaluation.viewerreporter import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.platform.app.InstrumentationRegistry diff --git a/data/lectureevaluation/report/src/main/AndroidManifest.xml b/data/lectureevaluation/viewerreporter/src/main/AndroidManifest.xml similarity index 100% rename from data/lectureevaluation/report/src/main/AndroidManifest.xml rename to data/lectureevaluation/viewerreporter/src/main/AndroidManifest.xml diff --git a/data/lectureevaluation/viewer/src/main/java/com/suwiki/data/lectureevaluation/viewer/datasource/RemoteExamProviderDataSource.kt b/data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteExamProviderDataSource.kt similarity index 78% rename from data/lectureevaluation/viewer/src/main/java/com/suwiki/data/lectureevaluation/viewer/datasource/RemoteExamProviderDataSource.kt rename to data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteExamProviderDataSource.kt index 9ab68e884..27bd44abe 100644 --- a/data/lectureevaluation/viewer/src/main/java/com/suwiki/data/lectureevaluation/viewer/datasource/RemoteExamProviderDataSource.kt +++ b/data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteExamProviderDataSource.kt @@ -1,4 +1,4 @@ -package com.suwiki.data.lectureevaluation.viewer.datasource +package com.suwiki.data.lectureevaluation.viewerreporter.datasource import com.suwiki.core.model.lectureevaluation.LectureDetailExamData diff --git a/data/lectureevaluation/report/src/main/java/com/suwiki/data/lectureevaluation/report/datasource/RemoteExamReportDataSource.kt b/data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteExamReportDataSource.kt similarity index 64% rename from data/lectureevaluation/report/src/main/java/com/suwiki/data/lectureevaluation/report/datasource/RemoteExamReportDataSource.kt rename to data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteExamReportDataSource.kt index e8aceae59..017a5b5ae 100644 --- a/data/lectureevaluation/report/src/main/java/com/suwiki/data/lectureevaluation/report/datasource/RemoteExamReportDataSource.kt +++ b/data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteExamReportDataSource.kt @@ -1,4 +1,4 @@ -package com.suwiki.data.lectureevaluation.report.datasource +package com.suwiki.data.lectureevaluation.viewerreporter.datasource interface RemoteExamReportDataSource { diff --git a/data/lectureevaluation/viewer/src/main/java/com/suwiki/data/lectureevaluation/viewer/datasource/RemoteLectureProviderDataSource.kt b/data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteLectureProviderDataSource.kt similarity index 91% rename from data/lectureevaluation/viewer/src/main/java/com/suwiki/data/lectureevaluation/viewer/datasource/RemoteLectureProviderDataSource.kt rename to data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteLectureProviderDataSource.kt index 205ece586..b2cbc88d0 100644 --- a/data/lectureevaluation/viewer/src/main/java/com/suwiki/data/lectureevaluation/viewer/datasource/RemoteLectureProviderDataSource.kt +++ b/data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteLectureProviderDataSource.kt @@ -1,4 +1,4 @@ -package com.suwiki.data.lectureevaluation.viewer.datasource +package com.suwiki.data.lectureevaluation.viewerreporter.datasource import com.suwiki.core.model.lectureevaluation.LectureDetailEvaluationData import com.suwiki.core.model.lectureevaluation.LectureDetailInfo diff --git a/data/lectureevaluation/report/src/main/java/com/suwiki/data/lectureevaluation/report/datasource/RemoteLectureReportDataSource.kt b/data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteLectureReportDataSource.kt similarity index 65% rename from data/lectureevaluation/report/src/main/java/com/suwiki/data/lectureevaluation/report/datasource/RemoteLectureReportDataSource.kt rename to data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteLectureReportDataSource.kt index 7343f8c2c..2d4a6752f 100644 --- a/data/lectureevaluation/report/src/main/java/com/suwiki/data/lectureevaluation/report/datasource/RemoteLectureReportDataSource.kt +++ b/data/lectureevaluation/viewerreporter/src/main/java/com/suwiki/data/lectureevaluation/viewerreporter/datasource/RemoteLectureReportDataSource.kt @@ -1,4 +1,4 @@ -package com.suwiki.data.lectureevaluation.report.datasource +package com.suwiki.data.lectureevaluation.viewerreporter.datasource interface RemoteLectureReportDataSource { diff --git a/data/lectureevaluation/report/src/test/java/com/suwiki/data/lectureevaluation/report/ExampleUnitTest.kt b/data/lectureevaluation/viewerreporter/src/test/java/com/suwiki/data/lectureevaluation/viewerreporter/ExampleUnitTest.kt similarity index 85% rename from data/lectureevaluation/report/src/test/java/com/suwiki/data/lectureevaluation/report/ExampleUnitTest.kt rename to data/lectureevaluation/viewerreporter/src/test/java/com/suwiki/data/lectureevaluation/viewerreporter/ExampleUnitTest.kt index 79abf6c49..63e89ae9c 100644 --- a/data/lectureevaluation/report/src/test/java/com/suwiki/data/lectureevaluation/report/ExampleUnitTest.kt +++ b/data/lectureevaluation/viewerreporter/src/test/java/com/suwiki/data/lectureevaluation/viewerreporter/ExampleUnitTest.kt @@ -1,4 +1,4 @@ -package com.suwiki.data.lectureevaluation.report +package com.suwiki.data.lectureevaluation.viewerreporter import junit.framework.TestCase.assertEquals import org.junit.Test diff --git a/remote/lectureevaluation/viewerreporter/build.gradle.kts b/remote/lectureevaluation/viewerreporter/build.gradle.kts index bf939beef..8dfba3967 100644 --- a/remote/lectureevaluation/viewerreporter/build.gradle.kts +++ b/remote/lectureevaluation/viewerreporter/build.gradle.kts @@ -9,8 +9,7 @@ android { } dependencies { - implementation(projects.data.lectureevaluation.viewer) - implementation(projects.data.lectureevaluation.report) + implementation(projects.data.lectureevaluation.viewerreporter) implementation(libs.retrofit.core) implementation(libs.kotlinx.serialization.json) diff --git a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamProviderDataSourceImpl.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamProviderDataSourceImpl.kt index 227b2386f..c7d934061 100644 --- a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamProviderDataSourceImpl.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamProviderDataSourceImpl.kt @@ -1,7 +1,7 @@ package com.suwiki.remote.lectureevaluation.viewerreporter.datasource import com.suwiki.core.model.lectureevaluation.LectureDetailExamData -import com.suwiki.data.lectureevaluation.viewer.datasource.RemoteExamProviderDataSource +import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteExamProviderDataSource import com.suwiki.remote.lectureevaluation.viewerreporter.api.ExamViewerApi import com.suwiki.remote.lectureevaluation.viewerreporter.response.exam.toModel import javax.inject.Inject diff --git a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamReportDataSourceImpl.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamReportDataSourceImpl.kt index 9109679cc..1a78ca041 100644 --- a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamReportDataSourceImpl.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteExamReportDataSourceImpl.kt @@ -1,6 +1,6 @@ package com.suwiki.remote.lectureevaluation.viewerreporter.datasource -import com.suwiki.data.lectureevaluation.report.datasource.RemoteExamReportDataSource +import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteExamReportDataSource import com.suwiki.remote.lectureevaluation.viewerreporter.api.ExamReportApi import com.suwiki.remote.lectureevaluation.viewerreporter.request.ReportExamRequest import javax.inject.Inject diff --git a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureProviderDataSourceImpl.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureProviderDataSourceImpl.kt index 860de64ad..8358d97b1 100644 --- a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureProviderDataSourceImpl.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureProviderDataSourceImpl.kt @@ -3,7 +3,7 @@ package com.suwiki.remote.lectureevaluation.viewerreporter.datasource import com.suwiki.core.model.lectureevaluation.LectureDetailEvaluationData import com.suwiki.core.model.lectureevaluation.LectureDetailInfo import com.suwiki.core.model.lectureevaluation.LectureMain -import com.suwiki.data.lectureevaluation.viewer.datasource.RemoteLectureProviderDataSource +import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteLectureProviderDataSource import com.suwiki.remote.lectureevaluation.viewerreporter.api.LectureViewerApi import com.suwiki.remote.lectureevaluation.viewerreporter.response.lecture.toModel import javax.inject.Inject diff --git a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureReportDataSourceImpl.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureReportDataSourceImpl.kt index 3aa9f249e..6c3d31b81 100644 --- a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureReportDataSourceImpl.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/datasource/RemoteLectureReportDataSourceImpl.kt @@ -1,6 +1,6 @@ package com.suwiki.remote.lectureevaluation.viewerreporter.datasource -import com.suwiki.data.lectureevaluation.report.datasource.RemoteLectureReportDataSource +import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteLectureReportDataSource import com.suwiki.remote.lectureevaluation.viewerreporter.api.LectureReportApi import com.suwiki.remote.lectureevaluation.viewerreporter.request.ReportLectureRequest import javax.inject.Inject diff --git a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt index 340370d53..0911ad02d 100644 --- a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt @@ -1,9 +1,9 @@ package com.suwiki.remote.lectureevaluation.viewerreporter.di -import com.suwiki.data.lectureevaluation.report.datasource.RemoteExamReportDataSource -import com.suwiki.data.lectureevaluation.report.datasource.RemoteLectureReportDataSource -import com.suwiki.data.lectureevaluation.viewer.datasource.RemoteExamProviderDataSource -import com.suwiki.data.lectureevaluation.viewer.datasource.RemoteLectureProviderDataSource +import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteExamReportDataSource +import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteLectureReportDataSource +import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteExamProviderDataSource +import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteLectureProviderDataSource import com.suwiki.remote.lectureevaluation.viewerreporter.datasource.RemoteExamProviderDataSourceImpl import com.suwiki.remote.lectureevaluation.viewerreporter.datasource.RemoteExamReportDataSourceImpl import com.suwiki.remote.lectureevaluation.viewerreporter.datasource.RemoteLectureProviderDataSourceImpl diff --git a/settings.gradle.kts b/settings.gradle.kts index def07203b..b6b88bc13 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -42,8 +42,7 @@ include(":local:timetable") include(":local:user") include(":data:openmajor") include(":data:timetable") -include(":data:lectureevaluation:report") -include(":data:lectureevaluation:viewer") +include(":data:lectureevaluation:viewerreporter") include(":data:lectureevaluation:editor") include(":data:lectureevaluation:my") include(":data:user") From 5c59bb6c2a37b40ea9d600f3c7e242215c310cf5 Mon Sep 17 00:00:00 2001 From: jinukeu Date: Fri, 17 Nov 2023 21:56:31 +0900 Subject: [PATCH 6/6] refactor: ktlintFormat --- detekt-config.yml | 2 ++ .../viewerreporter/ExampleInstrumentedTest.kt | 24 +++++++++---------- .../di/RemoteDataSourceModule.kt | 4 ++-- .../viewerreporter/ExampleUnitTest.kt | 11 ++++----- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/detekt-config.yml b/detekt-config.yml index 449dfd32b..ae683dab0 100644 --- a/detekt-config.yml +++ b/detekt-config.yml @@ -88,4 +88,6 @@ naming: active: false PackageNaming: packagePattern: '[a-z]+(\._?[_?A-Za-z0-9]*)*' + InvalidPackageDeclaration: + active: false diff --git a/remote/lectureevaluation/viewerreporter/src/androidTest/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleInstrumentedTest.kt b/remote/lectureevaluation/viewerreporter/src/androidTest/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleInstrumentedTest.kt index 3668fc019..140ce808c 100644 --- a/remote/lectureevaluation/viewerreporter/src/androidTest/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleInstrumentedTest.kt +++ b/remote/lectureevaluation/viewerreporter/src/androidTest/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleInstrumentedTest.kt @@ -1,13 +1,11 @@ package com.suwiki.remote.lectureevaluation.viewerreporter -import androidx.test.platform.app.InstrumentationRegistry import androidx.test.ext.junit.runners.AndroidJUnit4 - +import androidx.test.platform.app.InstrumentationRegistry +import junit.framework.TestCase.assertEquals import org.junit.Test import org.junit.runner.RunWith -import org.junit.Assert.* - /** * Instrumented test, which will execute on an Android device. * @@ -15,13 +13,13 @@ import org.junit.Assert.* */ @RunWith(AndroidJUnit4::class) class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals( - "com.suwiki.remote.lectureevaluation.viewerreporter.test", - appContext.packageName - ) - } + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals( + "com.suwiki.remote.lectureevaluation.viewerreporter.test", + appContext.packageName, + ) + } } diff --git a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt index 0911ad02d..5af04ec42 100644 --- a/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt +++ b/remote/lectureevaluation/viewerreporter/src/main/java/com/suwiki/remote/lectureevaluation/viewerreporter/di/RemoteDataSourceModule.kt @@ -1,9 +1,9 @@ package com.suwiki.remote.lectureevaluation.viewerreporter.di -import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteExamReportDataSource -import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteLectureReportDataSource import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteExamProviderDataSource +import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteExamReportDataSource import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteLectureProviderDataSource +import com.suwiki.data.lectureevaluation.viewerreporter.datasource.RemoteLectureReportDataSource import com.suwiki.remote.lectureevaluation.viewerreporter.datasource.RemoteExamProviderDataSourceImpl import com.suwiki.remote.lectureevaluation.viewerreporter.datasource.RemoteExamReportDataSourceImpl import com.suwiki.remote.lectureevaluation.viewerreporter.datasource.RemoteLectureProviderDataSourceImpl diff --git a/remote/lectureevaluation/viewerreporter/src/test/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleUnitTest.kt b/remote/lectureevaluation/viewerreporter/src/test/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleUnitTest.kt index 1948464e2..f1e860ee4 100644 --- a/remote/lectureevaluation/viewerreporter/src/test/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleUnitTest.kt +++ b/remote/lectureevaluation/viewerreporter/src/test/java/com/suwiki/remote/lectureevaluation/viewerreporter/ExampleUnitTest.kt @@ -1,17 +1,16 @@ package com.suwiki.remote.lectureevaluation.viewerreporter +import junit.framework.TestCase.assertEquals import org.junit.Test -import org.junit.Assert.* - /** * Example local unit test, which will execute on the development machine (host). * * See [testing documentation](http://d.android.com/tools/testing). */ class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } + @Test + fun addition_isCorrect() { + assertEquals(4, 2 + 2) + } }