kmmp-project-manager 0.1.0

kmmp-project-manager is a Rust crate for Kotlin Multiplatform (KMP) projects, offering a lightweight alternative to Android Studio. It provides tools for project creation, structure management, build automation, code generation, IDE integration, dependency management, and project configuration.
Documentation
//! The `common` module contains common dependencies used in Kotlin projects,
//! including plugins, project configurations, and various libraries.
//!
//! This module aims to provide the latest versions of the dependencies at the time of writing.
//! It can be used as a reference for setting up Kotlin projects with commonly used dependencies.
//!
//! `Note`: Please ensure to check for updated versions of the dependencies as newer versions may be available.
//! `Note`: Additional values will be added and versions will be updated


/// Contains common dependencies used in Kotlin Multiplatform (KMP) projects.
///
/// Dependencies represent external libraries and modules that are used in the KMP project.
/// By organizing dependencies into logical groups, it becomes easier to manage and maintain the project.
///
/// # Example
///
/// ```
/// use kmmp_structure::dependencies::*;
///
/// // Access the KOTLIN_STDLIB dependency.
/// let kotlin_stdlib = KOTLIN_STDLIB;
/// println!("Kotlin Stdlib: {}", kotlin_stdlib);
///
/// // Access the Android-specific dependencies.
/// let appcompat = android::APPCOMPAT;
/// let core_ktx = android::CORE_KTX;
/// println!("Android Dependencies: {}, {}", appcompat, core_ktx);
/// ```
pub mod dependencies {
    use crate::DependencyIdentifier;

    /// Kotlin Standard Library dependency.
    pub static KOTLIN_STDLIB: DependencyIdentifier = DependencyIdentifier::new("org.jetbrains.kotlin", "kotlin-stdlib", "1.8.20");

    /// KTOR dependencies.
    pub mod ktor {
        use super::*;

        static KTOR_VERSION : &str = "2.3.2";
        static KTOR : &str = "io.ktor";

        /// KTOR Core dependency.
        pub static CORE: DependencyIdentifier = DependencyIdentifier::new(KTOR, "ktor-client-core", KTOR_VERSION);
        /// KTOR JSON dependency.
        pub static JSON: DependencyIdentifier = DependencyIdentifier::new(KTOR, "ktor-client-json", KTOR_VERSION);
        /// KTOR Logging dependency.
        pub static LOGGING: DependencyIdentifier = DependencyIdentifier::new(KTOR, "ktor-client-logging", KTOR_VERSION);
    }

    static KOTLINX : &str = "org.jetbrains.kotlinx";

    /// KotlinX Serialization dependency.
    pub static KOTLINX_SERIALIZATION: DependencyIdentifier = DependencyIdentifier::new(KOTLINX, "kotlinx-serialization-json", "1.5.1");
    /// KotlinX DateTime dependency.
    pub static KOTLINX_DATETIME: DependencyIdentifier = DependencyIdentifier::new(KOTLINX, "kotlinx-datetime", "0.4.0");
    
    /// KotlinX Coroutines dependencies.
    pub mod kotlinx_coroutines {
        use super::*;

        static KOTLINX_COROUTINES_VERSION : &str = "1.7.2";

        /// KotlinX Coroutines Core dependency.
        pub static CORE: DependencyIdentifier = DependencyIdentifier::new(KOTLINX, "kotlinx-coroutines-core", KOTLINX_COROUTINES_VERSION);
        /// KotlinX Coroutines Common dependency.
        pub static COMMON: DependencyIdentifier = DependencyIdentifier::new(KOTLINX, "kotlinx-coroutines-core-common", KOTLINX_COROUTINES_VERSION);
        /// KotlinX Coroutines Android dependency.
        pub static ANDROID: DependencyIdentifier = DependencyIdentifier::new(KOTLINX, "kotlinx-coroutines-android", KOTLINX_COROUTINES_VERSION);
        /// KotlinX Coroutines Web (JS) dependency.
        pub static WEB: DependencyIdentifier = DependencyIdentifier::new(KOTLINX, "kotlinx-coroutines-js", KOTLINX_COROUTINES_VERSION);
        /// KotlinX Coroutines iOS dependency.
        pub static IOS: DependencyIdentifier = DependencyIdentifier::new(KOTLINX, "kotlinx-coroutines-core-native", KOTLINX_COROUTINES_VERSION);
        /// KotlinX Coroutines Desktop dependency.
        pub static DESKTOP: DependencyIdentifier = DependencyIdentifier::new(KOTLINX, "kotlinx-coroutines-core-native-mt", KOTLINX_COROUTINES_VERSION);
    }

