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:
Android environment
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 project -
selector
contains tools to useSelector
interface with things likeRecyclerView
in android or other selection needs -
coroutines
is a module forKotlin Coroutines
with different things like subscribing on flows (onEach
+launchIn
shortcut :) ) -
ktor
is a set of modules forclient
s andserver
s -
mime_types
is NOT lightweight set ofMimeType
s with a lot of different objected and serializable (withKotlin Serialization
) mime types -
pagination
is a complex of modules (explanation in Complex modules structure section) for lightweight pagination -
serialization
is a collection of projects with serializers forkotlinx.serialization
-
repos
is a complex of modules (explanation in Complex modules structure section) forKeyValue
/OneToMany
/CRUD
repos created to be able to exclude some heavy dependencies when you need some simple and lightweight typical repositories
Most of complex modules are built with next hierarchy:
-
common
submodule forAPI
things which are common for all platforms -
exposed
submodule contains realizations for exposed tables -
ktor
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 servers -
client
submodule contains clients which are usually usingUnifiedRequester
to make requests using routes fromktor/common
module and some internal logic of requests -
server
submodule (in most casesJVM
-only) contains some extensions forRoute
instances which usually will give opportunity to proxy internet requests fromktor/client
realization to some proxy object
-
All 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
(usageapply from: "$defaultProject"
) - Basic project configuration -
defaultProjectWithSerialization.gradle
(usageapply from: "$defaultProjectWithSerialization"
) - Project configuration with Kotlin Serialization support -
mppJavaProject.gradle
(usageapply from: "$mppJavaProject"
) - Multiplatform project with Java support -
mppAndroidProject.gradle
(usageapply from: "$mppAndroidProject"
) - Multiplatform project with Android support
-
enableMPPAndroid.gradle
(usageapply from: "$enableMPPAndroid"
) - Enable Android target in multiplatform project -
enableMPPJs.gradle
(usageapply from: "$enableMPPJs"
) - Enable JavaScript target in multiplatform project -
enableMPPJvm.gradle
(usageapply from: "$enableMPPJvm"
) - Enable JVM target in multiplatform project -
enableMPPNativeArm64.gradle
(usageapply from: "$enableMPPNativeArm64"
) - Enable ARM64 native target -
enableMPPNativeX64.gradle
(usageapply from: "$enableMPPNativeX64"
) - Enable x64 native target -
enableMPPWasmJs.gradle
(usageapply from: "$enableMPPWasmJs"
) - Enable WebAssembly JavaScript target
-
addCompose.gradle
(usageapply from: "$addCompose"
) - Basic Compose configuration -
addComposeForAndroid.gradle
(usageapply from: "$addComposeForAndroid"
) - Compose configuration for Android -
addComposeForDesktop.gradle
(usageapply from: "$addComposeForDesktop"
) - Compose configuration for Desktop -
addComposeForJs.gradle
(usageapply from: "$addComposeForJs"
) - Compose configuration for JavaScript
-
publish.gradle
(usageapply from: "$publish"
) - General publishing configuration -
publish_jvm.gradle
(usageapply from: "$publish_jvm"
) - JVM-specific publishing configuration -
publish.kpsb
andpublish_jvm.kpsb
(usageapply from: "$publish_kpsb"
andapply from: "$publish_jvm_kpsb"
) - Publishing configuration for Kotlin Multiplatform and JVM
-
mppJvmJsWasmJsLinuxMingwProject.gradle
(usageapply from: "$mppJvmJsWasmJsLinuxMingwProject"
) - Multiplatform project for JVM, JS, Wasm, Linux, and MinGW -
mppJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project.gradle
(usageapply from: "$mppJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project"
) - Multiplatform project with additional Android and ARM64 support -
mppComposeJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project.gradle
(usageapply from: "$mppComposeJvmJsWasmJsAndroidLinuxMingwLinuxArm64Project"
) - Multiplatform project with Compose support -
mppProjectWithSerializationAndCompose.gradle
(usageapply from: "$mppProjectWithSerializationAndCompose"
) - Multiplatform project with both Serialization and Compose support