diff --git a/frontend/.idea/.gitignore b/frontend/.idea/.gitignore deleted file mode 100644 index 13566b8..0000000 --- a/frontend/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/frontend/compose-app/build-logic/.gitignore b/frontend/build-logic/.gitignore similarity index 100% rename from frontend/compose-app/build-logic/.gitignore rename to frontend/build-logic/.gitignore diff --git a/frontend/compose-app/build-logic/convention/build.gradle.kts b/frontend/build-logic/convention/build.gradle.kts similarity index 100% rename from frontend/compose-app/build-logic/convention/build.gradle.kts rename to frontend/build-logic/convention/build.gradle.kts diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidApplicationComposeConventionPlugin.kt b/frontend/build-logic/convention/src/main/kotlin/AndroidApplicationComposeConventionPlugin.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidApplicationComposeConventionPlugin.kt rename to frontend/build-logic/convention/src/main/kotlin/AndroidApplicationComposeConventionPlugin.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt b/frontend/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt rename to frontend/build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidApplicationFlavorsConventionPlugin.kt b/frontend/build-logic/convention/src/main/kotlin/AndroidApplicationFlavorsConventionPlugin.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidApplicationFlavorsConventionPlugin.kt rename to frontend/build-logic/convention/src/main/kotlin/AndroidApplicationFlavorsConventionPlugin.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt b/frontend/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt rename to frontend/build-logic/convention/src/main/kotlin/AndroidLibraryComposeConventionPlugin.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt b/frontend/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt similarity index 97% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt rename to frontend/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt index 049c8e4..d3b54d5 100644 --- a/frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt +++ b/frontend/build-logic/convention/src/main/kotlin/AndroidLibraryConventionPlugin.kt @@ -18,7 +18,6 @@ class AndroidLibraryConventionPlugin : Plugin { with(pluginManager) { apply("com.android.library") apply("org.jetbrains.kotlin.android") - apply("snakechat.android.lint") } extensions.configure { diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidLintConventionPlugin.kt b/frontend/build-logic/convention/src/main/kotlin/AndroidLintConventionPlugin.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidLintConventionPlugin.kt rename to frontend/build-logic/convention/src/main/kotlin/AndroidLintConventionPlugin.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt b/frontend/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt rename to frontend/build-logic/convention/src/main/kotlin/AndroidTestConventionPlugin.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidUiConventionPlugin.kt b/frontend/build-logic/convention/src/main/kotlin/AndroidUiConventionPlugin.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/AndroidUiConventionPlugin.kt rename to frontend/build-logic/convention/src/main/kotlin/AndroidUiConventionPlugin.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt b/frontend/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt similarity index 88% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt rename to frontend/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt index 23a8aea..f855dd8 100644 --- a/frontend/compose-app/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt +++ b/frontend/build-logic/convention/src/main/kotlin/JvmLibraryConventionPlugin.kt @@ -7,7 +7,6 @@ class JvmLibraryConventionPlugin : Plugin { with(target) { with(pluginManager) { apply("org.jetbrains.kotlin.jvm") - apply("snakechat.android.lint") } configureKotlinJvm() } diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/KotlinInjectConventionPlugin.kt b/frontend/build-logic/convention/src/main/kotlin/KotlinInjectConventionPlugin.kt similarity index 66% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/KotlinInjectConventionPlugin.kt rename to frontend/build-logic/convention/src/main/kotlin/KotlinInjectConventionPlugin.kt index 0424d64..36a0b5d 100644 --- a/frontend/compose-app/build-logic/convention/src/main/kotlin/KotlinInjectConventionPlugin.kt +++ b/frontend/build-logic/convention/src/main/kotlin/KotlinInjectConventionPlugin.kt @@ -10,7 +10,11 @@ class KotlinInjectConventionPlugin : Plugin { dependencies { add("ksp", libs.findLibrary("kotlininject.compiler").get()) add("implementation", libs.findLibrary("kotlininject.runtime").get()) - add("implementation", project(":libraries:inject")) + if (rootProject.name == "snakechat-common") { + add("implementation", project(":library:library-inject")) + } else { + add("implementation", "cc.snakechat:library-inject:1.0.0") + } } } } diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/LyricistConventionPlugin.kt b/frontend/build-logic/convention/src/main/kotlin/LyricistConventionPlugin.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/LyricistConventionPlugin.kt rename to frontend/build-logic/convention/src/main/kotlin/LyricistConventionPlugin.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/AndroidCompose.kt b/frontend/build-logic/convention/src/main/kotlin/cc/snakechat/AndroidCompose.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/AndroidCompose.kt rename to frontend/build-logic/convention/src/main/kotlin/cc/snakechat/AndroidCompose.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/AndroidInstrumentedTests.kt b/frontend/build-logic/convention/src/main/kotlin/cc/snakechat/AndroidInstrumentedTests.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/AndroidInstrumentedTests.kt rename to frontend/build-logic/convention/src/main/kotlin/cc/snakechat/AndroidInstrumentedTests.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/GradleManagedDevices.kt b/frontend/build-logic/convention/src/main/kotlin/cc/snakechat/GradleManagedDevices.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/GradleManagedDevices.kt rename to frontend/build-logic/convention/src/main/kotlin/cc/snakechat/GradleManagedDevices.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/KotlinAndroid.kt b/frontend/build-logic/convention/src/main/kotlin/cc/snakechat/KotlinAndroid.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/KotlinAndroid.kt rename to frontend/build-logic/convention/src/main/kotlin/cc/snakechat/KotlinAndroid.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/PrintTestApks.kt b/frontend/build-logic/convention/src/main/kotlin/cc/snakechat/PrintTestApks.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/PrintTestApks.kt rename to frontend/build-logic/convention/src/main/kotlin/cc/snakechat/PrintTestApks.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/ProjectExtensions.kt b/frontend/build-logic/convention/src/main/kotlin/cc/snakechat/ProjectExtensions.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/ProjectExtensions.kt rename to frontend/build-logic/convention/src/main/kotlin/cc/snakechat/ProjectExtensions.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/SnakeChatBuildType.kt b/frontend/build-logic/convention/src/main/kotlin/cc/snakechat/SnakeChatBuildType.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/SnakeChatBuildType.kt rename to frontend/build-logic/convention/src/main/kotlin/cc/snakechat/SnakeChatBuildType.kt diff --git a/frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/SnakeChatFlavor.kt b/frontend/build-logic/convention/src/main/kotlin/cc/snakechat/SnakeChatFlavor.kt similarity index 100% rename from frontend/compose-app/build-logic/convention/src/main/kotlin/cc/snakechat/SnakeChatFlavor.kt rename to frontend/build-logic/convention/src/main/kotlin/cc/snakechat/SnakeChatFlavor.kt diff --git a/frontend/compose-app/build-logic/gradle.properties b/frontend/build-logic/gradle.properties similarity index 100% rename from frontend/compose-app/build-logic/gradle.properties rename to frontend/build-logic/gradle.properties diff --git a/frontend/compose-app/gradle/libs.versions.toml b/frontend/build-logic/gradle/libs.versions.toml similarity index 82% rename from frontend/compose-app/gradle/libs.versions.toml rename to frontend/build-logic/gradle/libs.versions.toml index 57394ca..18bdbef 100644 --- a/frontend/compose-app/gradle/libs.versions.toml +++ b/frontend/build-logic/gradle/libs.versions.toml @@ -90,6 +90,27 @@ lyricist = { module = "cafe.adriel.lyricist:lyricist", version.ref = "lyricist" lyricist-processor = { module = "cafe.adriel.lyricist:lyricist-processor", version.ref = "lyricist" } result = { module = "com.michael-bull.kotlin-result:kotlin-result", version.ref = "result" } slf4j-android = { module = "org.slf4j:slf4j-android", version.ref = "slf4jAndroid" } +snakechat-data-network-common = { module = "cc.snakechat:data-network-common", version = "1.0.0" } +snakechat-data-network-fake = { module = "cc.snakechat:data-network-fake", version = "1.0.0" } +snakechat-data-network-feed-api = { module = "cc.snakechat:data-network-feed-api", version = "1.0.0" } +snakechat-data-network-feed-impl = { module = "cc.snakechat:data-network-feed-impl", version = "1.0.0" } +snakechat-data-network-post-api = { module = "cc.snakechat:data-network-post-api", version = "1.0.0" } +snakechat-data-network-post-impl = { module = "cc.snakechat:data-network-post-impl", version = "1.0.0" } +snakechat-data-network-profile-api = { module = "cc.snakechat:data-network-profile-api", version = "1.0.0" } +snakechat-data-network-profile-impl = { module = "cc.snakechat:data-network-profile-impl", version = "1.0.0" } + +snakechat-domain-common = { module = "cc.snakechat:domain-common", version = "1.0.0" } +snakechat-domain-common-model = { module = "cc.snakechat:domain-common-model", version = "1.0.0" } +snakechat-domain-feed = { module = "cc.snakechat:domain-feed", version = "1.0.0" } +snakechat-domain-model-likers = { module = "cc.snakechat:domain-model-likers", version = "1.0.0" } +snakechat-domain-post = { module = "cc.snakechat:domain-post", version = "1.0.0" } +snakechat-domain-profile = { module = "cc.snakechat:domain-profile", version = "1.0.0" } + +snakechat-library-imageLoading = { module = "cc.snakechat:library-imageloading", version = "1.0.0" } +snakechat-library-inject = { module = "cc.snakechat:library-inject", version = "1.0.0" } +snakechat-library-json = { module = "cc.snakechat:library-json", version = "1.0.0" } +snakechat-library-ktorClient = { module = "cc.snakechat:library-ktor-client", version = "1.0.0" } +snakechat-library-test = { module = "cc.snakechat:library-test", version = "1.0.0" } [plugins] android-application = { id = "com.android.application", version.ref = "agp" } diff --git a/frontend/build-logic/gradle/wrapper/gradle-wrapper.jar b/frontend/build-logic/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..249e583 Binary files /dev/null and b/frontend/build-logic/gradle/wrapper/gradle-wrapper.jar differ diff --git a/frontend/build-logic/gradle/wrapper/gradle-wrapper.properties b/frontend/build-logic/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..92c6207 --- /dev/null +++ b/frontend/build-logic/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Sun Oct 06 20:23:49 IST 2024 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/frontend/compose-app/build-logic/settings.gradle.kts b/frontend/build-logic/settings.gradle.kts similarity index 68% rename from frontend/compose-app/build-logic/settings.gradle.kts rename to frontend/build-logic/settings.gradle.kts index 9a010ae..b6a8919 100644 --- a/frontend/compose-app/build-logic/settings.gradle.kts +++ b/frontend/build-logic/settings.gradle.kts @@ -10,11 +10,6 @@ dependencyResolutionManagement { google() mavenCentral() } - versionCatalogs { - create("libs") { - from(files("../gradle/libs.versions.toml")) - } - } } rootProject.name = "build-logic" diff --git a/frontend/common/.gitignore b/frontend/common/.gitignore new file mode 100644 index 0000000..0dff2b0 --- /dev/null +++ b/frontend/common/.gitignore @@ -0,0 +1,43 @@ +.gradle +local.properties +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### Kotlin ### +.kotlin + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/frontend/common/build.gradle.kts b/frontend/common/build.gradle.kts new file mode 100644 index 0000000..3abce01 --- /dev/null +++ b/frontend/common/build.gradle.kts @@ -0,0 +1,14 @@ +plugins { + alias(libs.plugins.android.library) apply false + alias(libs.plugins.kotlin.jvm) apply false + alias(libs.plugins.kotlin.serialization) apply false + alias(libs.plugins.ksp) apply false + alias(libs.plugins.module.graph) apply true // Plugin applied to allow module graph generation + alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.kotlin.parcelize) apply false +} + +allprojects { + group = "cc.snakechat" + version = "1.0.0" +} \ No newline at end of file diff --git a/frontend/compose-app/data/network/common/.gitignore b/frontend/common/data/network/common/.gitignore similarity index 100% rename from frontend/compose-app/data/network/common/.gitignore rename to frontend/common/data/network/common/.gitignore diff --git a/frontend/compose-app/data/network/common/build.gradle.kts b/frontend/common/data/network/common/build.gradle.kts similarity index 68% rename from frontend/compose-app/data/network/common/build.gradle.kts rename to frontend/common/data/network/common/build.gradle.kts index bb2ef5f..d2a49a4 100644 --- a/frontend/compose-app/data/network/common/build.gradle.kts +++ b/frontend/common/data/network/common/build.gradle.kts @@ -4,5 +4,5 @@ plugins { dependencies { api(libs.result) - api(projects.libraries.ktorClient) + api(projects.library.libraryKtorClient) } \ No newline at end of file diff --git a/frontend/compose-app/data/network/common/src/main/java/cc/snakechat/data/network/ApiCall.kt b/frontend/common/data/network/common/src/main/java/cc/snakechat/data/network/ApiCall.kt similarity index 100% rename from frontend/compose-app/data/network/common/src/main/java/cc/snakechat/data/network/ApiCall.kt rename to frontend/common/data/network/common/src/main/java/cc/snakechat/data/network/ApiCall.kt diff --git a/frontend/compose-app/data/network/common/src/main/java/cc/snakechat/data/network/NetworkError.kt b/frontend/common/data/network/common/src/main/java/cc/snakechat/data/network/NetworkError.kt similarity index 100% rename from frontend/compose-app/data/network/common/src/main/java/cc/snakechat/data/network/NetworkError.kt rename to frontend/common/data/network/common/src/main/java/cc/snakechat/data/network/NetworkError.kt diff --git a/frontend/compose-app/data/network/fake/.gitignore b/frontend/common/data/network/fake/.gitignore similarity index 100% rename from frontend/compose-app/data/network/fake/.gitignore rename to frontend/common/data/network/fake/.gitignore diff --git a/frontend/compose-app/data/network/fake/build.gradle.kts b/frontend/common/data/network/fake/build.gradle.kts similarity index 66% rename from frontend/compose-app/data/network/fake/build.gradle.kts rename to frontend/common/data/network/fake/build.gradle.kts index 462c1a2..d3b6980 100644 --- a/frontend/compose-app/data/network/fake/build.gradle.kts +++ b/frontend/common/data/network/fake/build.gradle.kts @@ -6,9 +6,9 @@ plugins { android.namespace = "cc.snakechat.data" dependencies { - api(projects.data.network.feed.api) - api(projects.data.network.post.api) - api(projects.data.network.profile.api) + api(projects.data.network.feed.dataNetworkFeedApi) + api(projects.data.network.post.dataNetworkPostApi) + api(projects.data.network.profile.dataNetworkProfileApi) api(libs.result) implementation(libs.kotlinx.serialization) } diff --git a/frontend/compose-app/data/network/fake/src/main/AndroidManifest.xml b/frontend/common/data/network/fake/src/main/AndroidManifest.xml similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/AndroidManifest.xml rename to frontend/common/data/network/fake/src/main/AndroidManifest.xml diff --git a/frontend/compose-app/data/network/fake/src/main/assets/comments/post_comments_1.json b/frontend/common/data/network/fake/src/main/assets/comments/post_comments_1.json similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/assets/comments/post_comments_1.json rename to frontend/common/data/network/fake/src/main/assets/comments/post_comments_1.json diff --git a/frontend/compose-app/data/network/fake/src/main/assets/comments/post_comments_2.json b/frontend/common/data/network/fake/src/main/assets/comments/post_comments_2.json similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/assets/comments/post_comments_2.json rename to frontend/common/data/network/fake/src/main/assets/comments/post_comments_2.json diff --git a/frontend/compose-app/data/network/fake/src/main/assets/feed/trending_feed_1.json b/frontend/common/data/network/fake/src/main/assets/feed/trending_feed_1.json similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/assets/feed/trending_feed_1.json rename to frontend/common/data/network/fake/src/main/assets/feed/trending_feed_1.json diff --git a/frontend/compose-app/data/network/fake/src/main/assets/feed/trending_feed_2.json b/frontend/common/data/network/fake/src/main/assets/feed/trending_feed_2.json similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/assets/feed/trending_feed_2.json rename to frontend/common/data/network/fake/src/main/assets/feed/trending_feed_2.json diff --git a/frontend/compose-app/data/network/fake/src/main/assets/follows/follows_1.json b/frontend/common/data/network/fake/src/main/assets/follows/follows_1.json similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/assets/follows/follows_1.json rename to frontend/common/data/network/fake/src/main/assets/follows/follows_1.json diff --git a/frontend/compose-app/data/network/fake/src/main/assets/follows/follows_2.json b/frontend/common/data/network/fake/src/main/assets/follows/follows_2.json similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/assets/follows/follows_2.json rename to frontend/common/data/network/fake/src/main/assets/follows/follows_2.json diff --git a/frontend/compose-app/data/network/fake/src/main/assets/likers/comment_likers_1.json b/frontend/common/data/network/fake/src/main/assets/likers/comment_likers_1.json similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/assets/likers/comment_likers_1.json rename to frontend/common/data/network/fake/src/main/assets/likers/comment_likers_1.json diff --git a/frontend/compose-app/data/network/fake/src/main/assets/likers/comment_likers_2.json b/frontend/common/data/network/fake/src/main/assets/likers/comment_likers_2.json similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/assets/likers/comment_likers_2.json rename to frontend/common/data/network/fake/src/main/assets/likers/comment_likers_2.json diff --git a/frontend/compose-app/data/network/fake/src/main/assets/likers/post_likers_1.json b/frontend/common/data/network/fake/src/main/assets/likers/post_likers_1.json similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/assets/likers/post_likers_1.json rename to frontend/common/data/network/fake/src/main/assets/likers/post_likers_1.json diff --git a/frontend/compose-app/data/network/fake/src/main/assets/likers/post_likers_2.json b/frontend/common/data/network/fake/src/main/assets/likers/post_likers_2.json similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/assets/likers/post_likers_2.json rename to frontend/common/data/network/fake/src/main/assets/likers/post_likers_2.json diff --git a/frontend/compose-app/data/network/fake/src/main/assets/profile/profile_1.json b/frontend/common/data/network/fake/src/main/assets/profile/profile_1.json similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/assets/profile/profile_1.json rename to frontend/common/data/network/fake/src/main/assets/profile/profile_1.json diff --git a/frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/feed/FakeFeedApi.kt b/frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/feed/FakeFeedApi.kt similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/feed/FakeFeedApi.kt rename to frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/feed/FakeFeedApi.kt diff --git a/frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/feed/FeedApiComponent.kt b/frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/feed/FeedApiComponent.kt similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/feed/FeedApiComponent.kt rename to frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/feed/FeedApiComponent.kt diff --git a/frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/post/FakePostApi.kt b/frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/post/FakePostApi.kt similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/post/FakePostApi.kt rename to frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/post/FakePostApi.kt diff --git a/frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/post/PostApiComponent.kt b/frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/post/PostApiComponent.kt similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/post/PostApiComponent.kt rename to frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/post/PostApiComponent.kt diff --git a/frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/profile/FakeProfileApi.kt b/frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/profile/FakeProfileApi.kt similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/profile/FakeProfileApi.kt rename to frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/profile/FakeProfileApi.kt diff --git a/frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/profile/ProfileApiComponent.kt b/frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/profile/ProfileApiComponent.kt similarity index 100% rename from frontend/compose-app/data/network/fake/src/main/kotlin/cc/snakechat/data/profile/ProfileApiComponent.kt rename to frontend/common/data/network/fake/src/main/kotlin/cc/snakechat/data/profile/ProfileApiComponent.kt diff --git a/frontend/compose-app/data/network/feed/api/.gitignore b/frontend/common/data/network/feed/api/.gitignore similarity index 100% rename from frontend/compose-app/data/network/feed/api/.gitignore rename to frontend/common/data/network/feed/api/.gitignore diff --git a/frontend/compose-app/data/network/feed/api/build.gradle.kts b/frontend/common/data/network/feed/api/build.gradle.kts similarity index 100% rename from frontend/compose-app/data/network/feed/api/build.gradle.kts rename to frontend/common/data/network/feed/api/build.gradle.kts diff --git a/frontend/compose-app/data/network/feed/api/src/main/java/cc/snakechat/data/feed/FeedApi.kt b/frontend/common/data/network/feed/api/src/main/java/cc/snakechat/data/feed/FeedApi.kt similarity index 100% rename from frontend/compose-app/data/network/feed/api/src/main/java/cc/snakechat/data/feed/FeedApi.kt rename to frontend/common/data/network/feed/api/src/main/java/cc/snakechat/data/feed/FeedApi.kt diff --git a/frontend/compose-app/data/network/feed/api/src/main/java/cc/snakechat/data/feed/TrendingFeedResponse.kt b/frontend/common/data/network/feed/api/src/main/java/cc/snakechat/data/feed/TrendingFeedResponse.kt similarity index 100% rename from frontend/compose-app/data/network/feed/api/src/main/java/cc/snakechat/data/feed/TrendingFeedResponse.kt rename to frontend/common/data/network/feed/api/src/main/java/cc/snakechat/data/feed/TrendingFeedResponse.kt diff --git a/frontend/compose-app/data/network/feed/impl/.gitignore b/frontend/common/data/network/feed/impl/.gitignore similarity index 100% rename from frontend/compose-app/data/network/feed/impl/.gitignore rename to frontend/common/data/network/feed/impl/.gitignore diff --git a/frontend/compose-app/data/network/profile/impl/build.gradle.kts b/frontend/common/data/network/feed/impl/build.gradle.kts similarity index 70% rename from frontend/compose-app/data/network/profile/impl/build.gradle.kts rename to frontend/common/data/network/feed/impl/build.gradle.kts index 04429d1..c04ab2c 100644 --- a/frontend/compose-app/data/network/profile/impl/build.gradle.kts +++ b/frontend/common/data/network/feed/impl/build.gradle.kts @@ -7,6 +7,6 @@ plugins { dependencies { implementation(libs.kotlinx.serialization) implementation(libs.kotlinx.coroutines.core) - implementation(projects.libraries.ktorClient) - api(projects.data.network.profile.api) + implementation(projects.library.libraryKtorClient) + api(projects.data.network.feed.dataNetworkFeedApi) } \ No newline at end of file diff --git a/frontend/compose-app/data/network/feed/impl/src/main/java/cc/snakechat/data/feed/FeedApiComponent.kt b/frontend/common/data/network/feed/impl/src/main/java/cc/snakechat/data/feed/FeedApiComponent.kt similarity index 100% rename from frontend/compose-app/data/network/feed/impl/src/main/java/cc/snakechat/data/feed/FeedApiComponent.kt rename to frontend/common/data/network/feed/impl/src/main/java/cc/snakechat/data/feed/FeedApiComponent.kt diff --git a/frontend/compose-app/data/network/feed/impl/src/main/java/cc/snakechat/data/feed/RealFeedApi.kt b/frontend/common/data/network/feed/impl/src/main/java/cc/snakechat/data/feed/RealFeedApi.kt similarity index 100% rename from frontend/compose-app/data/network/feed/impl/src/main/java/cc/snakechat/data/feed/RealFeedApi.kt rename to frontend/common/data/network/feed/impl/src/main/java/cc/snakechat/data/feed/RealFeedApi.kt diff --git a/frontend/compose-app/data/network/post/api/.gitignore b/frontend/common/data/network/post/api/.gitignore similarity index 100% rename from frontend/compose-app/data/network/post/api/.gitignore rename to frontend/common/data/network/post/api/.gitignore diff --git a/frontend/compose-app/data/network/post/api/build.gradle.kts b/frontend/common/data/network/post/api/build.gradle.kts similarity index 100% rename from frontend/compose-app/data/network/post/api/build.gradle.kts rename to frontend/common/data/network/post/api/build.gradle.kts diff --git a/frontend/compose-app/data/network/post/api/src/main/java/cc/snakechat/data/post/PostApi.kt b/frontend/common/data/network/post/api/src/main/java/cc/snakechat/data/post/PostApi.kt similarity index 100% rename from frontend/compose-app/data/network/post/api/src/main/java/cc/snakechat/data/post/PostApi.kt rename to frontend/common/data/network/post/api/src/main/java/cc/snakechat/data/post/PostApi.kt diff --git a/frontend/compose-app/data/network/post/api/src/main/java/cc/snakechat/data/post/comment/PostCommentsResponse.kt b/frontend/common/data/network/post/api/src/main/java/cc/snakechat/data/post/comment/PostCommentsResponse.kt similarity index 100% rename from frontend/compose-app/data/network/post/api/src/main/java/cc/snakechat/data/post/comment/PostCommentsResponse.kt rename to frontend/common/data/network/post/api/src/main/java/cc/snakechat/data/post/comment/PostCommentsResponse.kt diff --git a/frontend/compose-app/data/network/post/api/src/main/java/cc/snakechat/data/post/like/Liker.kt b/frontend/common/data/network/post/api/src/main/java/cc/snakechat/data/post/like/Liker.kt similarity index 100% rename from frontend/compose-app/data/network/post/api/src/main/java/cc/snakechat/data/post/like/Liker.kt rename to frontend/common/data/network/post/api/src/main/java/cc/snakechat/data/post/like/Liker.kt diff --git a/frontend/compose-app/data/network/post/api/src/main/java/cc/snakechat/data/post/like/LikersResponse.kt b/frontend/common/data/network/post/api/src/main/java/cc/snakechat/data/post/like/LikersResponse.kt similarity index 100% rename from frontend/compose-app/data/network/post/api/src/main/java/cc/snakechat/data/post/like/LikersResponse.kt rename to frontend/common/data/network/post/api/src/main/java/cc/snakechat/data/post/like/LikersResponse.kt diff --git a/frontend/compose-app/data/network/post/impl/.gitignore b/frontend/common/data/network/post/impl/.gitignore similarity index 100% rename from frontend/compose-app/data/network/post/impl/.gitignore rename to frontend/common/data/network/post/impl/.gitignore diff --git a/frontend/compose-app/data/network/post/impl/build.gradle.kts b/frontend/common/data/network/post/impl/build.gradle.kts similarity index 70% rename from frontend/compose-app/data/network/post/impl/build.gradle.kts rename to frontend/common/data/network/post/impl/build.gradle.kts index 3ca597a..bd192b9 100644 --- a/frontend/compose-app/data/network/post/impl/build.gradle.kts +++ b/frontend/common/data/network/post/impl/build.gradle.kts @@ -7,6 +7,6 @@ plugins { dependencies { implementation(libs.kotlinx.serialization) implementation(libs.kotlinx.coroutines.core) - implementation(projects.libraries.ktorClient) - api(projects.data.network.post.api) + implementation(projects.library.libraryKtorClient) + api(projects.data.network.post.dataNetworkPostApi) } \ No newline at end of file diff --git a/frontend/compose-app/data/network/post/impl/src/main/java/cc/snakechat/data/post/PostApiComponent.kt b/frontend/common/data/network/post/impl/src/main/java/cc/snakechat/data/post/PostApiComponent.kt similarity index 100% rename from frontend/compose-app/data/network/post/impl/src/main/java/cc/snakechat/data/post/PostApiComponent.kt rename to frontend/common/data/network/post/impl/src/main/java/cc/snakechat/data/post/PostApiComponent.kt diff --git a/frontend/compose-app/data/network/post/impl/src/main/java/cc/snakechat/data/post/RealPostApi.kt b/frontend/common/data/network/post/impl/src/main/java/cc/snakechat/data/post/RealPostApi.kt similarity index 100% rename from frontend/compose-app/data/network/post/impl/src/main/java/cc/snakechat/data/post/RealPostApi.kt rename to frontend/common/data/network/post/impl/src/main/java/cc/snakechat/data/post/RealPostApi.kt diff --git a/frontend/compose-app/data/network/profile/api/.gitignore b/frontend/common/data/network/profile/api/.gitignore similarity index 100% rename from frontend/compose-app/data/network/profile/api/.gitignore rename to frontend/common/data/network/profile/api/.gitignore diff --git a/frontend/compose-app/data/network/profile/api/build.gradle.kts b/frontend/common/data/network/profile/api/build.gradle.kts similarity index 79% rename from frontend/compose-app/data/network/profile/api/build.gradle.kts rename to frontend/common/data/network/profile/api/build.gradle.kts index abe84ca..bbed262 100644 --- a/frontend/compose-app/data/network/profile/api/build.gradle.kts +++ b/frontend/common/data/network/profile/api/build.gradle.kts @@ -5,6 +5,6 @@ plugins { dependencies { implementation(libs.kotlinx.serialization) - api(projects.data.network.common) + api(projects.data.network.dataNetworkCommon) api(libs.result) } \ No newline at end of file diff --git a/frontend/compose-app/data/network/profile/api/src/main/java/cc/snakechat/data/profile/FollowsResponse.kt b/frontend/common/data/network/profile/api/src/main/java/cc/snakechat/data/profile/FollowsResponse.kt similarity index 100% rename from frontend/compose-app/data/network/profile/api/src/main/java/cc/snakechat/data/profile/FollowsResponse.kt rename to frontend/common/data/network/profile/api/src/main/java/cc/snakechat/data/profile/FollowsResponse.kt diff --git a/frontend/compose-app/data/network/profile/api/src/main/java/cc/snakechat/data/profile/ProfileApi.kt b/frontend/common/data/network/profile/api/src/main/java/cc/snakechat/data/profile/ProfileApi.kt similarity index 100% rename from frontend/compose-app/data/network/profile/api/src/main/java/cc/snakechat/data/profile/ProfileApi.kt rename to frontend/common/data/network/profile/api/src/main/java/cc/snakechat/data/profile/ProfileApi.kt diff --git a/frontend/compose-app/data/network/profile/api/src/main/java/cc/snakechat/data/profile/ProfileResponse.kt b/frontend/common/data/network/profile/api/src/main/java/cc/snakechat/data/profile/ProfileResponse.kt similarity index 100% rename from frontend/compose-app/data/network/profile/api/src/main/java/cc/snakechat/data/profile/ProfileResponse.kt rename to frontend/common/data/network/profile/api/src/main/java/cc/snakechat/data/profile/ProfileResponse.kt diff --git a/frontend/compose-app/data/network/profile/impl/.gitignore b/frontend/common/data/network/profile/impl/.gitignore similarity index 100% rename from frontend/compose-app/data/network/profile/impl/.gitignore rename to frontend/common/data/network/profile/impl/.gitignore diff --git a/frontend/compose-app/data/network/feed/impl/build.gradle.kts b/frontend/common/data/network/profile/impl/build.gradle.kts similarity index 69% rename from frontend/compose-app/data/network/feed/impl/build.gradle.kts rename to frontend/common/data/network/profile/impl/build.gradle.kts index 59f8abe..b70f9c8 100644 --- a/frontend/compose-app/data/network/feed/impl/build.gradle.kts +++ b/frontend/common/data/network/profile/impl/build.gradle.kts @@ -7,6 +7,6 @@ plugins { dependencies { implementation(libs.kotlinx.serialization) implementation(libs.kotlinx.coroutines.core) - implementation(projects.libraries.ktorClient) - api(projects.data.network.feed.api) + implementation(projects.library.libraryKtorClient) + api(projects.data.network.profile.dataNetworkProfileApi) } \ No newline at end of file diff --git a/frontend/compose-app/data/network/profile/impl/src/main/java/cc/snakechat/data/profile/ProfileApiComponent.kt b/frontend/common/data/network/profile/impl/src/main/java/cc/snakechat/data/profile/ProfileApiComponent.kt similarity index 100% rename from frontend/compose-app/data/network/profile/impl/src/main/java/cc/snakechat/data/profile/ProfileApiComponent.kt rename to frontend/common/data/network/profile/impl/src/main/java/cc/snakechat/data/profile/ProfileApiComponent.kt diff --git a/frontend/compose-app/data/network/profile/impl/src/main/java/cc/snakechat/data/profile/RealProfileApi.kt b/frontend/common/data/network/profile/impl/src/main/java/cc/snakechat/data/profile/RealProfileApi.kt similarity index 100% rename from frontend/compose-app/data/network/profile/impl/src/main/java/cc/snakechat/data/profile/RealProfileApi.kt rename to frontend/common/data/network/profile/impl/src/main/java/cc/snakechat/data/profile/RealProfileApi.kt diff --git a/frontend/compose-app/domain/common-model/.gitignore b/frontend/common/domain/common-model/.gitignore similarity index 100% rename from frontend/compose-app/domain/common-model/.gitignore rename to frontend/common/domain/common-model/.gitignore diff --git a/frontend/compose-app/domain/common-model/build.gradle.kts b/frontend/common/domain/common-model/build.gradle.kts similarity index 100% rename from frontend/compose-app/domain/common-model/build.gradle.kts rename to frontend/common/domain/common-model/build.gradle.kts diff --git a/frontend/compose-app/domain/common-model/src/main/kotlin/cc/snakechat/domain/model/common/ContentId.kt b/frontend/common/domain/common-model/src/main/kotlin/cc/snakechat/domain/model/common/ContentId.kt similarity index 100% rename from frontend/compose-app/domain/common-model/src/main/kotlin/cc/snakechat/domain/model/common/ContentId.kt rename to frontend/common/domain/common-model/src/main/kotlin/cc/snakechat/domain/model/common/ContentId.kt diff --git a/frontend/compose-app/domain/common-model/src/main/kotlin/cc/snakechat/domain/model/common/FollowListType.kt b/frontend/common/domain/common-model/src/main/kotlin/cc/snakechat/domain/model/common/FollowListType.kt similarity index 100% rename from frontend/compose-app/domain/common-model/src/main/kotlin/cc/snakechat/domain/model/common/FollowListType.kt rename to frontend/common/domain/common-model/src/main/kotlin/cc/snakechat/domain/model/common/FollowListType.kt diff --git a/frontend/compose-app/domain/common/.gitignore b/frontend/common/domain/common/.gitignore similarity index 100% rename from frontend/compose-app/domain/common/.gitignore rename to frontend/common/domain/common/.gitignore diff --git a/frontend/compose-app/domain/common/build.gradle.kts b/frontend/common/domain/common/build.gradle.kts similarity index 100% rename from frontend/compose-app/domain/common/build.gradle.kts rename to frontend/common/domain/common/build.gradle.kts diff --git a/frontend/compose-app/domain/common/src/main/java/cc/snakechat/domain/common/DomainError.kt b/frontend/common/domain/common/src/main/java/cc/snakechat/domain/common/DomainError.kt similarity index 100% rename from frontend/compose-app/domain/common/src/main/java/cc/snakechat/domain/common/DomainError.kt rename to frontend/common/domain/common/src/main/java/cc/snakechat/domain/common/DomainError.kt diff --git a/frontend/compose-app/domain/common/src/main/java/cc/snakechat/domain/common/ObservePagingData.kt b/frontend/common/domain/common/src/main/java/cc/snakechat/domain/common/ObservePagingData.kt similarity index 100% rename from frontend/compose-app/domain/common/src/main/java/cc/snakechat/domain/common/ObservePagingData.kt rename to frontend/common/domain/common/src/main/java/cc/snakechat/domain/common/ObservePagingData.kt diff --git a/frontend/compose-app/domain/common/src/main/java/cc/snakechat/domain/common/SimplePagingSource.kt b/frontend/common/domain/common/src/main/java/cc/snakechat/domain/common/SimplePagingSource.kt similarity index 100% rename from frontend/compose-app/domain/common/src/main/java/cc/snakechat/domain/common/SimplePagingSource.kt rename to frontend/common/domain/common/src/main/java/cc/snakechat/domain/common/SimplePagingSource.kt diff --git a/frontend/compose-app/domain/feed/.gitignore b/frontend/common/domain/feed/.gitignore similarity index 100% rename from frontend/compose-app/domain/feed/.gitignore rename to frontend/common/domain/feed/.gitignore diff --git a/frontend/compose-app/domain/feed/build.gradle.kts b/frontend/common/domain/feed/build.gradle.kts similarity index 67% rename from frontend/compose-app/domain/feed/build.gradle.kts rename to frontend/common/domain/feed/build.gradle.kts index 98dd604..1f1e966 100644 --- a/frontend/compose-app/domain/feed/build.gradle.kts +++ b/frontend/common/domain/feed/build.gradle.kts @@ -5,7 +5,7 @@ plugins { dependencies { implementation(libs.kotlinx.coroutines.core) - implementation(projects.data.network.feed.api) + implementation(projects.data.network.feed.dataNetworkFeedApi) implementation(libs.androidx.paging.common) - api(projects.domain.common) + api(projects.domain.domainCommon) } diff --git a/frontend/compose-app/domain/feed/src/main/java/cc/snakechat/domain/feed/FeedComponent.kt b/frontend/common/domain/feed/src/main/java/cc/snakechat/domain/feed/FeedComponent.kt similarity index 100% rename from frontend/compose-app/domain/feed/src/main/java/cc/snakechat/domain/feed/FeedComponent.kt rename to frontend/common/domain/feed/src/main/java/cc/snakechat/domain/feed/FeedComponent.kt diff --git a/frontend/compose-app/domain/feed/src/main/java/cc/snakechat/domain/feed/ObserveTrendingFeedPageData.kt b/frontend/common/domain/feed/src/main/java/cc/snakechat/domain/feed/ObserveTrendingFeedPageData.kt similarity index 100% rename from frontend/compose-app/domain/feed/src/main/java/cc/snakechat/domain/feed/ObserveTrendingFeedPageData.kt rename to frontend/common/domain/feed/src/main/java/cc/snakechat/domain/feed/ObserveTrendingFeedPageData.kt diff --git a/frontend/compose-app/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeed.kt b/frontend/common/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeed.kt similarity index 100% rename from frontend/compose-app/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeed.kt rename to frontend/common/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeed.kt diff --git a/frontend/compose-app/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeedFetcher.kt b/frontend/common/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeedFetcher.kt similarity index 100% rename from frontend/compose-app/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeedFetcher.kt rename to frontend/common/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeedFetcher.kt diff --git a/frontend/compose-app/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeedPagingSource.kt b/frontend/common/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeedPagingSource.kt similarity index 100% rename from frontend/compose-app/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeedPagingSource.kt rename to frontend/common/domain/feed/src/main/java/cc/snakechat/domain/feed/TrendingFeedPagingSource.kt diff --git a/frontend/compose-app/domain/post/.gitignore b/frontend/common/domain/post/.gitignore similarity index 100% rename from frontend/compose-app/domain/post/.gitignore rename to frontend/common/domain/post/.gitignore diff --git a/frontend/compose-app/domain/post/build.gradle.kts b/frontend/common/domain/post/build.gradle.kts similarity index 59% rename from frontend/compose-app/domain/post/build.gradle.kts rename to frontend/common/domain/post/build.gradle.kts index c44a959..c52ea51 100644 --- a/frontend/compose-app/domain/post/build.gradle.kts +++ b/frontend/common/domain/post/build.gradle.kts @@ -5,8 +5,8 @@ plugins { dependencies { implementation(libs.kotlinx.coroutines.core) - implementation(projects.data.network.post.api) + implementation(projects.data.network.post.dataNetworkPostApi) implementation(libs.androidx.paging.common) - api(projects.domain.common) - api(projects.domain.commonModel) + api(projects.domain.domainCommon) + api(projects.domain.domainCommonModel) } diff --git a/frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/PostComponent.kt b/frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/PostComponent.kt similarity index 100% rename from frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/PostComponent.kt rename to frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/PostComponent.kt diff --git a/frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/Comment.kt b/frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/Comment.kt similarity index 100% rename from frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/Comment.kt rename to frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/Comment.kt diff --git a/frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/ObservePostLikersPageData.kt b/frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/ObservePostLikersPageData.kt similarity index 100% rename from frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/ObservePostLikersPageData.kt rename to frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/ObservePostLikersPageData.kt diff --git a/frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/PostCommentsFetcher.kt b/frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/PostCommentsFetcher.kt similarity index 100% rename from frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/PostCommentsFetcher.kt rename to frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/comment/PostCommentsFetcher.kt diff --git a/frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/Likers.kt b/frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/Likers.kt similarity index 100% rename from frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/Likers.kt rename to frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/Likers.kt diff --git a/frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/LikersFetcher.kt b/frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/LikersFetcher.kt similarity index 100% rename from frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/LikersFetcher.kt rename to frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/LikersFetcher.kt diff --git a/frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/ObservePostLikersPageData.kt b/frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/ObservePostLikersPageData.kt similarity index 100% rename from frontend/compose-app/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/ObservePostLikersPageData.kt rename to frontend/common/domain/post/src/main/kotlin/cc/snakechat/domain/post/like/ObservePostLikersPageData.kt diff --git a/frontend/compose-app/domain/profile/.gitignore b/frontend/common/domain/profile/.gitignore similarity index 100% rename from frontend/compose-app/domain/profile/.gitignore rename to frontend/common/domain/profile/.gitignore diff --git a/frontend/compose-app/domain/profile/build.gradle.kts b/frontend/common/domain/profile/build.gradle.kts similarity index 58% rename from frontend/compose-app/domain/profile/build.gradle.kts rename to frontend/common/domain/profile/build.gradle.kts index 40bf65c..5f67a64 100644 --- a/frontend/compose-app/domain/profile/build.gradle.kts +++ b/frontend/common/domain/profile/build.gradle.kts @@ -5,8 +5,8 @@ plugins { dependencies { implementation(libs.kotlinx.coroutines.core) - implementation(projects.data.network.profile.api) + implementation(projects.data.network.profile.dataNetworkProfileApi) implementation(libs.androidx.paging.common) - api(projects.domain.common) - api(projects.domain.commonModel) + api(projects.domain.domainCommon) + api(projects.domain.domainCommonModel) } diff --git a/frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/FollowListFetcher.kt b/frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/FollowListFetcher.kt similarity index 100% rename from frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/FollowListFetcher.kt rename to frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/FollowListFetcher.kt diff --git a/frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/Follows.kt b/frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/Follows.kt similarity index 100% rename from frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/Follows.kt rename to frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/Follows.kt diff --git a/frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/GetUserProfile.kt b/frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/GetUserProfile.kt similarity index 100% rename from frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/GetUserProfile.kt rename to frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/GetUserProfile.kt diff --git a/frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ObserveFollowListPageData.kt b/frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ObserveFollowListPageData.kt similarity index 100% rename from frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ObserveFollowListPageData.kt rename to frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ObserveFollowListPageData.kt diff --git a/frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ProfileComponent.kt b/frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ProfileComponent.kt similarity index 100% rename from frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ProfileComponent.kt rename to frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ProfileComponent.kt diff --git a/frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ProfileResponse.kt b/frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ProfileResponse.kt similarity index 100% rename from frontend/compose-app/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ProfileResponse.kt rename to frontend/common/domain/profile/src/main/kotlin/cc/snakechat/domain/profile/ProfileResponse.kt diff --git a/frontend/common/gradle.properties b/frontend/common/gradle.properties new file mode 100644 index 0000000..1b88f7e --- /dev/null +++ b/frontend/common/gradle.properties @@ -0,0 +1,13 @@ +kotlin.code.style=official +android.useAndroidX=true +# Disable build features that are enabled by default, +# https://developer.android.com/build/releases/gradle-plugin#default-changes +android.defaults.buildfeatures.resvalues=false +android.defaults.buildfeatures.shaders=false + +# Enables namespacing of each library's R class so that its R class includes only the +# resources declared in the library itself and none from the library's dependencies, +# thereby reducing the size of the R class for that library +android.nonTransitiveRClass=true + +android.enableR8.fullMode=true diff --git a/frontend/common/gradle/wrapper/gradle-wrapper.jar b/frontend/common/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..249e583 Binary files /dev/null and b/frontend/common/gradle/wrapper/gradle-wrapper.jar differ diff --git a/frontend/common/gradle/wrapper/gradle-wrapper.properties b/frontend/common/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..92c6207 --- /dev/null +++ b/frontend/common/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Sun Oct 06 20:23:49 IST 2024 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/frontend/common/gradlew b/frontend/common/gradlew new file mode 100755 index 0000000..1b6c787 --- /dev/null +++ b/frontend/common/gradlew @@ -0,0 +1,234 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# 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. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/frontend/common/gradlew.bat b/frontend/common/gradlew.bat new file mode 100644 index 0000000..107acd3 --- /dev/null +++ b/frontend/common/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/frontend/compose-app/libraries/imageloading/.gitignore b/frontend/common/library/imageloading/.gitignore similarity index 100% rename from frontend/compose-app/libraries/imageloading/.gitignore rename to frontend/common/library/imageloading/.gitignore diff --git a/frontend/compose-app/libraries/imageloading/build.gradle.kts b/frontend/common/library/imageloading/build.gradle.kts similarity index 100% rename from frontend/compose-app/libraries/imageloading/build.gradle.kts rename to frontend/common/library/imageloading/build.gradle.kts diff --git a/frontend/compose-app/libraries/imageloading/src/main/AndroidManifest.xml b/frontend/common/library/imageloading/src/main/AndroidManifest.xml similarity index 100% rename from frontend/compose-app/libraries/imageloading/src/main/AndroidManifest.xml rename to frontend/common/library/imageloading/src/main/AndroidManifest.xml diff --git a/frontend/compose-app/libraries/imageloading/src/main/kotlin/cc/snakechat/imageloading/ImageLoadingComponent.kt b/frontend/common/library/imageloading/src/main/kotlin/cc/snakechat/imageloading/ImageLoadingComponent.kt similarity index 100% rename from frontend/compose-app/libraries/imageloading/src/main/kotlin/cc/snakechat/imageloading/ImageLoadingComponent.kt rename to frontend/common/library/imageloading/src/main/kotlin/cc/snakechat/imageloading/ImageLoadingComponent.kt diff --git a/frontend/compose-app/libraries/inject/.gitignore b/frontend/common/library/inject/.gitignore similarity index 100% rename from frontend/compose-app/libraries/inject/.gitignore rename to frontend/common/library/inject/.gitignore diff --git a/frontend/compose-app/libraries/inject/build.gradle.kts b/frontend/common/library/inject/build.gradle.kts similarity index 100% rename from frontend/compose-app/libraries/inject/build.gradle.kts rename to frontend/common/library/inject/build.gradle.kts diff --git a/frontend/compose-app/libraries/inject/src/main/kotlin/cc/snakechat/inject/Scopes.kt b/frontend/common/library/inject/src/main/kotlin/cc/snakechat/inject/Scopes.kt similarity index 100% rename from frontend/compose-app/libraries/inject/src/main/kotlin/cc/snakechat/inject/Scopes.kt rename to frontend/common/library/inject/src/main/kotlin/cc/snakechat/inject/Scopes.kt diff --git a/frontend/compose-app/libraries/json/.gitignore b/frontend/common/library/json/.gitignore similarity index 100% rename from frontend/compose-app/libraries/json/.gitignore rename to frontend/common/library/json/.gitignore diff --git a/frontend/compose-app/libraries/json/build.gradle.kts b/frontend/common/library/json/build.gradle.kts similarity index 100% rename from frontend/compose-app/libraries/json/build.gradle.kts rename to frontend/common/library/json/build.gradle.kts diff --git a/frontend/compose-app/libraries/json/src/main/kotlin/cc/snakechat/json/JsonComponent.kt b/frontend/common/library/json/src/main/kotlin/cc/snakechat/json/JsonComponent.kt similarity index 100% rename from frontend/compose-app/libraries/json/src/main/kotlin/cc/snakechat/json/JsonComponent.kt rename to frontend/common/library/json/src/main/kotlin/cc/snakechat/json/JsonComponent.kt diff --git a/frontend/compose-app/libraries/ktor-client/.gitignore b/frontend/common/library/ktor-client/.gitignore similarity index 100% rename from frontend/compose-app/libraries/ktor-client/.gitignore rename to frontend/common/library/ktor-client/.gitignore diff --git a/frontend/compose-app/libraries/ktor-client/build.gradle.kts b/frontend/common/library/ktor-client/build.gradle.kts similarity index 100% rename from frontend/compose-app/libraries/ktor-client/build.gradle.kts rename to frontend/common/library/ktor-client/build.gradle.kts diff --git a/frontend/compose-app/libraries/ktor-client/src/main/kotlin/cc/snakechat/ktorclient/ApiKey.kt b/frontend/common/library/ktor-client/src/main/kotlin/cc/snakechat/ktorclient/ApiKey.kt similarity index 100% rename from frontend/compose-app/libraries/ktor-client/src/main/kotlin/cc/snakechat/ktorclient/ApiKey.kt rename to frontend/common/library/ktor-client/src/main/kotlin/cc/snakechat/ktorclient/ApiKey.kt diff --git a/frontend/compose-app/libraries/ktor-client/src/main/kotlin/cc/snakechat/ktorclient/HttpClient.kt b/frontend/common/library/ktor-client/src/main/kotlin/cc/snakechat/ktorclient/HttpClient.kt similarity index 100% rename from frontend/compose-app/libraries/ktor-client/src/main/kotlin/cc/snakechat/ktorclient/HttpClient.kt rename to frontend/common/library/ktor-client/src/main/kotlin/cc/snakechat/ktorclient/HttpClient.kt diff --git a/frontend/compose-app/libraries/test/.gitignore b/frontend/common/library/test/.gitignore similarity index 100% rename from frontend/compose-app/libraries/test/.gitignore rename to frontend/common/library/test/.gitignore diff --git a/frontend/compose-app/libraries/test/build.gradle.kts b/frontend/common/library/test/build.gradle.kts similarity index 100% rename from frontend/compose-app/libraries/test/build.gradle.kts rename to frontend/common/library/test/build.gradle.kts diff --git a/frontend/compose-app/libraries/test/src/main/AndroidManifest.xml b/frontend/common/library/test/src/main/AndroidManifest.xml similarity index 100% rename from frontend/compose-app/libraries/test/src/main/AndroidManifest.xml rename to frontend/common/library/test/src/main/AndroidManifest.xml diff --git a/frontend/compose-app/libraries/test/src/main/kotlin/cc/snakechat/imageloading/ImageLoadingComponent.kt b/frontend/common/library/test/src/main/kotlin/cc/snakechat/imageloading/ImageLoadingComponent.kt similarity index 100% rename from frontend/compose-app/libraries/test/src/main/kotlin/cc/snakechat/imageloading/ImageLoadingComponent.kt rename to frontend/common/library/test/src/main/kotlin/cc/snakechat/imageloading/ImageLoadingComponent.kt diff --git a/frontend/common/settings.gradle.kts b/frontend/common/settings.gradle.kts new file mode 100644 index 0000000..eb039a1 --- /dev/null +++ b/frontend/common/settings.gradle.kts @@ -0,0 +1,63 @@ +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") +enableFeaturePreview("STABLE_CONFIGURATION_CACHE") + +pluginManagement { + includeBuild("../build-logic") + repositories { + google { + content { + includeGroupByRegex("com\\.android.*") + includeGroupByRegex("com\\.google.*") + includeGroupByRegex("androidx.*") + } + } + mavenCentral() + gradlePluginPortal() + } +} + + +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } + versionCatalogs { + create("libs") { + from(files("../build-logic/gradle/libs.versions.toml")) + } + } +} + +rootProject.name = "snakechat-common" + +val projects = arrayOf( + ":library:inject", + ":library:ktor-client", + ":library:json", + ":library:imageloading", + ":library:test", + + ":data:network:common", + ":data:network:fake", + ":data:network:feed:api", + ":data:network:feed:impl", + ":data:network:post:api", + ":data:network:post:impl", + ":data:network:profile:api", + ":data:network:profile:impl", + + + ":domain:common", + ":domain:common-model", + ":domain:feed", + ":domain:post", + ":domain:profile", +) + +include(*projects) + +projects.forEach { path -> + project(path).name = path.removePrefix(":").replace(":", "-") +} \ No newline at end of file diff --git a/frontend/compose-app/app/build.gradle.kts b/frontend/compose-app/app/build.gradle.kts index 5c83df5..4983466 100644 --- a/frontend/compose-app/app/build.gradle.kts +++ b/frontend/compose-app/app/build.gradle.kts @@ -79,20 +79,20 @@ dependencies { implementation(projects.ui.comments) implementation(projects.ui.profile) - implementation(projects.libraries.ktorClient) - implementation(projects.libraries.json) - prodImplementation(projects.libraries.imageloading) - demoImplementation(projects.libraries.test) + implementation(libs.snakechat.library.ktorClient) + implementation(libs.snakechat.library.json) + prodImplementation(libs.snakechat.library.imageLoading) + demoImplementation(libs.snakechat.library.test) - implementation(projects.domain.feed) - implementation(projects.domain.post) - implementation(projects.domain.profile) + implementation(libs.snakechat.domain.feed) + implementation(libs.snakechat.domain.post) + implementation(libs.snakechat.domain.profile) debugImplementation(libs.slf4j.android) - demoImplementation(projects.data.network.fake) - prodImplementation(projects.data.network.feed.impl) - prodImplementation(projects.data.network.post.impl) - prodImplementation(projects.data.network.profile.impl) + demoImplementation(libs.snakechat.data.network.fake) + prodImplementation(libs.snakechat.data.network.feed.impl) + prodImplementation(libs.snakechat.data.network.post.impl) + prodImplementation(libs.snakechat.data.network.profile.impl) testImplementation(libs.junit) androidTestImplementation(libs.androidx.junit) diff --git a/frontend/compose-app/lint/build.gradle.kts b/frontend/compose-app/lint/build.gradle.kts index f39c76d..b4f047b 100644 --- a/frontend/compose-app/lint/build.gradle.kts +++ b/frontend/compose-app/lint/build.gradle.kts @@ -1,6 +1,7 @@ plugins { `java-library` alias(libs.plugins.snakechat.jvm.library) + alias(libs.plugins.snakechat.android.lint) } dependencies { diff --git a/frontend/compose-app/settings.gradle.kts b/frontend/compose-app/settings.gradle.kts index 88bed88..21cfa9c 100644 --- a/frontend/compose-app/settings.gradle.kts +++ b/frontend/compose-app/settings.gradle.kts @@ -1,8 +1,8 @@ enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") enableFeaturePreview("STABLE_CONFIGURATION_CACHE") -includeBuild("build-logic") pluginManagement { + includeBuild("../build-logic") repositories { google { content { @@ -15,23 +15,25 @@ pluginManagement { gradlePluginPortal() } } -plugins { - id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" -} + dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() } + versionCatalogs { + create("libs") { + from(files("../build-logic/gradle/libs.versions.toml")) + } + } } -rootProject.name = "SnakeChat" +rootProject.name = "snakechat-compose" include(":app") include(":lint") -include(":libraries:inject") -include(":libraries:ktor-client") +includeBuild("../common") include(":macrobenchmark") @@ -43,24 +45,3 @@ include(":ui:common") include(":ui:comments") include(":ui:profile") -include(":domain:common") -include(":domain:common-model") -include(":domain:feed") -include(":domain:post") -include(":domain:profile") - -include(":domain:model:likers") - -include(":data:network:common") -include(":data:network:feed:api") -include(":data:network:feed:impl") -include(":data:network:post:api") -include(":data:network:post:impl") -include(":data:network:profile:api") -include(":data:network:profile:impl") - - -include(":data:network:fake") -include(":libraries:json") -include(":libraries:imageloading") -include(":libraries:test") diff --git a/frontend/compose-app/ui/comments/build.gradle.kts b/frontend/compose-app/ui/comments/build.gradle.kts index d3b72ba..1ea8783 100644 --- a/frontend/compose-app/ui/comments/build.gradle.kts +++ b/frontend/compose-app/ui/comments/build.gradle.kts @@ -8,7 +8,7 @@ dependencies { implementation(projects.ui.common) implementation(projects.ui.likers) implementation(projects.ui.profile) - implementation(projects.domain.post) + implementation(libs.snakechat.domain.post) implementation(projects.ui.strings) implementation(libs.androidx.paging.compose) } \ No newline at end of file diff --git a/frontend/compose-app/ui/common/build.gradle.kts b/frontend/compose-app/ui/common/build.gradle.kts index 9b684d9..f778cd9 100644 --- a/frontend/compose-app/ui/common/build.gradle.kts +++ b/frontend/compose-app/ui/common/build.gradle.kts @@ -7,5 +7,5 @@ android.namespace = "cc.snakechat.ui.common" dependencies { api(libs.androidx.paging.compose) api(libs.result) - api(projects.domain.commonModel) + api(libs.snakechat.domain.common.model) } \ No newline at end of file diff --git a/frontend/compose-app/ui/home/build.gradle.kts b/frontend/compose-app/ui/home/build.gradle.kts index 7e473d2..cf87811 100644 --- a/frontend/compose-app/ui/home/build.gradle.kts +++ b/frontend/compose-app/ui/home/build.gradle.kts @@ -14,7 +14,7 @@ dependencies { implementation(projects.ui.likers) implementation(projects.ui.comments) implementation(projects.ui.profile) - implementation(projects.domain.feed) - implementation(projects.domain.commonModel) + implementation(libs.snakechat.domain.feed) + implementation(libs.snakechat.domain.common.model) implementation(libs.kotlinx.serialization) } \ No newline at end of file diff --git a/frontend/compose-app/ui/likers/build.gradle.kts b/frontend/compose-app/ui/likers/build.gradle.kts index 8b6bc91..55f2ec2 100644 --- a/frontend/compose-app/ui/likers/build.gradle.kts +++ b/frontend/compose-app/ui/likers/build.gradle.kts @@ -7,7 +7,7 @@ android.namespace = "cc.snakechat.likers" dependencies { implementation(projects.ui.common) implementation(projects.ui.profile) - implementation(projects.domain.post) + implementation(libs.snakechat.domain.post) implementation(projects.ui.strings) implementation(libs.androidx.paging.compose) } \ No newline at end of file diff --git a/frontend/compose-app/ui/profile/build.gradle.kts b/frontend/compose-app/ui/profile/build.gradle.kts index 5aea289..d354e5b 100644 --- a/frontend/compose-app/ui/profile/build.gradle.kts +++ b/frontend/compose-app/ui/profile/build.gradle.kts @@ -6,6 +6,6 @@ android.namespace = "cc.snakechat.profile" dependencies { implementation(projects.ui.common) - implementation(projects.domain.profile) + implementation(libs.snakechat.domain.profile) implementation(projects.ui.strings) } \ No newline at end of file