    /// Android-specific dependencies.
    pub mod android {
        use super::*;

        /// AndroidX AppCompat dependency.
        pub static APPCOMPAT: DependencyIdentifier = DependencyIdentifier::new("androidx.appcompat", "appcompat", "1.7.1");
        /// AndroidX Core KTX dependency.
        pub static CORE_KTX: DependencyIdentifier = DependencyIdentifier::new("androidx.core", "core-ktx", "1.10.1");

        /// AndroidX Activity Compose dependency.
        pub static ACTIVITY_COMPOSE: DependencyIdentifier = DependencyIdentifier::new("androidx.activity", "activity-compose", "1.7.2");

        static NAVIGATION: &str = "androidx.navigation";

        /// AndroidX Navigation Compose dependency.
        pub static NAVIGATION_COMPOSE: DependencyIdentifier = DependencyIdentifier::new(NAVIGATION, "navigation-compose", "2.4.0");
        /// AndroidX Navigation Fragment KTX dependency.
        pub static NAVIGATION_FRAGMENT_KTX: DependencyIdentifier = DependencyIdentifier::new(NAVIGATION, "navigation-fragment-ktx", "2.4.0");
        /// AndroidX Navigation UI dependency.
        pub static NAVIGATION_UI: DependencyIdentifier = DependencyIdentifier::new(NAVIGATION, "navigation-ui-ktx", "2.4.0");

        /// Material Design dependency.
        pub static MATERIAL: DependencyIdentifier = DependencyIdentifier::new("com.google.android.material", "material", "1.10.0");

        /// AndroidX Constraint Layout dependency.
        pub static CONSTRAINT_LAYOUT: DependencyIdentifier = DependencyIdentifier::new("androidx.constraintlayout", "constraintlayout", "2.1.1");
        /// AndroidX Constraint Layout Compose dependency.
        pub static CONSTRAINT_LAYOUT_COMPOSE: DependencyIdentifier = DependencyIdentifier::new("androidx.constraintlayout", "constraintlayout-compose", "1.0.0-beta02");

        /// Coil Compose dependency.
        pub static COIL_COMPOSE: DependencyIdentifier = DependencyIdentifier::new("io.coil-kt", "coil-compose", "2.3.0");

        /// Retrofit dependency.
        pub static RETROFIT: DependencyIdentifier = DependencyIdentifier::new("com.squareup.retrofit2", "retrofit", "2.9.0");
        /// OkHttp dependency.
        pub static OKHTTP: DependencyIdentifier = DependencyIdentifier::new("com.squareup.okhttp3", "okhttp", "4.9.1");
        /// Gson dependency.
        pub static GSON: DependencyIdentifier = DependencyIdentifier::new("com.google.code.gson", "gson", "2.8.8");
    }
}

/// Contains common plugins used in Kotlin Multiplatform (KMP) projects.
///
/// Plugins provide additional functionality and capabilities to KMP projects. They are used to
/// configure and customize the build process, enable platform-specific features, and integrate
/// with other tools and libraries.
///
/// # Example
///
/// ```
/// use kmmp_structure::plugins::*;
///
/// let kotlin_multiplatform = KOTLIN_MULTIPLATFORM;
/// println!("Kotlin Multiplatform plugin: {}", kotlin_multiplatform);
/// ```
pub mod plugins {
    use crate::PluginIndentifier;

    /// Kotlin Multiplatform plugin.
    pub static KOTLIN_MULTIPLATFORM: PluginIndentifier = PluginIndentifier::new("kotlin-multiplatform", true);
    /// Kotlin Android plugin.
    pub static KOTLIN_ANDROID: PluginIndentifier = PluginIndentifier::new("kotlin-android", true);
    /// Kotlin JS plugin.
    pub static KOTLIN_JS: PluginIndentifier = PluginIndentifier::new("kotlin-js", true);
    /// Kotlin Native plugin.
    pub static KOTLIN_NATIVE: PluginIndentifier = PluginIndentifier::new("kotlin-native", true);
    /// Kotlin JVM plugin.
    pub static KOTLIN_JVM: PluginIndentifier = PluginIndentifier::new("kotlin-jvm", true);
    /// KotlinX HTML plugin.
    pub static KOTLINX_HTML: PluginIndentifier = PluginIndentifier::new("kotlinx-html", true);
    
