Skip to content

texport/ofd-kt-proto

Repository files navigation

ofd-kt-proto

Maven Central Version License CI Build Coverage



Important

Disclaimer: This is an unofficial, community-maintained library. It is not officially endorsed by, affiliated with, or sponsored by JSC "KazakhTelecom" or the State Revenue Committee of the Republic of Kazakhstan. All product names, logos, and brands are property of their respective owners.

Дисклеймер: Данный проект является неофициальной библиотекой, поддерживаемой сообществом. Он не связан, не спонсируется и не утверждался АО «Казахтелеком» или Комитетом государственных доходов РК. Все названия продуктов, товарные знаки и логотипы принадлежат их законным владельцам.


Documentation in English

A Kotlin Multiplatform (KMP) library containing code entities generated from KazakhTelecom OFD (State Revenue Committee of the Republic of Kazakhstan) .proto files.

The current protocol version is 2.0.3 (module proto-v203). These proto files implement the data transmission protocol between Cash Registers (KKM) and the OFD.

Key Features

  • Kotlin Multiplatform Support: Compiles to standard JVM bytecode (compatible with Java 17+ and Android) and Apple/iOS Native targets.
  • Type-safe Kotlin Protobuf bindings: Uses Square Wire Gradle plugin to generate KMP-compliant code without JVM/Java runtime dependencies.
  • Modular design: Designed to support multiple protocol versions side-by-side in the same project without package collisions.

Installation

1. Via Maven Central (Recommended)

Add the dependency to your shared commonMain source set inside build.gradle.kts:

kotlin {
    sourceSets {
        commonMain {
            dependencies {
                implementation("io.github.texport:ofd-kt-proto:2.0.3-2")
            }
        }
    }
}

2. Local Publish (Local Development)

To build and publish to your local maven repository for testing:

./gradlew publishToMavenLocal

Документация на русском языке

Мультиплатформенная библиотека Kotlin Multiplatform (KMP). Содержит сущности, сгенерированные из .proto файлов ОФД Казахтелеком (Комитет государственных доходов РК).

Текущая версия протокола — 2.0.3 (модуль proto-v203). Прото-файлы реализуют протокол передачи данных ККМ в ОФД.

Ключевые преимущества

  • Поддержка Kotlin Multiplatform: Компилируется под JVM (совместима с Java 17+ и Android) и Apple/iOS Native таргеты.
  • Типизированные KMP биндинги: Использует плагин Square Wire для кодогенерации чистых Kotlin-классов без привязки к Java SDK.
  • Поддержка параллельных версий: Несколько версий протокола могут одновременно использоваться в одном проекте без конфликтов пакетов.

Подключение библиотеки

1. Через Maven Central (Рекомендуемый способ)

Добавьте зависимость в ваш общий набор исходников commonMain в build.gradle.kts:

kotlin {
    sourceSets {
        commonMain {
            dependencies {
                implementation("io.github.texport:ofd-kt-proto:2.0.3-2")
            }
        }
    }
}

2. Локальная сборка и публикация

Для сборки и публикации в локальный Maven-репозиторий выполните команду:

./gradlew publishToMavenLocal

Swift Package Manager (SPM) / iOS Setup

Because ofd-kt-proto is a pure Protobuf schema definition library generating common Kotlin classes via Wire, it is not distributed directly as a Swift Package Manager (SPM) XCFramework binary.

Instead, it is consumed as a dependency by the ofd-proto-codec library which wraps these models and provides the native SPM configuration block for iOS consumers.


Architecture Boundaries

This library operates strictly as a data definition module containing schema contracts:

  • Included: Auto-generated types and message definitions representing KazakhTelecom OFD v2.0.3 objects.
  • Delegated: Network client sockets, logging, trilingual error localization, and business flow implementations are delegated to downstream consumers (ofd-network-client and ofd-proto-codec).

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors