-
Notifications
You must be signed in to change notification settings - Fork 17
Refactored screens cleanup and lifecycle logic #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ikarenkov
merged 16 commits into
releases/0.11.0
from
cleanup-and-lifecycle-refactoring
Dec 18, 2025
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2befae8
Refactored screen cleanup and lifecycle disposal namings for clarity.…
ikarenkov e1c7951
Updated `remember` in `ComposeRender` to include `stateHolder` as a k…
ikarenkov 12d113c
Improved logging of lifecycle: added classname to the start
ikarenkov 4d5f3ea
Fixed preview of buttons screen
ikarenkov ee96bfa
Added back button to screens
ikarenkov d5c95b2
Improved logging
ikarenkov cb1720c
Improved logging in libraty and sample app
ikarenkov 2a2710c
Fixed custom dialogs transition animation
ikarenkov 830f9a4
Refactor ModoScreenAndroidAdapter and ComposeRender
ikarenkov 342410b
Added missing material icons dependency
ikarenkov 61ebab1
Upgraded compose-bom and compile sdk
ikarenkov 54a0053
Removed wrong import
ikarenkov b653991
Fixed build of workshop app
ikarenkov 057ff50
Fix detekt
ikarenkov d9ef335
Fix lint work
ikarenkov c20ae2a
Fixed detekt
ikarenkov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
build-logic/convention/src/main/kotlin/com/github/terrakok/CollectSarifPlugin.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,90 @@ | ||
| package com.github.terrakok | ||
|
|
||
| import io.gitlab.arturbosch.detekt.report.ReportMergeTask | ||
| import org.gradle.api.DefaultTask | ||
| import org.gradle.api.Plugin | ||
| import org.gradle.api.Project | ||
| import org.gradle.api.file.ConfigurableFileCollection | ||
| import org.gradle.api.file.DirectoryProperty | ||
| import org.gradle.api.plugins.JavaBasePlugin | ||
| import org.gradle.api.tasks.InputFiles | ||
| import org.gradle.api.tasks.OutputDirectory | ||
| import org.gradle.api.tasks.TaskAction | ||
| import org.gradle.kotlin.dsl.register | ||
|
|
||
| class CollectSarifPlugin : Plugin<Project> { | ||
|
|
||
| override fun apply(target: Project) { | ||
| with(target) { | ||
| val fixLintSarifTask = tasks.register<FixLintSarifTask>(FIX_LINT_SARIF) { | ||
| group = JavaBasePlugin.VERIFICATION_GROUP | ||
| outputDir.set(layout.buildDirectory.dir("reports/lint-sarif-fixed")) | ||
| } | ||
|
|
||
| tasks.register<ReportMergeTask>(MERGE_LINT_SARIF) { | ||
| group = JavaBasePlugin.VERIFICATION_GROUP | ||
| output.set(layout.buildDirectory.file("reports/lint-merged.sarif")) | ||
| dependsOn(fixLintSarifTask) | ||
| // Configure inputs from the fix task's output directory | ||
| input.from( | ||
| fixLintSarifTask.map { task -> | ||
| task.outputDir.get().asFileTree.matching { | ||
| include("**/*.sarif") | ||
| } | ||
| } | ||
| ) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| companion object { | ||
| const val MERGE_LINT_SARIF = "mergeLintSarif" | ||
| const val FIX_LINT_SARIF = "fixLintSarif" | ||
| } | ||
| } | ||
|
|
||
| abstract class FixLintSarifTask : DefaultTask() { | ||
|
|
||
| @get:InputFiles | ||
| abstract val inputFiles: ConfigurableFileCollection | ||
|
|
||
| @get:OutputDirectory | ||
| abstract val outputDir: DirectoryProperty | ||
|
|
||
| @TaskAction | ||
| fun fixSarifFiles() { | ||
| val outputDirectory = outputDir.get().asFile | ||
| outputDirectory.mkdirs() | ||
|
|
||
| // Group input files by their parent project to avoid name collisions | ||
| val filesByProject = inputFiles.files.groupBy { file -> | ||
| // Extract project path from file path | ||
| // e.g., /path/to/project/modo-compose/build/reports/lint-results-debug.sarif -> modo-compose | ||
| val buildIndex = file.absolutePath.indexOf("/build/") | ||
| if (buildIndex > 0) { | ||
| val projectPath = file.absolutePath.substring(0, buildIndex) | ||
| projectPath.substringAfterLast("/") | ||
| } else { | ||
| "unknown" | ||
| } | ||
| } | ||
|
|
||
| filesByProject.forEach { (projectName, files) -> | ||
| files.forEach { inputFile -> | ||
| if (inputFile.exists() && inputFile.extension == "sarif") { | ||
| val content = inputFile.readText() | ||
| // Fix trailing commas in arrays and objects which are invalid JSON | ||
| val fixedContent = content | ||
| .replace(Regex(",\\s*]"), "]") // Remove trailing comma before ] | ||
| .replace(Regex(",\\s*}"), "}") // Remove trailing comma before } | ||
|
|
||
| // Create unique output filename using project name | ||
| val outputFileName = "${projectName}-${inputFile.name}" | ||
| val outputFile = outputDirectory.resolve(outputFileName) | ||
| outputFile.writeText(fixedContent) | ||
| logger.lifecycle("Fixed SARIF file: ${inputFile.absolutePath} -> ${outputFile.absolutePath}") | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,68 +1,81 @@ | ||
| androidx.activity:activity-compose:1.8.2 | ||
| androidx.activity:activity-ktx:1.8.2 | ||
| androidx.activity:activity:1.8.2 | ||
| androidx.annotation:annotation-experimental:1.3.0 | ||
| androidx.annotation:annotation-jvm:1.7.0 | ||
| androidx.annotation:annotation:1.7.0 | ||
| androidx.annotation:annotation-experimental:1.4.1 | ||
| androidx.annotation:annotation-jvm:1.9.1 | ||
| androidx.annotation:annotation:1.9.1 | ||
| androidx.arch.core:core-common:2.2.0 | ||
| androidx.arch.core:core-runtime:2.2.0 | ||
| androidx.collection:collection-jvm:1.4.0 | ||
| androidx.collection:collection-ktx:1.4.0 | ||
| androidx.collection:collection:1.4.0 | ||
| androidx.compose.animation:animation-android:1.6.4 | ||
| androidx.compose.animation:animation-core-android:1.6.4 | ||
| androidx.compose.animation:animation-core:1.6.4 | ||
| androidx.compose.animation:animation:1.6.4 | ||
| androidx.compose.foundation:foundation-android:1.6.4 | ||
| androidx.compose.foundation:foundation-layout-android:1.6.4 | ||
| androidx.compose.foundation:foundation-layout:1.6.4 | ||
| androidx.compose.foundation:foundation:1.6.4 | ||
| androidx.compose.runtime:runtime-android:1.6.4 | ||
| androidx.compose.runtime:runtime-saveable-android:1.6.4 | ||
| androidx.compose.runtime:runtime-saveable:1.6.4 | ||
| androidx.compose.runtime:runtime:1.6.4 | ||
| androidx.compose.ui:ui-android:1.6.4 | ||
| androidx.compose.ui:ui-geometry-android:1.6.4 | ||
| androidx.compose.ui:ui-geometry:1.6.4 | ||
| androidx.compose.ui:ui-graphics-android:1.6.4 | ||
| androidx.compose.ui:ui-graphics:1.6.4 | ||
| androidx.compose.ui:ui-text-android:1.6.4 | ||
| androidx.compose.ui:ui-text:1.6.4 | ||
| androidx.compose.ui:ui-unit-android:1.6.4 | ||
| androidx.compose.ui:ui-unit:1.6.4 | ||
| androidx.compose.ui:ui-util-android:1.6.4 | ||
| androidx.compose.ui:ui-util:1.6.4 | ||
| androidx.compose.ui:ui:1.6.4 | ||
| androidx.compose:compose-bom:2024.03.00 | ||
| androidx.core:core-ktx:1.12.0 | ||
| androidx.core:core:1.12.0 | ||
| androidx.collection:collection-jvm:1.5.0 | ||
| androidx.collection:collection-ktx:1.5.0 | ||
| androidx.collection:collection:1.5.0 | ||
| androidx.compose.animation:animation-android:1.9.5 | ||
| androidx.compose.animation:animation-core-android:1.9.5 | ||
| androidx.compose.animation:animation-core:1.9.5 | ||
| androidx.compose.animation:animation:1.9.5 | ||
| androidx.compose.foundation:foundation-android:1.9.5 | ||
| androidx.compose.foundation:foundation-layout-android:1.9.5 | ||
| androidx.compose.foundation:foundation-layout:1.9.5 | ||
| androidx.compose.foundation:foundation:1.9.5 | ||
| androidx.compose.runtime:runtime-android:1.9.5 | ||
| androidx.compose.runtime:runtime-annotation-android:1.9.5 | ||
| androidx.compose.runtime:runtime-annotation:1.9.5 | ||
| androidx.compose.runtime:runtime-saveable-android:1.9.5 | ||
| androidx.compose.runtime:runtime-saveable:1.9.5 | ||
| androidx.compose.runtime:runtime:1.9.5 | ||
| androidx.compose.ui:ui-android:1.9.5 | ||
| androidx.compose.ui:ui-geometry-android:1.9.5 | ||
| androidx.compose.ui:ui-geometry:1.9.5 | ||
| androidx.compose.ui:ui-graphics-android:1.9.5 | ||
| androidx.compose.ui:ui-graphics:1.9.5 | ||
| androidx.compose.ui:ui-text-android:1.9.5 | ||
| androidx.compose.ui:ui-text:1.9.5 | ||
| androidx.compose.ui:ui-unit-android:1.9.5 | ||
| androidx.compose.ui:ui-unit:1.9.5 | ||
| androidx.compose.ui:ui-util-android:1.9.5 | ||
| androidx.compose.ui:ui-util:1.9.5 | ||
| androidx.compose.ui:ui:1.9.5 | ||
| androidx.compose:compose-bom:2025.11.01 | ||
| androidx.core:core-ktx:1.15.0 | ||
| androidx.core:core:1.15.0 | ||
| androidx.customview:customview:1.0.0 | ||
| androidx.fragment:fragment-ktx:1.6.2 | ||
| androidx.fragment:fragment:1.6.2 | ||
| androidx.lifecycle:lifecycle-common-java8:2.7.0 | ||
| androidx.lifecycle:lifecycle-common:2.7.0 | ||
| androidx.lifecycle:lifecycle-livedata-core-ktx:2.7.0 | ||
| androidx.lifecycle:lifecycle-livedata-core:2.7.0 | ||
| androidx.lifecycle:lifecycle-livedata:2.7.0 | ||
| androidx.lifecycle:lifecycle-runtime-ktx:2.7.0 | ||
| androidx.lifecycle:lifecycle-runtime:2.7.0 | ||
| androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0 | ||
| androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0 | ||
| androidx.lifecycle:lifecycle-viewmodel-savedstate:2.7.0 | ||
| androidx.lifecycle:lifecycle-viewmodel:2.7.0 | ||
| androidx.lifecycle:lifecycle-common-jvm:2.9.4 | ||
| androidx.lifecycle:lifecycle-common:2.9.4 | ||
| androidx.lifecycle:lifecycle-livedata-core-ktx:2.9.4 | ||
| androidx.lifecycle:lifecycle-livedata-core:2.9.4 | ||
| androidx.lifecycle:lifecycle-livedata:2.9.4 | ||
| androidx.lifecycle:lifecycle-runtime-android:2.9.4 | ||
| androidx.lifecycle:lifecycle-runtime-compose-android:2.9.4 | ||
| androidx.lifecycle:lifecycle-runtime-compose:2.9.4 | ||
| androidx.lifecycle:lifecycle-runtime-ktx-android:2.9.4 | ||
| androidx.lifecycle:lifecycle-runtime-ktx:2.9.4 | ||
| androidx.lifecycle:lifecycle-runtime:2.9.4 | ||
| androidx.lifecycle:lifecycle-viewmodel-android:2.9.4 | ||
| androidx.lifecycle:lifecycle-viewmodel-compose-android:2.9.4 | ||
| androidx.lifecycle:lifecycle-viewmodel-compose:2.9.4 | ||
| androidx.lifecycle:lifecycle-viewmodel-ktx:2.9.4 | ||
| androidx.lifecycle:lifecycle-viewmodel-savedstate-android:2.9.4 | ||
| androidx.lifecycle:lifecycle-viewmodel-savedstate:2.9.4 | ||
| androidx.lifecycle:lifecycle-viewmodel:2.9.4 | ||
| androidx.loader:loader:1.0.0 | ||
| androidx.savedstate:savedstate-ktx:1.2.1 | ||
| androidx.savedstate:savedstate:1.2.1 | ||
| androidx.savedstate:savedstate-android:1.3.3 | ||
| androidx.savedstate:savedstate-compose-android:1.3.3 | ||
| androidx.savedstate:savedstate-compose:1.3.3 | ||
| androidx.savedstate:savedstate-ktx:1.3.3 | ||
| androidx.savedstate:savedstate:1.3.3 | ||
| androidx.versionedparcelable:versionedparcelable:1.1.1 | ||
| androidx.viewpager:viewpager:1.0.0 | ||
| org.jetbrains.kotlin:kotlin-android-extensions-runtime:2.0.21 | ||
| org.jetbrains.kotlin:kotlin-parcelize-runtime:2.0.21 | ||
| org.jetbrains.kotlin:kotlin-stdlib-common:2.0.21 | ||
| org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.20 | ||
| org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.20 | ||
| org.jetbrains.kotlin:kotlin-stdlib:2.0.21 | ||
| org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1 | ||
| org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.7.1 | ||
| org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.1 | ||
| org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1 | ||
| org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 | ||
| org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1 | ||
| org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.8.1 | ||
| org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1 | ||
| org.jetbrains.kotlinx:kotlinx-serialization-bom:1.7.3 | ||
| org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.7.3 | ||
| org.jetbrains.kotlinx:kotlinx-serialization-core:1.7.3 | ||
| org.jetbrains:annotations:23.0.0 | ||
| org.jspecify:jspecify:1.0.0 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / Android Lint
A newer version of androidx.compose:compose-bom than 2025.11.01 is available: 2026.02.00 Note