This guide will help you to create a new data module in the project.
-
Create a new folder in the
data
folder with the name of the model (The name needs to inkebab case
, ex:profile
,travel-agent
). -
Create a new
build.gradle.kts
file in the new folder. -
Add the following code to the data module
build.gradle.kts
file:plugins { alias(libs.plugins.kotlinMultiplatform) alias(libs.plugins.androidLibrary) } kotlinMultiplatformSetup() koinSetup() kotlin { sourceSets.commonMain.dependencies { // Add your dependencies here } }
-
Add the data module to the project
settings.gradle.kts
file:// ... // Data modules include( // ... ":data:model-name", // ... ) // ...
-
Add the necessary folders to your data module, your folder structure should look like this:
data ├── model-name │ ├── src │ │ └── commonMain │ │ └── kotlin │ │ └── model-name │ └── build.gradle.kts
-
Now you can sync the project and start working on the new data module.
model-name is the name of the model in
kebab case
.