mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-07 21:37:02 +09:00
DROID-503 App | Tech | Upgrade to Kotlin 2.0 (#1328)
This commit is contained in:
parent
c27a21282b
commit
b52709684d
10 changed files with 34 additions and 46 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -21,4 +21,5 @@
|
|||
ktlint
|
||||
.idea/*.xml
|
||||
signing.properties
|
||||
app/release
|
||||
app/release
|
||||
.kotlin/
|
|
@ -2,6 +2,7 @@ plugins {
|
|||
id "com.android.application"
|
||||
id "kotlin-android"
|
||||
id "kotlin-kapt"
|
||||
alias(libs.plugins.compose.compiler)
|
||||
id "com.google.firebase.appdistribution"
|
||||
}
|
||||
|
||||
|
@ -119,10 +120,6 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion libs.versions.composeKotlinCompilerVersion.get()
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
compose true
|
||||
|
|
|
@ -40,6 +40,7 @@ plugins {
|
|||
alias(libs.plugins.application) apply false
|
||||
alias(libs.plugins.library) apply false
|
||||
alias(libs.plugins.kotlinAndroid) apply false
|
||||
alias(libs.plugins.compose.compiler) apply false
|
||||
alias(libs.plugins.kserialization) apply false
|
||||
alias(libs.plugins.wire) apply false
|
||||
alias(libs.plugins.dokka) apply false
|
||||
|
|
|
@ -2,6 +2,7 @@ plugins {
|
|||
id "com.android.library"
|
||||
id "kotlin-android"
|
||||
id "kotlin-parcelize"
|
||||
alias(libs.plugins.compose.compiler)
|
||||
}
|
||||
|
||||
android {
|
||||
|
@ -9,10 +10,6 @@ android {
|
|||
defaultConfig {
|
||||
buildConfigField "boolean", "USE_NEW_WINDOW_INSET_API", "true"
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion libs.versions.composeKotlinCompilerVersion.get()
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
plugins {
|
||||
id "com.android.library"
|
||||
id "kotlin-android"
|
||||
alias(libs.plugins.compose.compiler)
|
||||
}
|
||||
|
||||
android {
|
||||
|
@ -11,10 +12,6 @@ android {
|
|||
compose true
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion libs.versions.composeKotlinCompilerVersion.get()
|
||||
}
|
||||
|
||||
namespace 'com.anytypeio.anytype.galleryexperience'
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
[versions]
|
||||
middlewareVersion = "v0.34.3"
|
||||
kotlinVersion = '1.9.22'
|
||||
kotlinVersion = '2.0.0'
|
||||
|
||||
androidxCoreVersion = "1.13.0"
|
||||
|
||||
androidxComposeVersion = '1.6.8'
|
||||
composeKotlinCompilerVersion = '1.5.10'
|
||||
composeMaterial3Version = '1.2.1'
|
||||
composeMaterialVersion = '1.6.6'
|
||||
composeConstraintLayoutVersion = '1.0.1'
|
||||
|
@ -21,7 +20,7 @@ fragmentVersion = "1.8.0"
|
|||
exoplayerVersion = "2.19.1"
|
||||
wireVersion = "4.9.8"
|
||||
glideVersion = "4.14.2"
|
||||
mockitoKotlinVersion = "5.2.1"
|
||||
mockitoKotlinVersion = "5.3.1"
|
||||
junitVersion = '4.13.2'
|
||||
androidJunitVersion = "1.1.5"
|
||||
runnerVersion = "1.5.2"
|
||||
|
@ -176,6 +175,8 @@ playBilling = { module = "com.android.billingclient:billing", version = "7.0.0"
|
|||
application = { id = "com.android.application", version = "8.4.1" }
|
||||
library = { id = "com.android.library", version = "8.4.1" }
|
||||
kotlinAndroid = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVersion" }
|
||||
org-jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlinVersion" }
|
||||
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlinVersion" }
|
||||
dokka = { id = "org.jetbrains.dokka", version.ref = "dokkaVersion" }
|
||||
kserialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlinVersion" }
|
||||
wire = { id = "com.squareup.wire", version = "4.9.8" }
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
plugins {
|
||||
id "com.android.library"
|
||||
id "kotlin-android"
|
||||
alias(libs.plugins.compose.compiler)
|
||||
}
|
||||
|
||||
android {
|
||||
|
@ -8,9 +9,6 @@ android {
|
|||
compose true
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion libs.versions.composeKotlinCompilerVersion.get()
|
||||
}
|
||||
namespace 'com.anytypeio.anytype.payments'
|
||||
|
||||
testOptions {
|
||||
|
|
|
@ -97,6 +97,7 @@ import org.junit.Before
|
|||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.mockito.ArgumentMatchers
|
||||
import org.mockito.ArgumentMatchers.anyString
|
||||
import org.mockito.BDDMockito.given
|
||||
import org.mockito.Mock
|
||||
import org.mockito.Mockito
|
||||
|
@ -277,7 +278,7 @@ class HomeScreenViewModelTest {
|
|||
stubConfig()
|
||||
stubInterceptEvents(events)
|
||||
stubOpenWidgetObject(givenObjectView)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
stubSpaceWidgetContainer(defaultSpaceWidgetView)
|
||||
|
@ -337,7 +338,7 @@ class HomeScreenViewModelTest {
|
|||
stubConfig()
|
||||
stubInterceptEvents(events = emptyFlow())
|
||||
stubOpenWidgetObject(givenObjectView)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
stubSpaceWidgetContainer(defaultSpaceWidgetView)
|
||||
|
@ -423,7 +424,7 @@ class HomeScreenViewModelTest {
|
|||
subscription = widgetBlock.id,
|
||||
targets = emptyList()
|
||||
)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubWidgetActiveView(widgetBlock)
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
|
@ -530,7 +531,7 @@ class HomeScreenViewModelTest {
|
|||
results = listOf(firstLink, secondLink)
|
||||
)
|
||||
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubWidgetActiveView(widgetBlock)
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
|
@ -645,7 +646,7 @@ class HomeScreenViewModelTest {
|
|||
results = listOf(firstLink, secondLink)
|
||||
)
|
||||
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubWidgetActiveView(widgetBlock)
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
|
@ -747,7 +748,7 @@ class HomeScreenViewModelTest {
|
|||
results = listOf(firstLink, secondLink)
|
||||
)
|
||||
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubWidgetActiveView(widgetBlock)
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
|
@ -946,7 +947,7 @@ class HomeScreenViewModelTest {
|
|||
results = listOf(firstLink, secondLink)
|
||||
)
|
||||
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubWidgetActiveView(favoriteWidgetBlock)
|
||||
|
||||
|
@ -1096,7 +1097,7 @@ class HomeScreenViewModelTest {
|
|||
subscription = widgetBlock.id,
|
||||
targets = emptyList()
|
||||
)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
stubSpaceWidgetContainer(defaultSpaceWidgetView)
|
||||
|
@ -1187,7 +1188,7 @@ class HomeScreenViewModelTest {
|
|||
subscription = widgetBlock.id,
|
||||
targets = emptyList()
|
||||
)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubSaveWidgetSession()
|
||||
stubGetDefaultPageType()
|
||||
|
@ -1310,7 +1311,7 @@ class HomeScreenViewModelTest {
|
|||
subscription = widgetBlock.id,
|
||||
targets = emptyList()
|
||||
)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
stubSpaceWidgetContainer(defaultSpaceWidgetView)
|
||||
|
@ -1380,7 +1381,7 @@ class HomeScreenViewModelTest {
|
|||
subscription = widgetBlock.id,
|
||||
targets = emptyList()
|
||||
)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubCloseObject()
|
||||
stubSpaceManager()
|
||||
|
@ -1518,7 +1519,7 @@ class HomeScreenViewModelTest {
|
|||
results = listOf(firstLink, secondLink)
|
||||
)
|
||||
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubWidgetActiveView(favoriteWidgetBlock)
|
||||
stubSpaceManager()
|
||||
|
@ -1700,7 +1701,7 @@ class HomeScreenViewModelTest {
|
|||
results = listOf(firstLink, secondLink)
|
||||
)
|
||||
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubWidgetActiveView(favoriteWidgetBlock)
|
||||
stubCloseObject()
|
||||
|
@ -1922,7 +1923,7 @@ class HomeScreenViewModelTest {
|
|||
results = listOf(firstLink, secondLink)
|
||||
)
|
||||
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubWidgetActiveView(favoriteWidgetBlock)
|
||||
stubFavoritesObjectWatcher()
|
||||
|
@ -2076,7 +2077,7 @@ class HomeScreenViewModelTest {
|
|||
subscription = widgetBlock.id,
|
||||
targets = emptyList()
|
||||
)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
|
||||
stubObserveSpaceObject()
|
||||
stubGetWidgetSession()
|
||||
|
@ -2157,7 +2158,7 @@ class HomeScreenViewModelTest {
|
|||
subscription = widgetBlock.id,
|
||||
targets = emptyList()
|
||||
)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
stubSpaceWidgetContainer(defaultSpaceWidgetView)
|
||||
|
@ -2226,7 +2227,7 @@ class HomeScreenViewModelTest {
|
|||
subscription = widgetBlock.id,
|
||||
targets = emptyList()
|
||||
)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
stubSpaceWidgetContainer(defaultSpaceWidgetView)
|
||||
|
@ -2314,7 +2315,7 @@ class HomeScreenViewModelTest {
|
|||
subscription = widgetBlock.id,
|
||||
targets = emptyList()
|
||||
)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
stubSpaceWidgetContainer(defaultSpaceWidgetView)
|
||||
|
@ -2403,7 +2404,7 @@ class HomeScreenViewModelTest {
|
|||
subscription = widgetBlock.id,
|
||||
targets = emptyList()
|
||||
)
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubSpaceManager()
|
||||
stubSpaceWidgetContainer(defaultSpaceWidgetView)
|
||||
|
@ -2563,7 +2564,7 @@ class HomeScreenViewModelTest {
|
|||
results = emptyList()
|
||||
)
|
||||
|
||||
stubCollapsedWidgetState(any())
|
||||
stubCollapsedWidgetState(id = anyString())
|
||||
stubGetWidgetSession()
|
||||
stubGetDefaultPageType()
|
||||
stubObserveSpaceObject()
|
||||
|
|
|
@ -2,6 +2,7 @@ plugins {
|
|||
id "com.android.application"
|
||||
id "kotlin-android"
|
||||
id "kotlin-kapt"
|
||||
alias(libs.plugins.compose.compiler)
|
||||
id 'com.google.gms.google-services'
|
||||
}
|
||||
|
||||
|
@ -34,9 +35,6 @@ android {
|
|||
compose true
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion libs.versions.composeKotlinCompilerVersion.get()
|
||||
}
|
||||
namespace 'com.anytypeio.anytype.sample'
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
plugins {
|
||||
id "com.android.library"
|
||||
id "kotlin-android"
|
||||
alias(libs.plugins.compose.compiler)
|
||||
}
|
||||
|
||||
android {
|
||||
|
@ -11,10 +12,6 @@ android {
|
|||
compose true
|
||||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion libs.versions.composeKotlinCompilerVersion.get()
|
||||
}
|
||||
|
||||
namespace 'com.anytypeio.anytype.ui_settings'
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue