mirror of
https://github.com/danilkinkin/buckwheat.git
synced 2025-12-31 04:13:02 +00:00
bump: bump dependencies to android API 36
This commit is contained in:
parent
c6cd0c586c
commit
bfb8d732a5
11 changed files with 100 additions and 95 deletions
|
|
@ -4,15 +4,16 @@ plugins {
|
|||
id("kotlin-kapt")
|
||||
id("dagger.hilt.android.plugin")
|
||||
id("com.google.devtools.ksp")
|
||||
id("org.jetbrains.kotlin.plugin.compose") version "2.0.21"
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = 34
|
||||
compileSdk = 36
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.danilkinkin.buckwheat"
|
||||
minSdk = 26
|
||||
targetSdk = 34
|
||||
minSdk = 29
|
||||
targetSdk = 36
|
||||
versionCode = 28
|
||||
versionName = "4.7.0"
|
||||
testInstrumentationRunner = "com.danilkinkin.buckwheat.CustomTestRunner"
|
||||
|
|
@ -44,10 +45,6 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.5.10"
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
|
||||
|
|
@ -70,56 +67,56 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.20")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
|
||||
implementation("androidx.appcompat:appcompat:1.7.0")
|
||||
implementation("androidx.activity:activity-compose:1.9.0")
|
||||
implementation("androidx.compose.runtime:runtime:1.6.8")
|
||||
implementation("androidx.compose.foundation:foundation:1.6.8")
|
||||
implementation("androidx.compose.foundation:foundation-layout:1.6.8")
|
||||
implementation("androidx.compose.ui:ui-util:1.6.8")
|
||||
implementation("androidx.compose.material3:material3-window-size-class:1.2.1")
|
||||
implementation("androidx.compose.animation:animation:1.6.8")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview:1.6.8")
|
||||
implementation("androidx.compose.runtime:runtime-livedata:1.6.8")
|
||||
implementation("androidx.compose.material3:material3:1.2.1")
|
||||
implementation("androidx.compose.material:material:1.6.8")
|
||||
implementation("androidx.datastore:datastore-preferences:1.1.1")
|
||||
implementation("androidx.recyclerview:recyclerview:1.3.2")
|
||||
implementation("androidx.room:room-runtime:2.6.1")
|
||||
implementation("androidx.room:room-ktx:2.6.1")
|
||||
implementation("androidx.room:room-paging:2.6.1")
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:2.0.21")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2")
|
||||
implementation("androidx.appcompat:appcompat:1.7.1")
|
||||
implementation("androidx.activity:activity-compose:1.10.1")
|
||||
implementation("androidx.compose.runtime:runtime:1.8.3")
|
||||
implementation("androidx.compose.foundation:foundation:1.8.3")
|
||||
implementation("androidx.compose.foundation:foundation-layout:1.8.3")
|
||||
implementation("androidx.compose.ui:ui-util:1.8.3")
|
||||
implementation("androidx.compose.material3:material3-window-size-class:1.3.2")
|
||||
implementation("androidx.compose.animation:animation:1.8.3")
|
||||
implementation("androidx.compose.ui:ui-tooling-preview:1.8.3")
|
||||
implementation("androidx.compose.runtime:runtime-livedata:1.8.3")
|
||||
implementation("androidx.compose.material3:material3:1.3.2")
|
||||
implementation("androidx.compose.material:material:1.8.3")
|
||||
implementation("androidx.datastore:datastore-preferences:1.1.7")
|
||||
implementation("androidx.recyclerview:recyclerview:1.4.0")
|
||||
implementation("androidx.room:room-runtime:2.7.2")
|
||||
implementation("androidx.room:room-ktx:2.7.2")
|
||||
implementation("androidx.room:room-paging:2.7.2")
|
||||
implementation("androidx.hilt:hilt-navigation-compose:1.2.0")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.2")
|
||||
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.2")
|
||||
implementation("androidx.glance:glance-appwidget:1.1.0")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.9.1")
|
||||
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.9.1")
|
||||
implementation("androidx.glance:glance-appwidget:1.1.1")
|
||||
implementation("androidx.core:core-splashscreen:1.0.1")
|
||||
implementation("com.google.accompanist:accompanist-systemuicontroller:0.25.1")
|
||||
implementation("com.google.dagger:dagger:2.49")
|
||||
implementation("com.google.dagger:hilt-android:2.49")
|
||||
implementation("org.apache.commons:commons-csv:1.10.0")
|
||||
implementation("io.coil-kt:coil-compose:2.3.0")
|
||||
ksp("androidx.room:room-compiler:2.6.1")
|
||||
implementation("com.google.accompanist:accompanist-systemuicontroller:0.36.0")
|
||||
implementation("com.google.dagger:dagger:2.56.2")
|
||||
implementation("com.google.dagger:hilt-android:2.56.2")
|
||||
implementation("org.apache.commons:commons-csv:1.14.0")
|
||||
implementation("io.coil-kt:coil-compose:2.7.0")
|
||||
ksp("androidx.room:room-compiler:2.7.2")
|
||||
kapt("androidx.hilt:hilt-compiler:1.2.0")
|
||||
kapt("com.google.dagger:dagger-compiler:2.46.1")
|
||||
kapt("com.google.dagger:hilt-android-compiler:2.46.1")
|
||||
kapt("com.google.dagger:dagger-compiler:2.56.2")
|
||||
kapt("com.google.dagger:hilt-android-compiler:2.56.2")
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
|
||||
|
||||
// Debug
|
||||
debugImplementation("androidx.compose.ui:ui-tooling:1.6.8")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest:1.6.8")
|
||||
debugImplementation("androidx.compose.ui:ui-tooling:1.8.3")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest:1.8.3")
|
||||
debugImplementation("com.google.android.glance.tools:appwidget-viewer:0.2.2")
|
||||
|
||||
// Testing
|
||||
androidTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
|
||||
androidTestImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.10.2")
|
||||
androidTestImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test:core:1.5.0")
|
||||
androidTestImplementation("androidx.test:runner:1.5.2")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
|
||||
androidTestImplementation("androidx.test:rules:1.5.0")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.5")
|
||||
androidTestImplementation("androidx.compose.ui:ui-test:1.6.8")
|
||||
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.6.8")
|
||||
androidTestImplementation("com.google.dagger:hilt-android-testing:2.46.1")
|
||||
kaptAndroidTest("com.google.dagger:hilt-android-compiler:2.46.1")
|
||||
}
|
||||
androidTestImplementation("androidx.test:core:1.6.1")
|
||||
androidTestImplementation("androidx.test:runner:1.6.2")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
|
||||
androidTestImplementation("androidx.test:rules:1.6.1")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.2.1")
|
||||
androidTestImplementation("androidx.compose.ui:ui-test:1.8.3")
|
||||
androidTestImplementation("androidx.compose.ui:ui-test-junit4:1.8.3")
|
||||
androidTestImplementation("com.google.dagger:hilt-android-testing:2.56.2")
|
||||
kaptAndroidTest("com.google.dagger:hilt-android-compiler:2.56.2")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
|
|||
import androidx.compose.foundation.interaction.collectIsPressedAsState
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material.ripple.rememberRipple
|
||||
import androidx.compose.material3.ripple
|
||||
import androidx.compose.material3.Card
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.*
|
||||
|
|
@ -89,7 +89,7 @@ fun FillCircleStub(
|
|||
.clip(CircleShape)
|
||||
.combinedClickable(
|
||||
interactionSource = interactionSource,
|
||||
indication = rememberRipple(),
|
||||
indication = ripple(),
|
||||
onClick = {
|
||||
coroutineScope.launch {
|
||||
if (!isPressed.value) {
|
||||
|
|
@ -157,4 +157,4 @@ private fun Preview() {
|
|||
FillCircleStub()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
|
|||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.material.ripple.rememberRipple
|
||||
import androidx.compose.material3.ripple
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
|
|
@ -39,7 +39,7 @@ fun BigIconButton(
|
|||
enabled = enabled,
|
||||
role = Role.Button,
|
||||
interactionSource = interactionSource,
|
||||
indication = rememberRipple(
|
||||
indication = ripple(
|
||||
bounded = false,
|
||||
color = contentColor,
|
||||
)
|
||||
|
|
@ -66,4 +66,4 @@ fun PreviewBigIconButton() {
|
|||
onClick = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.danilkinkin.buckwheat.base
|
|||
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.material.ripple.rememberRipple
|
||||
import androidx.compose.material3.ripple
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
|
|
@ -32,7 +32,7 @@ fun ButtonRow(
|
|||
modifier
|
||||
.clickable(
|
||||
interactionSource = interactionSource,
|
||||
indication = rememberRipple()
|
||||
indication = ripple()
|
||||
) { onClick.invoke() },
|
||||
icon = icon,
|
||||
iconInset = iconInset,
|
||||
|
|
@ -67,4 +67,4 @@ fun PreviewButtonRowWithoutIcon() {
|
|||
onClick = {},
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import androidx.compose.ui.text.input.KeyboardType
|
|||
import androidx.compose.ui.text.input.TextFieldValue
|
||||
import androidx.compose.ui.text.input.VisualTransformation
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.Constraints
|
||||
import androidx.compose.ui.unit.LayoutDirection
|
||||
import androidx.compose.ui.unit.Velocity
|
||||
|
|
@ -78,7 +79,16 @@ fun TextFieldWithPaddings(
|
|||
) {
|
||||
val context = LocalContext.current
|
||||
var textFieldValueState by remember { mutableStateOf(TextFieldValue(text = value)) }
|
||||
val textFieldValue = textFieldValueState.copy(text = value)
|
||||
|
||||
val textFieldValue = if (textFieldValueState.text != value) {
|
||||
val newCursorPosition = value.length.coerceAtMost(value.length)
|
||||
textFieldValueState.copy(
|
||||
text = value,
|
||||
selection = TextRange(newCursorPosition)
|
||||
)
|
||||
} else {
|
||||
textFieldValueState.copy(text = value)
|
||||
}
|
||||
|
||||
val scrollState = rememberScrollState()
|
||||
var containerHeight by remember { mutableStateOf(0) }
|
||||
|
|
@ -283,10 +293,13 @@ fun TextFieldWithPaddings(
|
|||
)
|
||||
}
|
||||
|
||||
LaunchedEffect(key1 = Unit) {
|
||||
textFieldValueState = textFieldValueState.copy(
|
||||
selection = TextRange(textFieldValueState.text.length)
|
||||
)
|
||||
LaunchedEffect(value) {
|
||||
if (textFieldValueState.text != value) {
|
||||
textFieldValueState = textFieldValueState.copy(
|
||||
text = value,
|
||||
selection = TextRange(value.length)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
DisposableEffect(value) {
|
||||
|
|
@ -314,10 +327,10 @@ fun calculateIntrinsics(input: String, style: TextStyle): Size {
|
|||
paragraphIntrinsics = intrinsics,
|
||||
constraints = Constraints(maxWidth = ceil(1000f).toInt()),
|
||||
maxLines = 1,
|
||||
ellipsis = false
|
||||
overflow = TextOverflow.Clip
|
||||
)
|
||||
|
||||
return Size(intrinsics.maxIntrinsicWidth.toInt(), paragraph.height.toInt())
|
||||
return Size(intrinsics.maxIntrinsicWidth.toInt(), paragraph.firstBaseline.toInt())
|
||||
}
|
||||
|
||||
data class Size(val width: Int, val height: Int)
|
||||
|
|
@ -339,4 +352,4 @@ fun Modifier.disabledHorizontalPointerInputScroll(
|
|||
return available.copy(y = 0f)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import androidx.compose.foundation.clickable
|
|||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.material.ripple.rememberRipple
|
||||
import androidx.compose.material3.ripple
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
|
|
@ -61,7 +61,7 @@ private fun DayContainer(
|
|||
enabled = !disabled,
|
||||
role = Role.Button,
|
||||
interactionSource = remember { MutableInteractionSource() },
|
||||
indication = rememberRipple(
|
||||
indication = ripple(
|
||||
bounded = false,
|
||||
radius = CELL_SIZE / 2,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import androidx.compose.ui.text.Paragraph
|
|||
import androidx.compose.ui.text.ParagraphIntrinsics
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.createFontFamilyResolver
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.Constraints
|
||||
import androidx.compose.ui.unit.Dp
|
||||
import androidx.compose.ui.unit.TextUnit
|
||||
|
|
@ -35,11 +36,11 @@ fun calcMaxFont(
|
|||
paragraphIntrinsics = intrinsics,
|
||||
constraints = Constraints(maxWidth = ceil(1000f).toInt()),
|
||||
maxLines = 1,
|
||||
ellipsis = false
|
||||
overflow = TextOverflow.Clip
|
||||
)
|
||||
|
||||
return with(LocalDensity.current) {
|
||||
((measureFontSize.toPx() / paragraph.height) * height).toSp()
|
||||
((measureFontSize.toPx() / paragraph.firstBaseline) * height).toSp()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -59,11 +60,11 @@ fun calcFontHeight(
|
|||
paragraphIntrinsics = intrinsics,
|
||||
constraints = Constraints(maxWidth = ceil(1000f).toInt()),
|
||||
maxLines = 1,
|
||||
ellipsis = false
|
||||
overflow = TextOverflow.Clip
|
||||
)
|
||||
|
||||
return with(LocalDensity.current) {
|
||||
paragraph.height.toDp()
|
||||
paragraph.firstBaseline.toDp()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -96,4 +97,4 @@ fun calcAdaptiveFont(
|
|||
}
|
||||
|
||||
return min(max(minFontSize, measureFontSize), maxFontSize)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import androidx.compose.foundation.layout.Box
|
|||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.size
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.ripple.rememberRipple
|
||||
import androidx.compose.material3.ripple
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
|
|
@ -84,7 +84,7 @@ fun KeyboardButton(
|
|||
.clip(RoundedCornerShape(radius.value))
|
||||
.combinedClickable(
|
||||
interactionSource = interactionSource,
|
||||
indication = rememberRipple(),
|
||||
indication = ripple(),
|
||||
onClick = { onClick.invoke() },
|
||||
onLongClick = { onLongClick.invoke() },
|
||||
),
|
||||
|
|
@ -135,4 +135,4 @@ private fun PreviewWithIcon() {
|
|||
icon = painterResource(R.drawable.ic_backspace)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,22 +3,23 @@ buildscript {
|
|||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.4.1")
|
||||
classpath("com.google.dagger:hilt-android-gradle-plugin:2.46")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22")
|
||||
classpath("com.diffplug.spotless:spotless-plugin-gradle:6.20.0")
|
||||
classpath("com.android.tools.build:gradle:8.11.0")
|
||||
classpath("com.google.dagger:hilt-android-gradle-plugin:2.56.2")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21")
|
||||
classpath("com.diffplug.spotless:spotless-plugin-gradle:7.0.4")
|
||||
classpath("com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1")
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
pluginManager.apply("com.diffplug.spotless")
|
||||
|
||||
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
|
||||
|
|
@ -38,6 +39,6 @@ subprojects {
|
|||
}
|
||||
|
||||
plugins {
|
||||
id("com.github.ben-manes.versions") version "0.47.0"
|
||||
id("com.google.devtools.ksp") version "1.9.22-1.0.17" apply false
|
||||
id("com.github.ben-manes.versions") version "0.52.0"
|
||||
id("com.google.devtools.ksp") version "2.0.21-1.0.28" apply false
|
||||
}
|
||||
|
|
|
|||
5
gradle/wrapper/gradle-wrapper.properties
vendored
5
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,7 +1,8 @@
|
|||
#Sun Jul 06 16:40:21 CEST 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
|
||||
distributionSha256Sum=bd71102213493060956ec229d946beee57158dbd89d0e62b91bca0fa2c5f3531
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
|
|
@ -7,14 +7,6 @@ pluginManagement {
|
|||
mavenCentral()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url = URI("https://jitpack.io") }
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "buckwheat"
|
||||
include(":app")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue