library: update versions
- Commit
dc42938dd0df1e5b1f5e27220c75d87c0bb25ba0- Author
- Vayun Mathur <[email protected]>
- When
- 2026-04-28 00:09 UTC (7 months ago)
- Parents
bc01042
Diff
build-logic/src/main/kotlin/common-conventions-library.gradle.kts
diff --git a/build-logic/src/main/kotlin/common-conventions-library.gradle.kts b/build-logic/src/main/kotlin/common-conventions-library.gradle.ktsindex ef85c1b30f..4a082c1dd5 100644--- a/build-logic/src/main/kotlin/common-conventions-library.gradle.kts+++ b/build-logic/src/main/kotlin/common-conventions-library.gradle.kts@@ -14,7 +14,7 @@ configure<com.android.build.api.dsl.LibraryExtension> { namespace = "com.vayunmathur.$name" compileSdk {- version = release(36)+ version = release(37) } defaultConfig {
findfamily/src/main/java/com/vayunmathur/findfamily/util/Platform.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/util/Platform.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/util/Platform.ktindex 9ee66a3a87..1c79a616b8 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/util/Platform.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/util/Platform.kt@@ -1,7 +1,10 @@ package com.vayunmathur.findfamily.util import android.Manifest import android.annotation.SuppressLint+import android.app.Activity import android.content.Context+import android.content.Intent+import android.os.Build import android.provider.ContactsContract import android.util.Log import androidx.activity.compose.rememberLauncherForActivityResult@@ -10,8 +13,11 @@ import androidx.activity.result.launch import androidx.compose.runtime.Composable import androidx.compose.runtime.rememberCoroutineScope import androidx.core.content.PermissionChecker+import androidx.core.database.getBlobOrNull import androidx.core.database.getStringOrNull import com.vayunmathur.findfamily.R+import kotlinx.coroutines.launch+import kotlin.io.encoding.Base64 class Platform(private val context: Context) { @SuppressLint("Range")@@ -92,7 +98,7 @@ class Platform(private val context: Context) { ) // Set up the intent for the Contact Picker- val pickContactIntent = Intent(ACTION_PICK_CONTACTS).apply {+ val pickContactIntent = Intent(Intent.ACTION_PICK_CONTACTS).apply { putStringArrayListExtra( EXTRA_PICK_CONTACTS_REQUESTED_DATA_FIELDS, requestedFields
gradle/libs.versions.toml
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.tomlindex d642b1a58b..70f6c4e79e 100644--- a/gradle/libs.versions.toml+++ b/gradle/libs.versions.toml@@ -1,7 +1,7 @@ [versions] # Build & Core Language agp = "9.2.0"-kotlin = "2.3.20"+kotlin = "2.3.21" ksp = "2.3.6" # AndroidX Core & Lifecycle@@ -13,28 +13,28 @@ workRuntimeKtx = "2.11.2" datastorePreferences = "1.2.1" # Compose & UI Foundations-composeBom = "2026.03.01"+composeBom = "2026.04.01" activityCompose = "1.13.0"-material3 = "1.5.0-alpha16"-reorderable = "3.0.0"+material3 = "1.5.0-alpha18"+reorderable = "3.1.0" composeMarkdown = "0.5.8" # Navigation-navigation3 = "1.0.1"-adaptiveNavigation3 = "1.3.0-alpha09"+navigation3 = "1.1.1"+adaptiveNavigation3 = "1.3.0-alpha10" # Media & Images media3Exoplayer = "1.10.0" coilCompose = "2.7.0" jaudiotagger = "3.0.1" exifinterface = "1.4.2"-camerax = "1.5.0-alpha05"+camerax = "1.6.0" # Networking & Data-ktor = "3.4.2"+ktor = "3.4.3" okhttp = "5.3.2" okio = "3.17.0"-kotlinxSerializationJson = "1.10.0"+kotlinxSerializationJson = "1.11.0" kotlinxDatetime = "0.7.1" room = "2.8.4" @@ -42,18 +42,18 @@ room = "2.8.4" biometric = "1.2.0-alpha05" pdfViewer = "1.0.0-alpha16" glance = "1.1.1"-connectClient = "1.2.0-alpha03"+connectClient = "1.2.0-alpha04" cryptographyCore = "0.6.0" sol4k = "0.7.0"-libphonenumber = "9.0.27"+libphonenumber = "9.0.29" material3AdaptiveNavigationSuite = "1.4.0" maplibre = "0.12.1"-foundation = "1.10.6"+foundation = "1.11.0" [libraries] # AndroidX Core & Lifecycle androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }-androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version = "1.8.6" }+androidx-fragment-ktx = { group = "androidx.fragment", name = "fragment-ktx", version = "1.8.9" } androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycle" } androidx-lifecycle-viewmodel-ktx = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-ktx", version.ref = "lifecycle" } androidx-lifecycle-viewmodel-compose = { group = "androidx.lifecycle", name = "lifecycle-viewmodel-compose", version.ref = "lifecycle" }
library/src/main/java/com/vayunmathur/library/util/Markdown.kt
diff --git a/library/src/main/java/com/vayunmathur/library/util/Markdown.kt b/library/src/main/java/com/vayunmathur/library/util/Markdown.ktindex aabf1900e0..aff53b6c9d 100644--- a/library/src/main/java/com/vayunmathur/library/util/Markdown.kt+++ b/library/src/main/java/com/vayunmathur/library/util/Markdown.kt@@ -12,64 +12,74 @@ import androidx.compose.ui.text.style.LineHeightStyle import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.text.style.TextGeometricTransform import androidx.compose.ui.text.style.TextIndent+import androidx.compose.ui.unit.TextUnit import androidx.compose.ui.unit.sp /** * Converts a Markdown string into an AnnotatedString for Jetpack Compose. * @param mdtext The raw markdown text. * @param showMarkers If false, the formatting symbols (#, *, etc.) are hidden and occupy no space.+ * @param process If true, the text is preprocessed for newline rules and list normalization. */-fun parseMarkdown(mdtext: String, showMarkers: Boolean = true): AnnotatedString {+fun parseMarkdown(mdtext: String, showMarkers: Boolean = true, process: Boolean = true): AnnotatedString { // 1. Preprocess text for newline rules and list normalization- val lines = mdtext.lines()- val processedText = buildString {- var i = 0- while (i < lines.size) {- val line = lines[i]- - // Rule: 2+ newlines always becomes 1 newline for anything.- // Since we append \n after every processed block, skipping blank lines- // effectively reduces 2+ newlines to the 1 newline from the previous block.- if (line.isBlank()) {- while (i + 1 < lines.size && lines[i + 1].isBlank()) i++- i++; continue- }+ val processedText = if (process) {+ val lines = mdtext.lines()+ buildString {+ var i = 0+ while (i < lines.size) {+ val line = lines[i]++ // Rule: 2+ newlines always becomes 1 newline for anything.+ // Since we append \n after every processed block, skipping blank lines+ // effectively reduces 2+ newlines to the 1 newline from the previous block.+ if (line.isBlank()) {+ while (i + 1 < lines.size && lines[i + 1].isBlank()) i+++ i++; continue+ } - val trimmed = line.trimStart()- val listMatch = Regex("^(\\s*)([•*+-]|\\d+[.)])(\\s+.*)").matchEntire(line)- val isCurrentSpecial = trimmed.startsWith("#") || trimmed.startsWith(">") || listMatch != null-- if (isCurrentSpecial) {- if (listMatch != null) {- val rawIndent = listMatch.groups[1]!!.value- val level = rawIndent.length / 2- val normalizedIndent = " ".repeat(level)- val marker = listMatch.groups[2]!!.value- val rest = listMatch.groups[3]!!.value- val newMarker = if (marker.length == 1 && "*+-".contains(marker)) "•" else marker- append("$normalizedIndent$newMarker ${rest.trimStart()}\n")+ val trimmed = line.trimStart()+ val listMatch = Regex("^(\\s*)([•*+-]|\\d+[.)])(\\s+.*)").matchEntire(line)+ val isCurrentSpecial =+ trimmed.startsWith("#") || trimmed.startsWith(">") || listMatch != null++ if (isCurrentSpecial) {+ if (listMatch != null) {+ val rawIndent = listMatch.groups[1]!!.value+ val level = rawIndent.length / 2+ val normalizedIndent = " ".repeat(level)+ val marker = listMatch.groups[2]!!.value+ val rest = listMatch.groups[3]!!.value+ val newMarker =+ if (marker.length == 1 && "*+-".contains(marker)) "•" else marker+ append("$normalizedIndent$newMarker ${rest.trimStart()}\n")+ } else {+ append(line.trimEnd() + "\n")+ } } else {- append(line.trimEnd() + "\n")- }- } else {- // Regular text: Rule: 1 newline becomes 0 newlines only when both lines are not headers or bullets- var merged = line.trim()- while (i + 1 < lines.size && lines[i + 1].isNotBlank()) {- val nextLine = lines[i + 1]- val nextTrimmed = nextLine.trimStart()- val nextListMatch = Regex("^(\\s*)([•*+-]|\\d+[.)])(\\s+.*)").matchEntire(nextLine)- val isNextSpecial = nextTrimmed.startsWith("#") || nextTrimmed.startsWith(">") || nextListMatch != null- - if (isNextSpecial) break // Newline preserved if next line is special- - merged += " " + nextLine.trim()- i+++ // Regular text: Rule: 1 newline becomes 0 newlines only when both lines are not headers or bullets+ var merged = line.trim()+ while (i + 1 < lines.size && lines[i + 1].isNotBlank()) {+ val nextLine = lines[i + 1]+ val nextTrimmed = nextLine.trimStart()+ val nextListMatch =+ Regex("^(\\s*)([•*+-]|\\d+[.)])(\\s+.*)").matchEntire(nextLine)+ val isNextSpecial =+ nextTrimmed.startsWith("#") || nextTrimmed.startsWith(">") || nextListMatch != null++ if (isNextSpecial) break // Newline preserved if next line is special++ merged += " " + nextLine.trim()+ i+++ }+ append(merged + "\n") }- append(merged + "\n")+ i++ }- i++- }- }.trim()+ }.trim()+ } else {+ mdtext+ } return buildAnnotatedString { append(processedText)@@ -100,15 +110,17 @@ fun parseMarkdown(mdtext: String, showMarkers: Boolean = true): AnnotatedString hideRange(markers.range.first, markers.range.last + 1) - addStyle(SpanStyle(fontWeight = FontWeight.Bold, fontSize = fontSize), start, end)- addStyle(- ParagraphStyle(- lineHeight = fontSize * 1.3f,- lineHeightStyle = LineHeightStyle(LineHeightStyle.Alignment.Center, LineHeightStyle.Trim.None)- ),- start,- end- )+ addStyle(SpanStyle(fontWeight = FontWeight.Bold).copy(fontSize = if (process) fontSize else TextUnit.Unspecified), start, end)+ if (process) {+ addStyle(+ ParagraphStyle(+ lineHeight = fontSize * 1.3f,+ lineHeightStyle = LineHeightStyle(LineHeightStyle.Alignment.Center, LineHeightStyle.Trim.Both)+ ),+ start,+ end+ )+ } } // 2. Lists@@ -130,26 +142,27 @@ fun parseMarkdown(mdtext: String, showMarkers: Boolean = true): AnnotatedString } } - val level = indentation.length / 2- val indentBase = 12.sp- val indentStep = 24.sp- val firstLineIndent = (indentBase.value + (level * indentStep.value)).sp- val markerOffset = if (markerString.any { it.isDigit() }) 32.sp else 16.sp+ if (process) {+ val level = indentation.length / 2+ val indentBase = 12.sp+ val indentStep = 24.sp+ val firstLineIndent = (indentBase.value + (level * indentStep.value)).sp+ val markerOffset = if (markerString.any { it.isDigit() }) 32.sp else 16.sp - addStyle(- ParagraphStyle(- textIndent = TextIndent(firstLine = firstLineIndent, restLine = (firstLineIndent.value + markerOffset.value).sp)- ),- start,- end- )+ addStyle(+ ParagraphStyle(+ textIndent = TextIndent(firstLine = firstLineIndent, restLine = (firstLineIndent.value + markerOffset.value).sp)+ ),+ start,+ end+ )+ } addStyle( SpanStyle( color = if (showMarkers) Color.Gray else Color.Unspecified,- fontWeight = FontWeight.Bold,- fontSize = if (markerString == "•") 18.sp else 16.sp- ),+ fontWeight = FontWeight.Bold+ ).copy(fontSize = if (process) (if (markerString == "•") 18.sp else 16.sp) else TextUnit.Unspecified), start, contentStart )
library/src/main/java/com/vayunmathur/library/util/Navigation.kt
diff --git a/library/src/main/java/com/vayunmathur/library/util/Navigation.kt b/library/src/main/java/com/vayunmathur/library/util/Navigation.ktindex a4c255b7a4..a751bfcedd 100644--- a/library/src/main/java/com/vayunmathur/library/util/Navigation.kt+++ b/library/src/main/java/com/vayunmathur/library/util/Navigation.kt@@ -136,7 +136,7 @@ fun <T: NavKey> MainNavigation(backStack: NavBackStack<T>, entryProvider: EntryP ) { NavDisplay( modifier = Modifier.padding(paddingValues).imePadding(),- sceneStrategy = DialogSceneStrategy<T>().then(sceneStrategy),+ sceneStrategies = listOf(DialogSceneStrategy(), sceneStrategy), backStack = backStack.backStack, entryProvider = { EntryProviderScope(it).apply { entryProvider()
notes/src/main/java/com/vayunmathur/notes/ui/NotePage.kt
diff --git a/notes/src/main/java/com/vayunmathur/notes/ui/NotePage.kt b/notes/src/main/java/com/vayunmathur/notes/ui/NotePage.ktindex 9e3ae7c1fa..b85601b432 100644--- a/notes/src/main/java/com/vayunmathur/notes/ui/NotePage.kt+++ b/notes/src/main/java/com/vayunmathur/notes/ui/NotePage.kt@@ -108,7 +108,7 @@ fun NotePage(backStack: NavBackStack<Route>, viewModel: DatabaseViewModel, noteI var value by remember(note.id) { mutableStateOf( TextFieldValue(- parseMarkdown(note.content)+ parseMarkdown(note.content, process = false) ) ) }@@ -126,7 +126,7 @@ fun NotePage(backStack: NavBackStack<Route>, viewModel: DatabaseViewModel, noteI if (isEditing) value else noMarkers, { note = note.copy(content = it.text)- value = it.copy(annotatedString = parseMarkdown(it.text))+ value = it.copy(annotatedString = parseMarkdown(it.text, process = false)) }, Modifier.fillMaxSize(), readOnly = !isEditing,