
Library with tools for coroutines, serialization, database interaction, and networking. Modules include common utilities, selection tools, MIME types, pagination, and repository patterns, with a structured approach for complex modules.
This is a library with collection of tools for working in Kotlin environment. First of all, this library collection is oriented to use next technologies:
You always can look at the properties file to get information about current project dependencies, compile and build tools for Android target.
common contains common tools for platform which usually are absent out-of-the-box when you starting projectselector contains tools to use Selector interface with things like RecyclerView in android or other selection needscoroutines is a module for Kotlin Coroutines with different things like subscribing on flows (onEach + launchIn shortcut :) )ktor is a set of modules for clients and serversmime_types is NOT lightweight set of MimeTypes with a lot of different objected and serializable (with Kotlin Serialization) mime typespagination is a complex of modules (explanation in Complex modules structure section) for lightweight paginationserialization is a collection of projects with serializers for kotlinx.serialization
repos is a complex of modules (explanation in Complex modules structure section) for KeyValue/OneToMany/CRUD repos created to be able to exclude some heavy dependencies when you need some simple and lightweight typical repositoriesMost of complex modules are built with next hierarchy:
common submodule for API things which are common for all platformsexposed submodule contains realizations for exposed tablesktor submodule is usually unavailable directly, because it contains its own submodules for clients and servers
common part contains routes which are common for clients and serversclient submodule contains clients which are usually using UnifiedRequester to make requests using routes from ktor/common module and some internal logic of requestsserver submodule (in most cases JVM-only) contains some extensions for Route instances which usually will give opportunity to proxy internet requests from ktor/client realization to some proxy objectAll templates can be used by applying them in your project's build.gradle files using the apply from directive. For example:
apply from: "$defaultProject"In the sample has been used defaultProject.gradle as a basic template.
The project includes a collection of Gradle templates to simplify project setup and configuration. These templates are located in the gradle/templates directory and can be used to quickly set up different types of projects:
defaultProject.gradle (usage apply from: "$defaultProject") - Basic project configurationdefaultProjectWithSerialization.gradle (usage apply from: "$defaultProjectWithSerialization") - Project configuration with Kotlin Serialization supportmppJavaProject.gradle (usage apply from: "$mppJavaProject") - Multiplatform project with Java supportmppAndroidProject.gradle (usage apply from: "$mppAndroidProject") - Multiplatform project with Android supportenableMPPAndroid.gradle (usage apply from: "$enableMPPAndroid") - Enable Android target in multiplatform projectenableMPPJs.gradle (usage apply from: "$enableMPPJs") - Enable JavaScript target in multiplatform projectenableMPPJvm.gradle (usage apply from: "$enableMPPJvm") - Enable JVM target in multiplatform projectenableMPPNativeArm64.gradle (usage apply from: "$enableMPPNativeArm64") - Enable ARM64 native targetenableMPPNativeX64.gradle (usage apply from: "$enableMPPNativeX64") - Enable x64 native targetenableMPPWasmJs.gradle (usage apply from: "$enableMPPWasmJs") - Enable WebAssembly JavaScript targetaddCompose.gradle (usage apply from: "$addCompose") - Basic Compose configurationaddComposeForAndroid.gradle (usage apply from: "$addComposeForAndroid") - Compose configuration for AndroidaddComposeForDesktop.gradle (usage apply from: "$addComposeForDesktop") - Compose configuration for DesktopaddComposeForJs.gradle (usage apply from: "$addComposeForJs") - Compose configuration for JavaScriptpublish.gradle (usage apply from: "$publish") - General publishing configurationpublish_jvm.gradle (usage apply from: "$publish_jvm") - JVM-specific publishing configurationpublish.kpsb and publish_jvm.kpsb (usage apply from: "$publish_kpsb" and apply from: "$publish_jvm_kpsb") - Publishing configuration for Kotlin Multiplatform and JVMmppJvmJsWasmJsLinuxMingwProject.gradle (usage apply from: "$mppJvmJsWasmJsLinuxMingwProject") - Multiplatform project for JVM, JS, Wasm, Linux, and MinGWmppJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project.gradle (usage apply from: "$mppJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project") - Multiplatform project with additional Android and ARM64 supportmppComposeJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project.gradle (usage apply from: "$mppComposeJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project") - Multiplatform project with Compose supportmppProjectWithSerializationAndCompose.gradle (usage apply from: "$mppProjectWithSerializationAndCompose") - Multiplatform project with both Serialization and Compose supportThis is a library with collection of tools for working in Kotlin environment. First of all, this library collection is oriented to use next technologies:
You always can look at the properties file to get information about current project dependencies, compile and build tools for Android target.
common contains common tools for platform which usually are absent out-of-the-box when you starting projectselector contains tools to use Selector interface with things like RecyclerView in android or other selection needscoroutines is a module for Kotlin Coroutines with different things like subscribing on flows (onEach + launchIn shortcut :) )ktor is a set of modules for clients and serversmime_types is NOT lightweight set of MimeTypes with a lot of different objected and serializable (with Kotlin Serialization) mime typespagination is a complex of modules (explanation in Complex modules structure section) for lightweight paginationserialization is a collection of projects with serializers for kotlinx.serialization
repos is a complex of modules (explanation in Complex modules structure section) for KeyValue/OneToMany/CRUD repos created to be able to exclude some heavy dependencies when you need some simple and lightweight typical repositoriesMost of complex modules are built with next hierarchy:
common submodule for API things which are common for all platformsexposed submodule contains realizations for exposed tablesktor submodule is usually unavailable directly, because it contains its own submodules for clients and servers
common part contains routes which are common for clients and serversclient submodule contains clients which are usually using UnifiedRequester to make requests using routes from ktor/common module and some internal logic of requestsserver submodule (in most cases JVM-only) contains some extensions for Route instances which usually will give opportunity to proxy internet requests from ktor/client realization to some proxy objectAll templates can be used by applying them in your project's build.gradle files using the apply from directive. For example:
apply from: "$defaultProject"In the sample has been used defaultProject.gradle as a basic template.
The project includes a collection of Gradle templates to simplify project setup and configuration. These templates are located in the gradle/templates directory and can be used to quickly set up different types of projects:
defaultProject.gradle (usage apply from: "$defaultProject") - Basic project configurationdefaultProjectWithSerialization.gradle (usage apply from: "$defaultProjectWithSerialization") - Project configuration with Kotlin Serialization supportmppJavaProject.gradle (usage apply from: "$mppJavaProject") - Multiplatform project with Java supportmppAndroidProject.gradle (usage apply from: "$mppAndroidProject") - Multiplatform project with Android supportenableMPPAndroid.gradle (usage apply from: "$enableMPPAndroid") - Enable Android target in multiplatform projectenableMPPJs.gradle (usage apply from: "$enableMPPJs") - Enable JavaScript target in multiplatform projectenableMPPJvm.gradle (usage apply from: "$enableMPPJvm") - Enable JVM target in multiplatform projectenableMPPNativeArm64.gradle (usage apply from: "$enableMPPNativeArm64") - Enable ARM64 native targetenableMPPNativeX64.gradle (usage apply from: "$enableMPPNativeX64") - Enable x64 native targetenableMPPWasmJs.gradle (usage apply from: "$enableMPPWasmJs") - Enable WebAssembly JavaScript targetaddCompose.gradle (usage apply from: "$addCompose") - Basic Compose configurationaddComposeForAndroid.gradle (usage apply from: "$addComposeForAndroid") - Compose configuration for AndroidaddComposeForDesktop.gradle (usage apply from: "$addComposeForDesktop") - Compose configuration for DesktopaddComposeForJs.gradle (usage apply from: "$addComposeForJs") - Compose configuration for JavaScriptpublish.gradle (usage apply from: "$publish") - General publishing configurationpublish_jvm.gradle (usage apply from: "$publish_jvm") - JVM-specific publishing configurationpublish.kpsb and publish_jvm.kpsb (usage apply from: "$publish_kpsb" and apply from: "$publish_jvm_kpsb") - Publishing configuration for Kotlin Multiplatform and JVMmppJvmJsWasmJsLinuxMingwProject.gradle (usage apply from: "$mppJvmJsWasmJsLinuxMingwProject") - Multiplatform project for JVM, JS, Wasm, Linux, and MinGWmppJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project.gradle (usage apply from: "$mppJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project") - Multiplatform project with additional Android and ARM64 supportmppComposeJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project.gradle (usage apply from: "$mppComposeJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project") - Multiplatform project with Compose supportmppProjectWithSerializationAndCompose.gradle (usage apply from: "$mppProjectWithSerializationAndCompose") - Multiplatform project with both Serialization and Compose support