Cdalf - Compose Desktop Android-like Framework

Overview

Compose Desktop Android-like Framework

Simple framework/library designed to make desktop app development easier for Android developers

Installation

In build.gradle.kts
  • apply following plugins:
plugins {
	// other plugins
	kotlin("jvm") version "1.6.10"
	id("org.jetbrains.compose") version "1.0.1"
	application
}
  • add jitpack to project repositories:
repositories {
	// other repositories
	maven { url = uri("https://jitpack.io") }
}
  • add these dependencies (replace "TAG" with the newest release, alternatively replace with "master-SNAPSHOT" to get the latest commit)
dependencies {
	// other dependencies
	implementation(compose.desktop.currentOs)
	implementation("com.github.KamilKurde:cdalf:TAG")
}

Usage

  • Starting an app
    • Use invoke method on Application object provided with this framework as a result for main function
    • example:
fun main() = Application {
	// Put yours program code here
}
  • Creating Activity
    • Create class that inherits from Activity
    • Implement copy method
    • Use setContent method to define UI
    • example:
class YourActivity: Activity()
{
	override fun copy() = YourActivity()
	
	override fun onCreate() {
		super.onCreate()
		setContent {
			Text("Your activity")
		}
	}
}
  • Starting Activity
    • Instantiate Window class and pass Activity to it
    • example:
Window(YourActivity())
EXAMPLE OF SIMPLE APP
import androidx.compose.material.*
import com.github.KamilKurde.*

class YourActivity: Activity()
{
	override fun copy() = YourActivity()

	override fun onCreate() {
		super.onCreate()
		setContent {
			Text("Your activity")
		}
	}
}

fun main() = Application {
	Window(YourActivity())
}
You might also like...
Alien invasion 👾 gane is back! this time specially on Jetpack Compose Desktop 🚀, using Canvas API 🎨
Alien invasion 👾 gane is back! this time specially on Jetpack Compose Desktop 🚀, using Canvas API 🎨

Compose Space-Invaders 👾 Alien invasion 👾 is back! this time specially on Jetpack Compose Desktop 🚀 , using Canvas API 🎨 Featured on Compose Diges

💻 A Compose Desktop project template with MVVM, Dagger, Decompose, tests, and more...
💻 A Compose Desktop project template with MVVM, Dagger, Decompose, tests, and more...

compose-desktop-template A compose desktop project template with MVVM, Dagger, Decompose and more ✨ Demo What's included? Architecture (MVVM) with And

A simple Snake application to demonstrate the use of Compose for Desktop platform with Kotlin
A simple Snake application to demonstrate the use of Compose for Desktop platform with Kotlin

Snake App using Compose for Desktop A simple Snake desktop application to demonstrate the use of Compose UI toolkit for Desktop platform with Kotlin.

🔖 A Quotes Application built to Demonstrate the Compose for Desktop UI
🔖 A Quotes Application built to Demonstrate the Compose for Desktop UI

🔖 JetQuotes A Quotes Application built to Demonstrate the use of Jetpack Compose for building declarative UI in Desktop. Made with love ❤️ by Spikeys

⌨️ A tool that gives you a massive head start when building Compose Desktop apps. It saves you from time-consuming setup and configuration
⌨️ A tool that gives you a massive head start when building Compose Desktop apps. It saves you from time-consuming setup and configuration

💻 create-compose-app A tool that gives you a massive head start when building Compose based apps. It saves you from time-consuming setup and configur

🎮 An attempt to create Super Mario Bros using Compose for Desktop
🎮 An attempt to create Super Mario Bros using Compose for Desktop

🎮 compose-mario An attempt to create Super Mario Bros using Compose for Desktop 🏗️ Under Active Development THIS PROJECT IS UNDER ACTIVE DEVELOPMENT

Simple space game, built with Compose for Desktop!
Simple space game, built with Compose for Desktop!

Asteroids, built with Compose for Desktop Want to learn how I built it? Read the two-part article in which I describe the most interesting parts of th

A simple Snake game implemented using Compose for Desktop
A simple Snake game implemented using Compose for Desktop

CompoSnake A simple Snake game implemented using Compose for Desktop. Run: ./gradlew run Author Twitter: @arkann1985 If you like this project you can

Jetpack Compose Desktop Galaxy Example
Jetpack Compose Desktop Galaxy Example

Compose-StarWars Compose-StarWar 3D Space particle System build using Canvas API Jetpack Compose Desktop 🚀 How to Run From gradle tab from right-hand

Releases(0.4.0)
Owner
Kamil Bąk
Kamil Bąk
Test-compose-for-desktop - Hello World in Compose for Desktop

Testing Run from command line: ./gradlew run Regular build: ./gradlew packageUb

Sebastian 3 Sep 20, 2022
Snake-compose-for-desktop - Snake Game - implemented using Compose for Desktop

A Snake game, built with Compose for Desktop snake-compose-for-desktop is my imp

gnu 5 Feb 17, 2022
💻 A cross-platform desktop application to identify libraries used inside an android application. Made possible by Compose Desktop ⚡

?? stackzy A desktop app to analyse APK. Built using Compose desktop ✨ Demo Watch demo ??️ Usage Show usage ?? Install Platform Download Status Linux

theapache64 876 Dec 24, 2022
A desktop code editor app using Jetpack Compose for Desktop and IntelliJ Platform

Compose Code Editor A desktop code editor app using Jetpack Compose for Desktop and IntelliJ Platform. Project Structure The code is contained in the

Alex 73 Dec 19, 2022
Jetpack Compose Boids | Flocking Insect 🐜. bird or Fish simulation using Jetpack Compose Desktop 🚀, using Canvas API 🎨

?? ?? ?? Compose flocking Ants(boids) ?? ?? ?? Jetpack compose Boids | Flocking Insect. bird or Fish simulation using Jetpack Compose Desktop ?? , usi

Chetan Gupta 38 Sep 25, 2022
Exercising Compose for Desktop and Compose for Web (Canvas)

Compose Counting Grid A simple application to check Compose for Desktop and Compose for Web (Canvas) drawing speeds when drawing grids (or tables) wit

null 6 Nov 11, 2022
A Sudoku game for Android & Desktop written with Jetpack Compose Multiplatform

?? Compose Arcade A sample Kotlin Multiplatform Compose Sudoku app for Android & Desktop. Most code is shared between Android & Desktop using Kotlin M

Aaron Oertel 42 Dec 30, 2022
Resume of Louis CAD, made with Jetpack Compose. Supports the Web, Desktop, and Android.

ResumeComposition What This project is the source code of the resume/CV of Louis CAD. The latest PDF export is available here, it is ready to print. H

Louis CAD 22 Aug 14, 2022
⌨️ A tool that gives you a massive head start when building Compose Desktop apps. It saves you from time-consuming setup and configuration

?? create-compose-app A tool that gives you a massive head start when building Compose based apps. It saves you from time-consuming setup and configur

theapache64 466 Dec 21, 2022
Welcome Fruit Ninja 🥝 on Jetpack Compose Desktop 🚀, using Canvas API 🎨

Compose-Fruit-Ninja ?? Welcome Fruit Ninja on Jetpack Compose Desktop ?? , using Canvas API ?? Featured on jetc-dev How to Run From gradle tab from ri

Chetan Gupta 54 Nov 2, 2022