diff --git a/app-imbd/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app-imbd/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 000000000..9572fa6cb --- /dev/null +++ b/app-imbd/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/app-imbd/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app-imbd/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 000000000..9572fa6cb --- /dev/null +++ b/app-imbd/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/i_core/common/.gitignore b/i_core/common/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/i_core/common/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/i_core/common/build.gradle.kts b/i_core/common/build.gradle.kts new file mode 100644 index 000000000..14866066f --- /dev/null +++ b/i_core/common/build.gradle.kts @@ -0,0 +1,31 @@ +plugins { + alias(libs.plugins.android.library) +} + +android { + namespace = "com.smmousavi.i_core.common" + compileSdk { + version = release(36) + } + + defaultConfig { + minSdk = 24 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + +} + +dependencies { + implementation(libs.androidx.appcompat) + implementation(libs.androidx.core.ktx) + implementation(libs.material) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.test.espresso.core) +} \ No newline at end of file diff --git a/i_core/common/consumer-rules.pro b/i_core/common/consumer-rules.pro new file mode 100644 index 000000000..e69de29bb diff --git a/i_core/common/proguard-rules.pro b/i_core/common/proguard-rules.pro new file mode 100644 index 000000000..481bb4348 --- /dev/null +++ b/i_core/common/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/i_core/common/src/androidTest/java/com/smmousavi/i_core/common/ExampleInstrumentedTest.kt b/i_core/common/src/androidTest/java/com/smmousavi/i_core/common/ExampleInstrumentedTest.kt new file mode 100644 index 000000000..50608bc5e --- /dev/null +++ b/i_core/common/src/androidTest/java/com/smmousavi/i_core/common/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.smmousavi.i_core.common + +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.smmousavi.i_core.common.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/i_core/common/src/main/AndroidManifest.xml b/i_core/common/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/i_core/common/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/i_core/common/src/test/java/com/smmousavi/i_core/common/ExampleUnitTest.kt b/i_core/common/src/test/java/com/smmousavi/i_core/common/ExampleUnitTest.kt new file mode 100644 index 000000000..0fd7cd271 --- /dev/null +++ b/i_core/common/src/test/java/com/smmousavi/i_core/common/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.smmousavi.i_core.common + +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) + } +} \ No newline at end of file diff --git a/i_core/data/.gitignore b/i_core/data/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/i_core/data/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/i_core/data/build.gradle.kts b/i_core/data/build.gradle.kts new file mode 100644 index 000000000..59ec0287f --- /dev/null +++ b/i_core/data/build.gradle.kts @@ -0,0 +1,26 @@ +plugins { + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.jacoco) + alias(libs.plugins.nowinandroid.hilt) + id("kotlinx-serialization") +} + +android { + namespace = "com.smmousavi.i_core.data" + testOptions.unitTests.isIncludeAndroidResources = true +} + +dependencies { + api(projects.iCore.common) + api(projects.iCore.database) + api(projects.iCore.network) + api(projects.iCore.domain) + + implementation(projects.core.analytics) + implementation(projects.core.notifications) + + testImplementation(libs.kotlinx.coroutines.test) + testImplementation(libs.kotlinx.serialization.json) + testImplementation(projects.core.datastoreTest) + testImplementation(projects.core.testing) +} \ No newline at end of file diff --git a/i_core/data/consumer-rules.pro b/i_core/data/consumer-rules.pro new file mode 100644 index 000000000..e69de29bb diff --git a/i_core/data/proguard-rules.pro b/i_core/data/proguard-rules.pro new file mode 100644 index 000000000..481bb4348 --- /dev/null +++ b/i_core/data/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/i_core/data/src/androidTest/java/com/smmousavi/i_core/data/ExampleInstrumentedTest.kt b/i_core/data/src/androidTest/java/com/smmousavi/i_core/data/ExampleInstrumentedTest.kt new file mode 100644 index 000000000..560828763 --- /dev/null +++ b/i_core/data/src/androidTest/java/com/smmousavi/i_core/data/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.smmousavi.i_core.data + +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.smmousavi.i_core.data.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/i_core/data/src/main/AndroidManifest.xml b/i_core/data/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/i_core/data/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/movies/DefaultMoviesRemoteDataSource.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/movies/DefaultMoviesRemoteDataSource.kt new file mode 100644 index 000000000..f6dd7ce61 --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/movies/DefaultMoviesRemoteDataSource.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.datasource.movies + +class DefaultMoviesRemoteDataSource { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/movies/MoviesRemoteDataSource.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/movies/MoviesRemoteDataSource.kt new file mode 100644 index 000000000..d98735c5b --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/movies/MoviesRemoteDataSource.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.datasource.movies + +interface MoviesRemoteDataSource { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/profile/DefaultUserProfileLocalDataSource.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/profile/DefaultUserProfileLocalDataSource.kt new file mode 100644 index 000000000..35755c44b --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/profile/DefaultUserProfileLocalDataSource.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.datasource.profile + +class DefaultUserProfileLocalDataSource { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/profile/UserProfileLocalDataSource.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/profile/UserProfileLocalDataSource.kt new file mode 100644 index 000000000..61853c5c3 --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/profile/UserProfileLocalDataSource.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.datasource.profile + +interface UserProfileLocalDataSource { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/search/DefaultSearchMovieRemoteDataSource.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/search/DefaultSearchMovieRemoteDataSource.kt new file mode 100644 index 000000000..97a599423 --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/search/DefaultSearchMovieRemoteDataSource.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.datasource.search + +class DefaultSearchMovieRemoteDataSource { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/search/SearchMovieRemoteDataSource.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/search/SearchMovieRemoteDataSource.kt new file mode 100644 index 000000000..bc45a2403 --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/datasource/search/SearchMovieRemoteDataSource.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.datasource.search + +interface SearchMovieRemoteDataSource { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/di/DataSourceModule.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/di/DataSourceModule.kt new file mode 100644 index 000000000..c0d3a95f9 --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/di/DataSourceModule.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.di + +object DataSourceModule { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/di/RepositoryModule.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/di/RepositoryModule.kt new file mode 100644 index 000000000..ea0a30d67 --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/di/RepositoryModule.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.di + +object RepositoryModule { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/mapper/MoviesMapper.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/mapper/MoviesMapper.kt new file mode 100644 index 000000000..b557bf087 --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/mapper/MoviesMapper.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.mapper + +object MoviesMapper { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/mapper/UserProfileMapper.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/mapper/UserProfileMapper.kt new file mode 100644 index 000000000..6ed97d1cd --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/mapper/UserProfileMapper.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.mapper + +object UserProfileMapper { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/repository/DefaultMoviesRepository.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/repository/DefaultMoviesRepository.kt new file mode 100644 index 000000000..c055d0325 --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/repository/DefaultMoviesRepository.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.repository + +class DefaultMoviesRepository { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/repository/DefaultSearchMoviesRepository.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/repository/DefaultSearchMoviesRepository.kt new file mode 100644 index 000000000..765e9a4ea --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/repository/DefaultSearchMoviesRepository.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.repository + +class DefaultSearchMoviesRepository { +} \ No newline at end of file diff --git a/i_core/data/src/main/java/com/smmousavi/i_core/data/repository/DefaultUserProfileRepository.kt b/i_core/data/src/main/java/com/smmousavi/i_core/data/repository/DefaultUserProfileRepository.kt new file mode 100644 index 000000000..77431a7db --- /dev/null +++ b/i_core/data/src/main/java/com/smmousavi/i_core/data/repository/DefaultUserProfileRepository.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.data.repository + +class DefaultUserProfileRepository { +} \ No newline at end of file diff --git a/i_core/data/src/test/java/com/smmousavi/i_core/data/ExampleUnitTest.kt b/i_core/data/src/test/java/com/smmousavi/i_core/data/ExampleUnitTest.kt new file mode 100644 index 000000000..74d90da84 --- /dev/null +++ b/i_core/data/src/test/java/com/smmousavi/i_core/data/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.smmousavi.i_core.data + +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) + } +} \ No newline at end of file diff --git a/i_core/database/.gitignore b/i_core/database/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/i_core/database/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/i_core/database/build.gradle.kts b/i_core/database/build.gradle.kts new file mode 100644 index 000000000..48b05ec4b --- /dev/null +++ b/i_core/database/build.gradle.kts @@ -0,0 +1,31 @@ +plugins { + alias(libs.plugins.android.library) +} + +android { + namespace = "com.smmousavi.i_core.database" + compileSdk { + version = release(36) + } + + defaultConfig { + minSdk = 24 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + +} + +dependencies { + implementation(libs.androidx.appcompat) + implementation(libs.androidx.core.ktx) + implementation(libs.material) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.test.espresso.core) +} \ No newline at end of file diff --git a/i_core/database/consumer-rules.pro b/i_core/database/consumer-rules.pro new file mode 100644 index 000000000..e69de29bb diff --git a/i_core/database/proguard-rules.pro b/i_core/database/proguard-rules.pro new file mode 100644 index 000000000..481bb4348 --- /dev/null +++ b/i_core/database/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/i_core/database/src/androidTest/java/com/smmousavi/i_core/database/ExampleInstrumentedTest.kt b/i_core/database/src/androidTest/java/com/smmousavi/i_core/database/ExampleInstrumentedTest.kt new file mode 100644 index 000000000..3f5410c60 --- /dev/null +++ b/i_core/database/src/androidTest/java/com/smmousavi/i_core/database/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.smmousavi.i_core.database + +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.smmousavi.i_core.database.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/i_core/database/src/main/AndroidManifest.xml b/i_core/database/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/i_core/database/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/i_core/database/src/main/java/com/smmousavi/i_core/database/UserProfileDatabase.kt b/i_core/database/src/main/java/com/smmousavi/i_core/database/UserProfileDatabase.kt new file mode 100644 index 000000000..3a7c5bf97 --- /dev/null +++ b/i_core/database/src/main/java/com/smmousavi/i_core/database/UserProfileDatabase.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.database + +class UserProfileDatabase { +} \ No newline at end of file diff --git a/i_core/database/src/main/java/com/smmousavi/i_core/database/dao/UseProfileDao.kt b/i_core/database/src/main/java/com/smmousavi/i_core/database/dao/UseProfileDao.kt new file mode 100644 index 000000000..a0878fab5 --- /dev/null +++ b/i_core/database/src/main/java/com/smmousavi/i_core/database/dao/UseProfileDao.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.database.dao + +interface UseProfileDao { +} \ No newline at end of file diff --git a/i_core/database/src/main/java/com/smmousavi/i_core/database/entity/UserProfileEntity.kt b/i_core/database/src/main/java/com/smmousavi/i_core/database/entity/UserProfileEntity.kt new file mode 100644 index 000000000..1bfe7c97d --- /dev/null +++ b/i_core/database/src/main/java/com/smmousavi/i_core/database/entity/UserProfileEntity.kt @@ -0,0 +1,19 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.database.entity + +data class UserProfileEntity(val id: Int) diff --git a/i_core/database/src/test/java/com/smmousavi/i_core/database/ExampleUnitTest.kt b/i_core/database/src/test/java/com/smmousavi/i_core/database/ExampleUnitTest.kt new file mode 100644 index 000000000..a2214dbe5 --- /dev/null +++ b/i_core/database/src/test/java/com/smmousavi/i_core/database/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.smmousavi.i_core.database + +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) + } +} \ No newline at end of file diff --git a/i_core/designsystem/.gitignore b/i_core/designsystem/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/i_core/designsystem/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/i_core/designsystem/build.gradle.kts b/i_core/designsystem/build.gradle.kts new file mode 100644 index 000000000..4ece79cf7 --- /dev/null +++ b/i_core/designsystem/build.gradle.kts @@ -0,0 +1,31 @@ +plugins { + alias(libs.plugins.android.library) +} + +android { + namespace = "com.smmousavi.i_core.designsystem" + compileSdk { + version = release(36) + } + + defaultConfig { + minSdk = 24 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + +} + +dependencies { + implementation(libs.androidx.appcompat) + implementation(libs.androidx.core.ktx) + implementation(libs.material) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.test.espresso.core) +} \ No newline at end of file diff --git a/i_core/designsystem/consumer-rules.pro b/i_core/designsystem/consumer-rules.pro new file mode 100644 index 000000000..e69de29bb diff --git a/i_core/designsystem/proguard-rules.pro b/i_core/designsystem/proguard-rules.pro new file mode 100644 index 000000000..481bb4348 --- /dev/null +++ b/i_core/designsystem/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/i_core/designsystem/src/androidTest/java/com/smmousavi/i_core/designsystem/ExampleInstrumentedTest.kt b/i_core/designsystem/src/androidTest/java/com/smmousavi/i_core/designsystem/ExampleInstrumentedTest.kt new file mode 100644 index 000000000..b90bc4e36 --- /dev/null +++ b/i_core/designsystem/src/androidTest/java/com/smmousavi/i_core/designsystem/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.smmousavi.i_core.designsystem + +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.smmousavi.i_core.designsystem.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/i_core/designsystem/src/main/AndroidManifest.xml b/i_core/designsystem/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/i_core/designsystem/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/i_core/designsystem/src/test/java/com/smmousavi/i_core/designsystem/ExampleUnitTest.kt b/i_core/designsystem/src/test/java/com/smmousavi/i_core/designsystem/ExampleUnitTest.kt new file mode 100644 index 000000000..a106a3a01 --- /dev/null +++ b/i_core/designsystem/src/test/java/com/smmousavi/i_core/designsystem/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.smmousavi.i_core.designsystem + +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) + } +} \ No newline at end of file diff --git a/i_core/domain/.gitignore b/i_core/domain/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/i_core/domain/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/i_core/domain/build.gradle.kts b/i_core/domain/build.gradle.kts new file mode 100644 index 000000000..8f37a40a5 --- /dev/null +++ b/i_core/domain/build.gradle.kts @@ -0,0 +1,18 @@ +plugins { + alias(libs.plugins.nowinandroid.android.library) + alias(libs.plugins.nowinandroid.android.library.jacoco) + id("com.google.devtools.ksp") +} + +android { + namespace = "com.smmousavi.domain" + +} + +dependencies { + api(projects.core.model) + + implementation(libs.javax.inject) + + testImplementation(projects.core.testing) +} \ No newline at end of file diff --git a/i_core/domain/consumer-rules.pro b/i_core/domain/consumer-rules.pro new file mode 100644 index 000000000..e69de29bb diff --git a/i_core/domain/proguard-rules.pro b/i_core/domain/proguard-rules.pro new file mode 100644 index 000000000..481bb4348 --- /dev/null +++ b/i_core/domain/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/i_core/domain/src/androidTest/java/com/smmousavi/domain/ExampleInstrumentedTest.kt b/i_core/domain/src/androidTest/java/com/smmousavi/domain/ExampleInstrumentedTest.kt new file mode 100644 index 000000000..bf4ec3807 --- /dev/null +++ b/i_core/domain/src/androidTest/java/com/smmousavi/domain/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.smmousavi.domain + +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.smmousavi.domain.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/i_core/domain/src/main/AndroidManifest.xml b/i_core/domain/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/i_core/domain/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/i_core/domain/src/main/java/com/smmousavi/domain/repository/MoviesRepository.kt b/i_core/domain/src/main/java/com/smmousavi/domain/repository/MoviesRepository.kt new file mode 100644 index 000000000..9b26a9251 --- /dev/null +++ b/i_core/domain/src/main/java/com/smmousavi/domain/repository/MoviesRepository.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.domain.repository + +interface MoviesRepository { +} \ No newline at end of file diff --git a/i_core/domain/src/main/java/com/smmousavi/domain/repository/SearchMovieRepository.kt b/i_core/domain/src/main/java/com/smmousavi/domain/repository/SearchMovieRepository.kt new file mode 100644 index 000000000..f48f26b4d --- /dev/null +++ b/i_core/domain/src/main/java/com/smmousavi/domain/repository/SearchMovieRepository.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.domain.repository + +interface SearchMovieRepository { +} \ No newline at end of file diff --git a/i_core/domain/src/main/java/com/smmousavi/domain/repository/UserProfileRepository.kt b/i_core/domain/src/main/java/com/smmousavi/domain/repository/UserProfileRepository.kt new file mode 100644 index 000000000..b85541dd4 --- /dev/null +++ b/i_core/domain/src/main/java/com/smmousavi/domain/repository/UserProfileRepository.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.domain.repository + +interface UserProfileRepository { +} \ No newline at end of file diff --git a/i_core/domain/src/main/java/com/smmousavi/domain/usecase/SearchMovieUseCase.kt b/i_core/domain/src/main/java/com/smmousavi/domain/usecase/SearchMovieUseCase.kt new file mode 100644 index 000000000..bbe4ff121 --- /dev/null +++ b/i_core/domain/src/main/java/com/smmousavi/domain/usecase/SearchMovieUseCase.kt @@ -0,0 +1,20 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.domain.usecase + +class SearchMovieUseCase { +} \ No newline at end of file diff --git a/i_core/domain/src/test/java/com/smmousavi/domain/ExampleUnitTest.kt b/i_core/domain/src/test/java/com/smmousavi/domain/ExampleUnitTest.kt new file mode 100644 index 000000000..8fff7f589 --- /dev/null +++ b/i_core/domain/src/test/java/com/smmousavi/domain/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.smmousavi.domain + +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) + } +} \ No newline at end of file diff --git a/i_core/model/.gitignore b/i_core/model/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/i_core/model/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/i_core/model/build.gradle.kts b/i_core/model/build.gradle.kts new file mode 100644 index 000000000..aedb75b7b --- /dev/null +++ b/i_core/model/build.gradle.kts @@ -0,0 +1,10 @@ +plugins { + alias(libs.plugins.nowinandroid.jvm.library) + id("kotlinx-serialization") +} + +dependencies { + api(libs.kotlinx.datetime) + + implementation(libs.kotlinx.serialization.json) +} \ No newline at end of file diff --git a/i_core/model/consumer-rules.pro b/i_core/model/consumer-rules.pro new file mode 100644 index 000000000..e69de29bb diff --git a/i_core/model/proguard-rules.pro b/i_core/model/proguard-rules.pro new file mode 100644 index 000000000..481bb4348 --- /dev/null +++ b/i_core/model/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/i_core/model/src/androidTest/java/com/smmousavi/i_core/model/ExampleInstrumentedTest.kt b/i_core/model/src/androidTest/java/com/smmousavi/i_core/model/ExampleInstrumentedTest.kt new file mode 100644 index 000000000..2e03c0ceb --- /dev/null +++ b/i_core/model/src/androidTest/java/com/smmousavi/i_core/model/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.smmousavi.i_core.model + +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.smmousavi.i_core.model.test", appContext.packageName) + } +} \ No newline at end of file diff --git a/i_core/model/src/main/AndroidManifest.xml b/i_core/model/src/main/AndroidManifest.xml new file mode 100644 index 000000000..a5918e68a --- /dev/null +++ b/i_core/model/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/CountriesModel.kt b/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/CountriesModel.kt new file mode 100644 index 000000000..8479edf19 --- /dev/null +++ b/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/CountriesModel.kt @@ -0,0 +1,44 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.model.domain + +data class CountriesModel(val countries: List) { + + companion object { + val DEFAULT = CountriesModel( + listOf( + CountryItemModel( + name = "Iran", + label = "IR", + ), + CountryItemModel( + name = "Costa Rica", + label = "CR", + ), + CountryItemModel( + name = "Cuba", + label = "CU", + ), + ), + ) + } +} + +data class CountryItemModel( + val name: String, + val label: String, +) \ No newline at end of file diff --git a/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/GenresModel.kt b/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/GenresModel.kt new file mode 100644 index 000000000..d0895c440 --- /dev/null +++ b/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/GenresModel.kt @@ -0,0 +1,19 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.model.domain + +data class GenresModel(val genres: List) \ No newline at end of file diff --git a/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/LanguagesModel.kt b/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/LanguagesModel.kt new file mode 100644 index 000000000..77394f7fb --- /dev/null +++ b/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/LanguagesModel.kt @@ -0,0 +1,19 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.model.domain + +data class LanguagesModel(val languages: List) \ No newline at end of file diff --git a/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/TypesModel.kt b/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/TypesModel.kt new file mode 100644 index 000000000..038f033da --- /dev/null +++ b/i_core/model/src/main/java/com/smmousavi/i_core/model/domain/TypesModel.kt @@ -0,0 +1,19 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.model.domain + +data class TypesModel(val types: List) diff --git a/i_core/model/src/test/java/com/smmousavi/i_core/model/ExampleUnitTest.kt b/i_core/model/src/test/java/com/smmousavi/i_core/model/ExampleUnitTest.kt new file mode 100644 index 000000000..649a86466 --- /dev/null +++ b/i_core/model/src/test/java/com/smmousavi/i_core/model/ExampleUnitTest.kt @@ -0,0 +1,17 @@ +package com.smmousavi.i_core.model + +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) + } +} \ No newline at end of file diff --git a/i_core/network/build.gradle.kts b/i_core/network/build.gradle.kts index fe6e28dc6..078550da6 100644 --- a/i_core/network/build.gradle.kts +++ b/i_core/network/build.gradle.kts @@ -40,6 +40,7 @@ android { dependencies { api(libs.kotlinx.datetime) + implementation(projects.iCore.model) implementation(libs.coil.kt) implementation(libs.coil.kt.svg) diff --git a/i_core/network/src/main/java/com/smmousavi/i_core/network/di/NetworkModule.kt b/i_core/network/src/main/java/com/smmousavi/i_core/network/di/NetworkModule.kt index 8716a7936..7f1137557 100644 --- a/i_core/network/src/main/java/com/smmousavi/i_core/network/di/NetworkModule.kt +++ b/i_core/network/src/main/java/com/smmousavi/i_core/network/di/NetworkModule.kt @@ -48,7 +48,6 @@ internal object NetworkModule { BuildConfig.API_KEY, ) .build() - chain.proceed(request) } diff --git a/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/CountriesDto.kt b/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/CountriesDto.kt new file mode 100644 index 000000000..e0d24ac23 --- /dev/null +++ b/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/CountriesDto.kt @@ -0,0 +1,28 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.network.dto + +import kotlinx.serialization.Serializable + +@Serializable +data class CountriesDto(val countries: List?) + +@Serializable +data class CountryItemDto( + val name: String?, + val label: String?, +) \ No newline at end of file diff --git a/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/GenresDto.kt b/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/GenresDto.kt new file mode 100644 index 000000000..ab6cc4dbd --- /dev/null +++ b/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/GenresDto.kt @@ -0,0 +1,22 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.network.dto + +import kotlinx.serialization.Serializable + +@Serializable +data class GenresDto(val genres: List?) \ No newline at end of file diff --git a/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/LanguagesDto.kt b/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/LanguagesDto.kt new file mode 100644 index 000000000..6af165e2e --- /dev/null +++ b/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/LanguagesDto.kt @@ -0,0 +1,22 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.network.dto + +import kotlinx.serialization.Serializable + +@Serializable +data class LanguagesDto(val languages: List?) \ No newline at end of file diff --git a/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/TypesDto.kt b/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/TypesDto.kt new file mode 100644 index 000000000..7a82b82db --- /dev/null +++ b/i_core/network/src/main/java/com/smmousavi/i_core/network/dto/TypesDto.kt @@ -0,0 +1,22 @@ +/* + * Copyright 2026 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.smmousavi.i_core.network.dto + +import kotlinx.serialization.Serializable + +@Serializable +data class TypesDto(val types: List?) \ No newline at end of file diff --git a/i_core/network/src/main/java/com/smmousavi/i_core/network/service/GeneralApiService.kt b/i_core/network/src/main/java/com/smmousavi/i_core/network/service/GeneralApiService.kt index 3c446c74e..c8310011c 100644 --- a/i_core/network/src/main/java/com/smmousavi/i_core/network/service/GeneralApiService.kt +++ b/i_core/network/src/main/java/com/smmousavi/i_core/network/service/GeneralApiService.kt @@ -16,5 +16,23 @@ package com.smmousavi.i_core.network.service +import com.smmousavi.i_core.network.dto.CountriesDto +import com.smmousavi.i_core.network.dto.GenresDto +import com.smmousavi.i_core.network.dto.LanguagesDto +import com.smmousavi.i_core.network.dto.TypesDto +import retrofit2.http.GET + interface GeneralApiService { + + @GET(value = "types") + suspend fun getTypes(): TypesDto + + @GET(value = "genres") + suspend fun getGenres(): GenresDto + + @GET(value = "countries") + suspend fun getCountries(): CountriesDto + + @GET(value = "languages") + suspend fun getLanguages(): LanguagesDto } \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index b20a44318..f5bf0c5c6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -95,3 +95,9 @@ check(JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) { https://developer.android.com/build/jdks#jdk-config-in-studio """.trimIndent() } +include(":i_core:model") +include(":i_core:domain") +include(":i_core:data") +include(":i_core:database") +include(":i_core:common") +include(":i_core:designsystem")