Klutter: Flutter + Kotlin Multiplatform

Related tags

Kotlin klutter
Overview

Klutter

Klutter is a framework and tool set which uses Flutter to create the frontend and Kotlin Multiplatform for the backend. The connective layer is generated by the Klutter framework. Klutter combines industry best practices for everything from app design to CICD into a single cohesive framework.

Plugins

Klutter - Adapter

Klutter - Config

The config plugin is used to configure the project. A fully configured plugin will do the following tasks:

  1. Read the klutter.yaml file and write all properties to the root build.gradle.kts
  2. Create a build.gradle.kts template
  3. Merge all build.gradle.kts file with the template

A Klutter project should not be a multicomponent gradle project. Instead all modules should be standalone.This means at minimum the Flutter module (frontend) and the KMP module (backend). A typical Klutter project looks like:

project
│   settings.gradle.kts [1] 
│   build.gradle.kts [2]
│   klutter.yaml [3]
│ 
└───app-frontend (flutter)
│   settings.gradle.kts [4] 
│   build.gradle.kts [5]
│   └───android 
│   │   │   └───app
│   │   │       │ build.gradle [6]
│   └───lib
│   └───ios
│   
└───app-backend (kotlin multiplatform)
   └───common (shared module) 
        │ settings.gradle.kts [7]        
        │ build.gradle.kts [8]

(1) root settings.gradle.kts must not include sub modules (2) build.gradle.kts applies the plugin //todo

Contributing

Pull requests are welcome. Contact me at [email protected]

License

MIT License

Copyright (c) [2021] [Gillian Buijs]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...
Opinionated Redux-like implementation backed by Kotlin Coroutines and Kotlin Multiplatform Mobile

CoRed CoRed is Redux-like implementation that maintains the benefits of Redux's core idea without the boilerplate. No more action types, action creato

An app architecture for Kotlin/Native on Android/iOS. Use Kotlin Multiplatform Mobile.
An app architecture for Kotlin/Native on Android/iOS. Use Kotlin Multiplatform Mobile.

An app architecture for Kotlin/Native on Android/iOS. Use Kotlin Multiplatform Mobile. 项目架构主要分为原生系统层、Android/iOS业务SDK层、KMM SDK层、KMM业务逻辑SDK层、iOS sdkfra

A Bluetooth kotlin multiplatform "Cross-Platform" library for iOS and Android

Blue-Falcon A Bluetooth "Cross Platform" Kotlin Multiplatform library for iOS, Android, MacOS, Raspberry Pi and Javascript. Bluetooth in general has t

Mobile client for official Nextcloud News App written as Kotlin Multiplatform Project
Mobile client for official Nextcloud News App written as Kotlin Multiplatform Project

Newsout Android and iOS mobile client for Nextcloud news App. The Android client is already available to download in the Play Store. F-Droid and Apple

Kotlin Multiplatform Application to show Crypto Coins
Kotlin Multiplatform Application to show Crypto Coins

This is the codebase of Crypto currency Tracking Kotlin Multiplatform App. Components Shared Components Ktor (Network Client) SQL Delight (Local DB) A

Dependency Injection library for Kotlin Multiplatform, support iOS and Android

Multiplatform-DI library for Kotlin Multiplatform Lightweight dependency injection framework for Kotlin Multiplatform application Dependency injection

Kotlin multiplatform library template.

template-kmp-library Kotlin multiplatform library template. Has a baseline setup for a multiplatform library supporting all kotlin targets except andr

BuildConfig for Kotlin Multiplatform Project

BuildKonfig BuildConfig for Kotlin Multiplatform Project. It currently supports embedding values from gradle file. Table Of Contents Motivation Usage

Kotlin multiplatform benchmarking toolkit

NOTE: Starting from version 0.3.0 of the library: The library runtime is published to Maven Central and no longer published to Bintray. The Gradle plu

Comments
  • App does not run on iOS simulator (M1 Mac)

    App does not run on iOS simulator (M1 Mac)

    It's an amazing project, and i would like to try this but problem is, just gone trough the document, and i can not find a plugin type example. I have been trying to set it up but it did not work. If there is pre build plugin from which i can take reference it would be great help.

    opened by DK070202 31
  • Add support for all standard datatypes

    Add support for all standard datatypes

    TLDR: Maps/arrays are not supported right now which means any KlutterJSON implementation using a map will not be converted to a Dart DTO.

    Solution: Expand the DartKotlinMap with the following types and add support for code generation based on these types: INTEGER("Int", "int"), DOUBLE("Double", "double"), BOOLEAN("Boolean", "bool"), STRING("String", "String"), NOTHING("Unit", "void"), LONG("Long", "int"), BYTE_ARRAY("Uint8List","ByteArray"), INT_ARRAY("Int32List","IntArray"), LONG_ARRAY("Int64List","LongArray"), FLOAT_ARRAY("Float32List","FloatArray"), DOUBLE_ARRAY("Float64List", "DoubleArray"), LIST("List", "List"), MAP("Map", "HasMap");

    enhancement 
    opened by buijs-dev 0
  • Streams api support

    Streams api support

    Wow, what a great project :)

    You've done really impressive work.

    What do you think about supporting streams API? It's commonly used in flutter plugins.

    Kotlin multiplatform side: fun observeLocation() : Flow<Location>

    Dart side:

    Stream<Location> observeLocation(); https://api.flutter.dev/flutter/services/EventChannel-class.html

    I've done it for my own plugin. Would be great to have such a feature supported by Klutter. Thanks in advance.

    enhancement 
    opened by JenshenSoft 1
