diff --git a/README.md b/README.md index a6e7f9e4..663ba17f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ ## Структура проекта * **Features** - набор **законченных** фич проекта. Считается, что любая фича, находящаяся в мастере может быть добавлена в - клиент и использована в нем. Исключением является `common` - это набор вещей, используемых везде. В подпунктах представлены - части, на которые *обычно* разделяется фича - * Common - общая для фичи часть. Тут, как правило, хранятся конвенции путей для сетевых соединений, общие типы и пр. - * Server - часть, включаемая в сервер для подключения фичи. Обычно содержит работу с бд, определение модулей сервера и пр. - * Client - часть с клиентским кодом. В большинстве своём включает работу с сервером, MVVM часть (View при этом должны - находиться в платформенной части, если их нельзя вынести в сommon часть клиента) + клиент и использована в нем. Исключением является `common` - это набор вещей, используемых везде. + * Части, на которые *обычно* разделяется фича + * Common - общая для фичи часть. Тут, как правило, хранятся конвенции путей для сетевых соединений, общие типы и пр. + * Server - часть, включаемая в сервер для подключения фичи. Обычно содержит работу с бд, определение модулей сервера и пр. + * Client - часть с клиентским кодом. В большинстве своём включает работу с сервером, MVVM часть (View при этом должны + находиться в платформенной части, если их нельзя вынести в сommon часть клиента) + * Также существует фича `client`, которая не является фичей самой по-себе. Фактически, это набор разных фич, который системно + отсутствуют в бэке и используются в основном для пробрасывания удобных `API` и `View` для клиента * **Services** - модули, отвечающие за клиент-серверную работу фич с точки зрения их взаимодействия. Например, в рамках сервисов должен быть добавлен модуль для постов - именно через сервисы будет происходить создание поста, его редактирование и удаление * **Client** - итоговый клиент. На момент написания этой доки (`Пн окт 25 12:56:41 +06 2021`) предполагается два варианта: diff --git a/features/client/template/client/build.gradle b/features/client/template/client/build.gradle new file mode 100644 index 00000000..f515c02a --- /dev/null +++ b/features/client/template/client/build.gradle @@ -0,0 +1,18 @@ +plugins { + id "org.jetbrains.kotlin.multiplatform" + id "org.jetbrains.kotlin.plugin.serialization" + id "com.android.library" +} + +apply from: "$mppProjectWithSerializationPresetPath" + +kotlin { + sourceSets { + commonMain { + dependencies { + api project(":postssystem.features.client.template.common") + api project(":postssystem.features.common.client") + } + } + } +} diff --git a/features/client/template/client/src/commonMain/kotlin/dev/inmo/postssystem/features/client/template/client/.gitkeep b/features/client/template/client/src/commonMain/kotlin/dev/inmo/postssystem/features/client/template/client/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/features/client/template/client/src/main/AndroidManifest.xml b/features/client/template/client/src/main/AndroidManifest.xml new file mode 100644 index 00000000..854a2d3d --- /dev/null +++ b/features/client/template/client/src/main/AndroidManifest.xml @@ -0,0 +1 @@ + diff --git a/features/client/template/common/build.gradle b/features/client/template/common/build.gradle new file mode 100644 index 00000000..d4a562e5 --- /dev/null +++ b/features/client/template/common/build.gradle @@ -0,0 +1,17 @@ +plugins { + id "org.jetbrains.kotlin.multiplatform" + id "org.jetbrains.kotlin.plugin.serialization" + id "com.android.library" +} + +apply from: "$mppProjectWithSerializationPresetPath" + +kotlin { + sourceSets { + commonMain { + dependencies { + api project(":postssystem.features.common.common") + } + } + } +} diff --git a/features/client/template/common/src/commonMain/kotlin/dev/inmo/postssystem/features/client/template/common/.gitkeep b/features/client/template/common/src/commonMain/kotlin/dev/inmo/postssystem/features/client/template/common/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/features/client/template/common/src/main/AndroidManifest.xml b/features/client/template/common/src/main/AndroidManifest.xml new file mode 100644 index 00000000..092e7502 --- /dev/null +++ b/features/client/template/common/src/main/AndroidManifest.xml @@ -0,0 +1 @@ + diff --git a/features/client/template/server/build.gradle b/features/client/template/server/build.gradle new file mode 100644 index 00000000..b770aeb3 --- /dev/null +++ b/features/client/template/server/build.gradle @@ -0,0 +1,17 @@ +plugins { + id "org.jetbrains.kotlin.multiplatform" + id "org.jetbrains.kotlin.plugin.serialization" +} + +apply from: "$mppJavaProjectPresetPath" + +kotlin { + sourceSets { + commonMain { + dependencies { + api project(":postssystem.features.client.template.common") + api project(":postssystem.features.common.server") + } + } + } +} diff --git a/features/client/template/server/src/jvmMain/kotlin/dev/inmo/postssystem/features/client/template/server/.gitkeep b/features/client/template/server/src/jvmMain/kotlin/dev/inmo/postssystem/features/client/template/server/.gitkeep new file mode 100644 index 00000000..e69de29b