# heitorcolangelo/kmp-library-sample architecture

> Architecture diagram of the GitHub repository heitorcolangelo/kmp-library-sample, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/heitorcolangelo/kmp-library-sample
- Repository: https://github.com/heitorcolangelo/kmp-library-sample

## Overview

##### Build System Layer
- Gradle build system (build.gradle.kts)
- Convention plugins
- Publication configuration

##### Testing Infrastructure
Parallel testing structures for each platform:
- commonTest
- androidUnitTest
- iosTest
- jvmTest
- linuxX64Test

##### Deployment Pipeline
A section showing:
- GitHub Actions workflows
- Maven Central deployment process
- Sonatype integration

##### Components
**[Common Module]**
- ↑

- → [Android Implementation]
- → [iOS Implementation]
- → [JVM Implementation]
- → [Linux Implementation]

Important Considerations:

##### Platform Specifics
- How platform-specific properties (fibiprops) are implemented in each target
- Shared interfaces from common module

##### Build Configuration
- How the convention plugins affect the build process
- Publication workflow to Maven Central

##### Testing Flow
- Demonstrate how tests are executed for each platform
- Relationship between common tests and platform-specific tests

##### Deployment Process
- GitHub Actions workflow
- Signing and publication steps

- Special indicators or symbols

Level of Detail:
- Keep the main architecture view clean and high-level
- Build process
- Testing infrastructure
- Deployment pipeline

Remember to emphasize the multiplatform nature of the project and how the common code is shared and specialized across different platforms.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core
        Common["Common Module<br/>(CustomFibi.kt)"]:::common
    end

    subgraph "Platform Implementations"
        Android["Android Implementation<br/>(fibiprops.android)"]:::android
        IOS["iOS Implementation<br/>(fibiprops.ios)"]:::ios
        JVM["JVM Implementation<br/>(fibiprops.jvm)"]:::jvm
        Linux["Linux Implementation<br/>(fibiprops.linuxX64)"]:::linux
    end

    subgraph "Testing Infrastructure"
        CommonTest["Common Tests"]:::test
        AndroidTest["Android Tests"]:::test
        IOSTest["iOS Tests"]:::test
        JVMTest["JVM Tests"]:::test
        LinuxTest["Linux Tests"]:::test
    end

    subgraph "Build System"
        MainBuild[("Main Build<br/>Configuration")]:::build
        LibBuild[("Library Build<br/>Configuration")]:::build
        ConventionPlugins["Convention<br/>Plugins"]:::build
        Dependencies["Dependencies<br/>Management"]:::build
    end

    subgraph "Deployment Pipeline"
        GHActions["GitHub Actions"]:::deploy
        MavenCentral["Maven Central"]:::deploy
        Publication["Publication<br/>Configuration"]:::deploy
    end

    %% Core relationships
    Common --> Android
    Common --> IOS
    Common --> JVM
    Common --> Linux

    %% Testing relationships
    CommonTest -.-> Common
    AndroidTest -.-> Android
    IOSTest -.-> IOS
    JVMTest -.-> JVM
    LinuxTest -.-> Linux

    %% Build system relationships
    MainBuild --> LibBuild
    LibBuild --> Common
    ConventionPlugins --> LibBuild
    Dependencies --> MainBuild

    %% Deployment relationships
    GHActions --> Publication
    Publication --> MavenCentral

    %% Click events
    click Common "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/library/src/commonMain/kotlin/CustomFibi.kt"
    click Android "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/library/src/androidMain/kotlin/fibiprops.android.kt"
    click IOS "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/library/src/iosMain/kotlin/fibiprops.ios.kt"
    click JVM "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/library/src/jvmMain/kotlin/fibiprops.jvm.kt"
    click Linux "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/library/src/linuxX64Main/kotlin/fibiprops.linuxX64.kt"
    click CommonTest "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/library/src/commonTest/kotlin/FibiTest.kt"
    click AndroidTest "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/library/src/androidUnitTest/kotlin/AndroidFibiTest.kt"
    click IOSTest "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/library/src/iosTest/kotlin/IosFibiTest.kt"
    click JVMTest "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/library/src/jvmTest/kotlin/JvmFibiTest.kt"
    click LinuxTest "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/library/src/linuxX64Test/kotlin/LinuxFibiTest.kt"
    click MainBuild "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/build.gradle.kts"
    click LibBuild "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/library/build.gradle.kts"
    click ConventionPlugins "https://github.com/heitorcolangelo/kmp-library-sample/tree/main/convention-plugins/src/main/kotlin"
    click Dependencies "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/gradle/libs.versions.toml"
    click GHActions "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/.github/workflows/deploy.yml"
    click Publication "https://github.com/heitorcolangelo/kmp-library-sample/blob/main/convention-plugins/src/main/kotlin/module.publication.gradle.kts"

    %% Styles
    classDef common fill:#3498db,stroke:#2980b9,color:white
    classDef android fill:#2ecc71,stroke:#27ae60,color:white
    classDef ios fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef jvm fill:#e67e22,stroke:#d35400,color:white
    classDef linux fill:#9b59b6,stroke:#8e44ad,color:white
    classDef test fill:#e74c3c,stroke:#c0392b,color:white
    classDef build fill:#f1c40f,stroke:#f39c12,color:black
    classDef deploy fill:#1abc9c,stroke:#16a085,color:white
```
