Kotlin

775 readers
1 users here now

Kotlin is a statically typed programming language for the JVM, Android, JavaScript, and native.

Subreddit rules:

Resources:

founded 2 years ago
MODERATORS
1
2
2
submitted 1 month ago* (last edited 1 month ago) by illucidmind@programming.dev to c/kotlin@programming.dev
 
 

I just released v0.4.0 of Ktor Panel.

Ktor Panel is a lightweight, customisable admin interface generation library for Ktor servers. Ktor Panel provides a simple way to manage database entities through an intuitive and secure interface using minimal configuration.

Official docs: https://ktor-panel.readthedocs.io/

Please leave a GitHub star if you find it useful!

3
4
5
6
7
3
Ktor-Panel: Admin Interface Generation (ktor-panel.readthedocs.io)
submitted 4 months ago* (last edited 4 months ago) by illucidmind@programming.dev to c/kotlin@programming.dev
 
 

Ktor-panel is a lightweight admin interface generation library for Ktor servers, and is currently in its last stages of development before official release to the public for consumption. Its selling points are the customisability and security. At the moment, the library supports ORMs and ODMs such as Exposed, Hibernate and the official Kotlin MongoDB driver.

I'd appreciate any feedback, GitHub stars or collaborations as there's still a lot to build :)

Source: https://github.com/believemanasseh/ktor-panel

8
9
10
11
 
 

I am very happy that jetbrains seem to support kotlin outside of intelliJ. Since I do not like IntelliJ that much, I might be able to use kotlin in other editors with good support too.

12
13
 
 

cross-posted from: https://lemm.ee/post/64557471

14
15
16
17
18
19
20
2
submitted 10 months ago* (last edited 10 months ago) by neme@lemm.ee to c/kotlin@programming.dev
21
 
 

cross-posted from: https://lemmy.ml/post/21390036

I finished reading the Kotlin documentation (§Concepts) and want to do something now. I was thinking about making a desktop app with a GUI. For that people seem to recommend Jetbrains Compose.

It seems however that the guides (https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-multiplatform-create-first-app.html) to set up such a project assume I have more than one target. I however don't and thus don't need to divide my project into common code, ios code, wasm code, etc. I only need to compile my project for the JVM, since I'm only intending to support Linux and BSD. I don't have much experience with the Java/Kotlin-centric build systems and I would like to avoid investing too much time into it (since for now I would like to spend more time writing that app, preferring to learn Gradle later in my journey), so I thought about just generating a template as recommended by the guides (using https://kmp.jetbrains.com/) and to just remove everything that doesn't matter for my project. However, since I don't have much experience with Gradle yet, I don't know what exactly the changes are that I need to make to the build script

Generated code

import org.jetbrains.compose.desktop.application.dsl.TargetFormat

plugins {
    alias(libs.plugins.kotlinMultiplatform)
    alias(libs.plugins.jetbrainsCompose)
    alias(libs.plugins.compose.compiler)
}

kotlin {
    jvm("desktop")
    
    sourceSets {
        val desktopMain by getting
        
        commonMain.dependencies {
            implementation(compose.runtime)
            implementation(compose.foundation)
            implementation(compose.material)
            implementation(compose.ui)
            implementation(compose.components.resources)
            implementation(compose.components.uiToolingPreview)
            implementation(libs.androidx.lifecycle.viewmodel)
            implementation(libs.androidx.lifecycle.runtime.compose)
        }
        desktopMain.dependencies {
            implementation(compose.desktop.currentOs)
            implementation(libs.kotlinx.coroutines.swing)
        }
    }
}


compose.desktop {
    application {
        mainClass = "org.example.project.MainKt"

        nativeDistributions {
            targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
            packageName = "org.example.project"
            packageVersion = "1.0.0"
        }
    }
}

What resources should I look at to quickly create a kotlin Compose project targeting only the JVM? (maybe a gradle crashcourse????)


Unrelated, but if you want you can also share your opinion regarding the use of Compose vs JavaFX vs Swing for this situation

22
 
 

Hi everyone, I am learning kotlin as my first language(I have a bit of python knowledge mostly useless stuffs) I am following the android tutorial for kotlin and now I am 100% lost at the tip calculator in kotlin here. What should/could I do to improve my situation? Any recommend would help me a lot. Thank!

23
24
25
view more: next ›