Releases(v2022.r6-9.alpha)
  • v2022.r6-9.alpha(Aug 27, 2022)

  • v2022.r6-8.alpha(Aug 25, 2022)

    • Merged annotations-kmp and annotations-jvm to klutter-annotations.
    • Renamed package core to kore.
    • Renamed package plugin.gradle to gradle.
    • Renamed Gradle ID to dev.buijs.klutter.
    • Added dependency handler for easier dependency management.
    • Added task klutterBuildAndroid which builds a flutter debug .apk for Android.
    • Added task klutterBuildAndroidIos which executes klutterBuildAndroid and klutterBuildAndroidIos.
    • Added task klutterBuildIos which builds a flutter debug Runner.app for iOS.
    • Added task klutterCopyAarFile which copies the platform .aar file to android folder.
    • Added task klutterIosFramework which copies the platform Framework to ios folder.
    • Added iosSimulatorArm64 to platform build.gradle.kts for running app on Mac M1/M2 devices.
    • Added module klutter-jetbrains to build Intellij and Android Studio plugin.
    • Added module klutter-tasks.
    • Added new Klutter logo to README (hooray).
    Source code(tar.gz)
    Source code(zip)
  • v2022.r6-7.alpha(Jul 2, 2022)

  • v2022.r6-6.alpha(Jul 1, 2022)

    • Improved generated Flutter code to handle null values.
    • Removed AdapterResponse class from generated Flutter code and added klutter-dart import.
    • Added AndroidContext annotation to pass Android Context.
    • [Bugfix] Fixed adding exclusions to Podfile when they are already added.
    • [Bugfix] Fixed standard nullable fields to be incorrectly flagged as custom datatype.
    Source code(tar.gz)
    Source code(zip)
  • v2022.r6.alpha(Jun 22, 2022)

    • [Bugfix] klutterExcludeArchsPlatformPodspec: A warning is now logged when adding exclusion fails.
    • [Bugfix] klutterGeneratedAdapters: Do not append Dart Adapter class with 'Plugin'.
    Source code(tar.gz)
    Source code(zip)
Owner
Gillian
Full stack developer Java | Kotlin | Dart - Flutter | Klutter!
Gillian
Muhammad Bilal 0 Jan 6, 2022
Esp touch flutter plugin - Client-side (mobile) Android Flutter implementation for ESP-Touch protocol

esp_touch_flutter_plugin Client-side (mobile) Android Flutter implementation for

huangyanxiong 0 Jan 21, 2022
Open as default - A flutter plugin that allows setting up your flutter app to open files as default

open_as_default A flutter plugin that allows setting up your flutter app to open

LuisDeLaValier 3 Nov 15, 2022
use kmm to write a flutter plugin

use KMM to write a flutter plugin The reference plugin_codelab example plugin that accompanies the How to write a Flutter plugin codelab. I changed pl

libill 8 Nov 9, 2022
1aingenieriaygas native base android - Project base for the migration of the Flutter App of 1A Ingenieria y Gas

1A Ingenieria y Gas App Versión Wordpress Backend Este proyecto se encuentra sol

Paul Osinga 1 Jan 26, 2022
Flutter plugin that leverages Storage Access Framework (SAF) API to get access and perform the operations on files and folders

Flutter plugin that leverages Storage Access Framework (SAF) API to get access and perform the operations on files and folders.

Vehement 8 Nov 26, 2022
A Flutter implementation of Salesforce Marketing Cloud for iOS and Android

sfmc_flutter A Flutter implementation of Salesforce Marketing Cloud for iOS and Android. Features Setup Marketing Cloud (iOS and Android) Support for

Alex Tarragó 5 Oct 19, 2022
A flutter plugin to scan stripe readers and connect to the them and get the payment methods.

stripe_terminal A flutter plugin to scan stripe readers and connect to the them and get the payment methods. Installation Android No Configuration nee

Aawaz Gyawali 8 Dec 29, 2022
Real life Kotlin Multiplatform project with an iOS application developed in Swift with SwiftUI, an Android application developed in Kotlin with Jetpack Compose and a backed in Kotlin hosted on AppEngine.

Conferences4Hall Real life Kotlin Multiplatform project with an iOS application developed in Swift with SwiftUI, an Android application developed in K

Gérard Paligot 98 Dec 15, 2022