aritra-tech / Notify

📝 Notify is a simple note application build to demonstrate the use of clean MVVM Architecture with Jetpack Compose and Material-3 guidelines along with some Modern Android development tools.
MIT License
289 stars 66 forks source link

Migrating to Kotlin 2.0 #475

Open tuuhin opened 2 weeks ago

tuuhin commented 2 weeks ago

The K2 compiler is very fast, and many are migrating their projects to Kotlin 2.0 . so why not this one too?

aritra-tech commented 2 weeks ago

it's already done @tuuhin

tuuhin commented 2 weeks ago

Great 👍🏼 I was looking on the compiler report after migrating it to k2 , Some tweaking can be done, i.e., some of the classes are unstable and the compiler is not skipping re-compositions. Check the report and do let me know if I can work on making these classes stable .

aritra-tech commented 2 weeks ago

How are you creating the report @tuuhin ?

tuuhin commented 2 weeks ago

Add this block in app level build.gradle.kts file

composeCompiler {
        // You can enable strong skipping mode if required
    // enableStrongSkippingMode = true
       // metrics report destination
    metricsDestination = layout.buildDirectory.dir("compose_compiler")
        // reports destination
    reportsDestination = layout.buildDirectory.dir("compose_compiler")
        // if your app uses certain java based classes like LocalDateTime add them into a `stability_config.conf` file
    // stabilityConfigurationFile = rootProject.layout.projectDirectory.file("stability_config.conf")
}

run a release build though debug build will work (as per docs it should be performed on release build), check out app level build folder You can follow the instructions over stability_in_compose