    /// Kotlin Kapt plugin.
    pub static KOTLIN_KAPT: PluginIndentifier = PluginIndentifier::new("kotlin-kapt", true);
    /// KotlinX Serialization plugin.
    pub static KOTLINX_SERIALIZATION: PluginIndentifier = PluginIndentifier::new("kotlinx-serialization", true);
    /// KotlinX Coroutines plugin.
    pub static KOTLINX_COROUTINES: PluginIndentifier = PluginIndentifier::new("kotlinx-coroutines", true);
    /// KotlinX DateTime plugin.
    pub static KOTLINX_DATETIME: PluginIndentifier = PluginIndentifier::new("kotlinx-datetime", true);

    /// Android Application plugin.
    pub static ANDROID_APPLICATION: PluginIndentifier = PluginIndentifier::new("com.android.application", false);
    /// Android Library plugin.
    pub static ANDROID_LIBRARY: PluginIndentifier = PluginIndentifier::new("com.android.library", false);
    /// Android Dynamic Feature plugin.
    pub static ANDROID_DYNAMIC_FEATURE: PluginIndentifier = PluginIndentifier::new("com.android.dynamic-feature", false);

    /// Jetbrains Compose plugin.
    pub static JETBRAINS_COMPOSE: PluginIndentifier = PluginIndentifier::new("org.jetbrains.compose", false);
}

/// Contains common repositories used in Kotlin Multiplatform (KMP) projects.
///
/// Repositories provide access to external dependencies and artifacts that are required for
/// building and resolving dependencies in KMP projects.
///
/// # Example
///
/// ```
/// use kmmp_structure::repositories::*;
///
/// let maven_central = MAVEN_CENTRAL;
/// println!("Maven Central repository: {}", maven_central);
/// ```
pub mod repositories {
    use crate::RepositoryIndentifier;

    /// Maven Central repository.
    pub static MAVEN_CENTRAL: RepositoryIndentifier = RepositoryIndentifier::new("https://repo1.maven.org/maven2/");
    /// Jitpack repository.
    pub static JITPACK: RepositoryIndentifier = RepositoryIndentifier::new("https://jitpack.io/");
    /// Google Maven repository.
    pub static MAVEN_GOOGLE: RepositoryIndentifier = RepositoryIndentifier::new("https://maven.google.com/");
    /// KotlinX Maven repository.
    pub static MAVEN_KOTLINX: RepositoryIndentifier = RepositoryIndentifier::new("https://kotlin.bintray.com/kotlinx/");

    /// JCenter repository.
    pub static MAVEN_JCENTER: RepositoryIndentifier = RepositoryIndentifier::new("https://jcenter.bintray.com/");
    /// Spring Maven repository.
    pub static MAVEN_SPRING: RepositoryIndentifier = RepositoryIndentifier::new("https://repo.spring.io/release/");
    /// Gradle Plugins repository.
    pub static MAVEN_GRADLE_PLUGINS: RepositoryIndentifier = RepositoryIndentifier::new("https://plugins.gradle.org/m2/");
    /// Jitsi Maven repository.
    pub static MAVEN_JITSI: RepositoryIndentifier = RepositoryIndentifier::new("https://download.jitsi.org/maven/");
}


/// Contains common source sets names used in Kotlin Multiplatform (KMP) projects.
///
/// Source sets represent different sets of source code files within a KMP project. They allow
/// organizing code based on platform-specific or shared functionality.
///
/// # Example
///
/// ```
/// use kmmp_structure::source_sets::*;
///
/// let main_source_set = ANDROID_MAIN;
/// println!("Main source set: {}", main_source_set);
/// ```
pub mod source_sets {
    /// The main Android source set.
    pub static ANDROID_MAIN: &str = "androidMain";
    /// The test Android source set.
    pub static ANDROID_TEST: &str = "androidTest";
    /// The main iOS source set.
    pub static IOS_MAIN: &str = "iosMain";
    /// The test iOS source set.
    pub static IOS_TEST: &str = "iosTest";
    /// The common source set shared across platforms.
    pub static COMMON_MAIN: &str = "commonMain";
    /// The common test source set shared across platforms.
    pub static COMMON_TEST: &str = "commonTest";
}