SDKForge Template

A modern Kotlin Multiplatform SDK template for building cross-platform libraries and applications. This template provides a robust foundation for creating SDKs that work seamlessly across Android and iOS platforms. Currently in development - this template is designed to be forked and customized for your specific SDK needs.
🚀 Features
📱 Supported Platforms
- Android: API 21+ (Android 5.0+)
- iOS: 12.0+
- Kotlin: 2.2.20+
- Gradle: 8.0+
🏗️ Project Structure
SDKForge.Template/
├── app-android/
├── app-ios/
├── app-shared/
├── shared/
├── shared-core/
├── shared-template/
├── build-logic/
├── internal-benchmark/
└── internal-ktlint/
🛠️ Installation
Note: This project is currently in development and not yet published to any repository. Installation instructions will be available once the project is published.
Future Installation (Coming Soon)
Once published, you'll be able to install the SDK using:
Gradle (Kotlin DSL)
dependencies {
implementation("dev.sdkforge.template:shared:1.0.0")
implementation("dev.sdkforge.template:shared-core:1.0.0")
}
Gradle (Groovy)
dependencies {
implementation 'dev.sdkforge.template:shared:1.0.0'
implementation 'dev.sdkforge.template:shared-core:1.0.0'
}
Maven
<dependency>
<groupId>dev.sdkforge.template</groupId>
<artifactId>shared</artifactId>
<version>1.0.0</version>
</dependency>
🚀 Quick Start
Prerequisites
- Java Development Kit (JDK): Version 21 or higher
- Android Studio: Latest stable version (for Android development)
- Xcode: Latest stable version (for iOS development, macOS only)
- Kotlin: Version 2.2.20 or higher
- Gradle: Version 8.0 or higher
Development Setup
Using as a Template
This project serves as a template for creating Kotlin Multiplatform SDKs. To use it:
- Fork or clone this repository
- Customize the module names, package names, and functionality
- Add your SDK logic to the
shared-* modules
- Configure publishing when ready to distribute
- Update documentation to reflect your specific SDK
📖 Usage
Basic SDK Structure
The template provides a modular structure with platform-specific implementations:
interface Platform {
val name: String
val version: String
}
expect val currentPlatform: Platform
Platform-Specific Implementations
Android Implementation
actual val currentPlatform: Platform = object : Platform {
override val name: String get() = "Android"
override val version: String get() = android.os.Build.VERSION.SDK_INT.toString()
}
iOS Implementation
import platform.UIKit.UIDevice
actual val currentPlatform: Platform = object : Platform {
override val name: String get() = UIDevice.currentDevice.systemName
override val version: String get() = UIDevice.currentDevice.systemVersion
}
Compose Multiplatform UI
The template includes a shared UI component using Compose Multiplatform:
@Composable
fun App(
modifier: Modifier = Modifier,
) = ApplicationTheme {
Surface(
modifier = modifier,
color = MaterialTheme.colorScheme.background,
) {
Column(
verticalArrangement = Arrangement.spacedBy(
space = 8.dp,
alignment = Alignment.CenterVertically,
),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Text(
text = "Platform name: ${currentPlatform.name}",
)
Text(
text = ,
)
}
}
}
SDK Version Information
Access SDK version information through the Library object:
data object Library {
const val VERSION = "0.0.1"
}
val sdkVersion = Library.VERSION
🧪 Testing
Run All Tests
./gradlew test
Run Platform-Specific Tests
./gradlew app-android:test
./gradlew app-ios:test
Performance Benchmarks
./gradlew internal-benchmark:connectedAndroidTest
📚 Documentation
- API Documentation: Generated with Dokka
- Contributing Guide: CONTRIBUTING.md
- Code of Conduct: CODE_OF_CONDUCT.md
- Security Policy: SECURITY.md
🔧 Development
Adding New Modules
- Create a new module in the
shared-* directory
- Apply the appropriate plugins in
build.gradle.kts
- Update the main
shared module to export the new module
- Add tests and documentation
Code Style
This project uses KtLint for code formatting. Run the following to check and fix code style:
./gradlew ktlintCheck
./gradlew ktlintFormat
Dependency Management
The project uses dependency guard to prevent dependency drift:
./gradlew dependencyGuard
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Before Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Ensure all checks pass
- Submit a pull request
Code of Conduct
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
🔒 Security
We take security seriously. Please report security vulnerabilities to volodymyr.nevmerzhytskyi@sdkforge.dev.
Do NOT create public GitHub issues for security vulnerabilities.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
- Documentation: Check our documentation
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- :
🗺️ Roadmap
🙏 Acknowledgments
- Kotlin Multiplatform team
- Jetpack Compose team
- JetBrains for excellent tooling
- All contributors and community members
Made with ❤️ by the SDKForge Team