Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion application/common_flows/wide_screen_common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@file:OptIn(ExperimentalWasmDsl::class)

import org.jetbrains.compose.compose
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
kotlin("multiplatform")
Expand All @@ -11,7 +14,13 @@ kotlin {
jvmToolchain(21)

jvm()
js(IR) {

js {
browser()
binaries.library()
}

wasmJs {
browser()
binaries.library()
}
Expand Down Expand Up @@ -62,6 +71,8 @@ kotlin {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material3)
implementation(libs.material.icons.core)


implementation(libs.compose.navigation)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<baseline version="1.0">
<file name="build.gradle.kts">
<error line="76" column="1" source="standard:no-consecutive-blank-lines" />
</file>
</baseline>
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ fun DesktopApp(

coroutineScope.launch {
navigationController.currentBackStackEntryFlow.collect { navEntry ->
val navigationType = navEntry.arguments?.getString(NAVIGATION_TYPE)
val navigationPath = navEntry.arguments?.getString(NAVIGATION_PATH)
val navigationType = navEntry.savedStateHandle.get<String?>(NAVIGATION_TYPE)
val navigationPath = navEntry.savedStateHandle.get<String?>(NAVIGATION_PATH)
if (navigationType != null && navigationPath != null) {
NotesNavigation.fromType(
NotesNavigationType.fromType(navigationType),
Expand All @@ -133,8 +133,8 @@ fun DesktopApp(
width = sideMenuWidth.dp,
homeClick = {
val navType = navigationController.currentBackStackEntry
?.arguments
?.getString(NAVIGATION_TYPE)
?.savedStateHandle
?.get<String>(NAVIGATION_TYPE)
?.let(NotesNavigationType::fromType)

if (navType != NotesNavigationType.ROOT) {
Expand All @@ -143,8 +143,8 @@ fun DesktopApp(
},
favoritesClick = {
val navType = navigationController.currentBackStackEntry
?.arguments
?.getString(NAVIGATION_TYPE)
?.savedStateHandle
?.get<String?>(NAVIGATION_TYPE)
?.let(NotesNavigationType::fromType)

if (navType != NotesNavigationType.FAVORITES) {
Expand Down
2 changes: 1 addition & 1 deletion application/composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ android {
buildConfigField("String", "BASE_URL", "\"$baseUrl\"")

applicationId = "io.writeopia"
minSdk = 24
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()
versionCode = 35
versionName = "0.22.0"
Expand Down
1 change: 1 addition & 0 deletions application/composeApp/proguard-rules-desktop.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
-dontwarn org.bouncycastle.**
-dontwarn org.openjsse.**
-dontwarn java.util.List
-dontwarn okhttp3.internal.graal.**

15 changes: 12 additions & 3 deletions application/core/auth_core/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@file:OptIn(ExperimentalWasmDsl::class)

import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
plugins {
alias(libs.plugins.androidLibrary)
Expand All @@ -12,7 +16,12 @@ kotlin {
jvm {}
androidTarget()

js(IR) {
js {
browser()
binaries.library()
}

wasmJs {
browser()
binaries.library()
}
Expand Down Expand Up @@ -47,7 +56,7 @@ kotlin {

implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.datetime)
//

implementation(libs.ktor.client.core)
}
Expand Down Expand Up @@ -87,7 +96,7 @@ android {
compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
minSdk = 24
minSdk = libs.versions.minSdk.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
7 changes: 5 additions & 2 deletions application/core/auth_core/config/ktlint/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
<error line="75" column="67" source="standard:function-expression-body" />
</file>
<file name="src/commonMain/kotlin/io/writeopia/auth/core/data/WorkspaceApi.kt">
<error line="52" column="84" source="standard:function-expression-body" />
<error line="55" column="84" source="standard:function-expression-body" />
</file>
<file name="src/commonMain/kotlin/io/writeopia/auth/core/manager/SqlDelightAuthRepository.kt">
<error line="16" column="51" source="standard:function-expression-body" />
<error line="19" column="51" source="standard:function-expression-body" />
</file>
<file name="src/commonMain/kotlin/io/writeopia/auth/core/utils/UserExtensions.kt">
<error line="7" column="52" source="standard:function-expression-body" />
</file>
<file name="src/webMain/kotlin/io/writeopia/auth/core/token/AppBearerTokenHandler.web.kt">
<error line="9" column="1" source="standard:no-consecutive-blank-lines" />
</file>
</baseline>
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalTime::class)

package io.writeopia.auth.core.repository

import io.writeopia.auth.core.manager.AuthRepository
Expand All @@ -7,6 +9,7 @@ import io.writeopia.common.utils.persistence.daos.WorkspaceCommonDao
import io.writeopia.sdk.models.workspace.Workspace
import io.writeopia.sdk.models.user.WriteopiaUser
import io.writeopia.sdk.models.utils.ResultData
import kotlin.time.ExperimentalTime

class RoomAuthRepository(
private val userDao: UserCommonDao,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalTime::class)

package io.writeopia.auth.core.data

import io.ktor.client.HttpClient
Expand All @@ -19,7 +21,8 @@ import io.writeopia.sdk.serialization.data.WorkspaceApi
import io.writeopia.sdk.serialization.data.toModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.datetime.Clock
import kotlin.time.Clock
import kotlin.time.ExperimentalTime

class WorkspaceApi(private val client: HttpClient, private val baseUrl: String) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalTime::class)

package io.writeopia.auth.core.manager

import io.writeopia.auth.core.utils.toModel
Expand All @@ -7,7 +9,8 @@ import io.writeopia.sdk.models.workspace.Workspace
import io.writeopia.sdk.models.user.WriteopiaUser
import io.writeopia.sdk.models.utils.ResultData
import io.writeopia.sql.WriteopiaDb
import kotlinx.datetime.Instant
import kotlin.time.ExperimentalTime
import kotlin.time.Instant

internal class SqlDelightAuthRepository(
private val writeopiaDb: WriteopiaDb?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class SqlDelightAuthRepositoryTest {
email = "someEmail",
)

repository.unselectAllUsers()
repository.saveUser(user, selected = true)
val userFromDb = repository.getUser()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ import io.writeopia.sdk.network.oauth.BearerTokenHandler
actual object AppBearerTokenHandler : BearerTokenHandler {
actual override suspend fun getIdToken(): String? = "mock"
}

15 changes: 12 additions & 3 deletions application/core/common_ui/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@file:OptIn(ExperimentalWasmDsl::class)

import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
kotlin("multiplatform")
alias(libs.plugins.compose.multiplatform)
Expand All @@ -12,7 +16,12 @@ kotlin {

androidTarget()

js(IR) {
js {
browser()
binaries.library()
}

wasmJs {
browser()
binaries.library()
}
Expand Down Expand Up @@ -45,7 +54,7 @@ kotlin {
implementation(compose.ui)
implementation(compose.components.uiToolingPreview)

implementation(libs.kotlinx.datetime)
//
}
}
}
Expand All @@ -56,7 +65,7 @@ android {
compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
minSdk = 24
minSdk = libs.versions.minSdk.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
@file:OptIn(ExperimentalTime::class)

package io.writeopia.commonui.extensions

import io.writeopia.commonui.dtos.MenuItemUi
import io.writeopia.sdk.models.document.Folder
import io.writeopia.sdk.models.document.Document
import io.writeopia.sdk.models.document.MenuItem
import io.writeopia.sdk.preview.PreviewParser
import kotlin.time.ExperimentalTime

fun Folder.toFolderUi(
selected: Boolean = false,
Expand Down
13 changes: 11 additions & 2 deletions application/core/configuration/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@file:OptIn(ExperimentalWasmDsl::class)

import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
kotlin("multiplatform")
alias(libs.plugins.androidLibrary)
Expand All @@ -10,7 +14,12 @@ kotlin {

androidTarget()

js(IR) {
js {
browser()
binaries.library()
}

wasmJs {
browser()
binaries.library()
}
Expand Down Expand Up @@ -50,7 +59,7 @@ android {
compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
minSdk = 24
minSdk = libs.versions.minSdk.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class InMemoryConfigurationRepository private constructor() : ConfigurationRepos
}

override suspend fun setTutorialNotes(hasTutorials: Boolean, userId: String) {
TODO("Not yet implemented")

}

override suspend fun isOnboarded(): Boolean = true
Expand Down
11 changes: 8 additions & 3 deletions application/core/connection/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ kotlin {

androidTarget()

js(IR) {
js {
browser()
binaries.library()
}

wasmJs {
browser()
binaries.library()
}
Expand All @@ -30,7 +35,7 @@ kotlin {
val commonMain by getting {
dependencies {
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.datetime)
//

implementation(libs.ktor.client.core)
implementation(libs.ktor.client.logging)
Expand All @@ -49,7 +54,7 @@ android {
compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
minSdk = 24
minSdk = libs.versions.minSdk.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
11 changes: 8 additions & 3 deletions application/core/documents/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ kotlin {

androidTarget()

js(IR) {
js {
browser()
binaries.library()
}

wasmJs {
browser()
binaries.library()
}
Expand Down Expand Up @@ -48,7 +53,7 @@ kotlin {
implementation(project(":common:endpoints"))

implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.datetime)
//
implementation(libs.ktor.client.core)
implementation(libs.kotlinx.serialization.json)
}
Expand All @@ -61,7 +66,7 @@ android {
compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
minSdk = 24
minSdk = libs.versions.minSdk.get().toInt()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
10 changes: 5 additions & 5 deletions application/core/documents/config/ktlint/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<error line="10" column="80" source="standard:function-expression-body" />
</file>
<file name="src/commonMain/kotlin/io/writeopia/core/folders/repository/folder/FolderRepositorySqlDelight.kt">
<error line="21" column="21" source="standard:function-expression-body" />
<error line="66" column="40" source="standard:function-expression-body" />
<error line="24" column="21" source="standard:function-expression-body" />
<error line="69" column="40" source="standard:function-expression-body" />
</file>
<file name="src/commonMain/kotlin/io/writeopia/core/folders/repository/folder/InMemoryFolderRepository.kt">
<error line="39" column="40" source="standard:function-expression-body" />
<error line="75" column="51" source="standard:function-expression-body" />
<error line="38" column="40" source="standard:function-expression-body" />
<error line="74" column="51" source="standard:function-expression-body" />
</file>
<file name="src/jsMain/kotlin/io/writeopia/core/folders/di/InDocumentSearchInjection.js.kt">
<file name="src/webMain/kotlin/io/writeopia/core/folders/di/InDocumentSearchInjection.web.kt">
<error line="7" column="74" source="standard:function-expression-body" />
</file>
</baseline>
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@file:OptIn(ExperimentalTime::class)

package io.writeopia.core.folders.api

import io.ktor.client.HttpClient
Expand All @@ -20,7 +22,8 @@ import io.writeopia.sdk.serialization.json.SendDocumentsRequest
import io.writeopia.sdk.serialization.json.SendFoldersRequest
import io.writeopia.sdk.serialization.request.WorkspaceDiffRequest
import io.writeopia.sdk.serialization.request.WorkspaceDiffResponse
import kotlinx.datetime.Instant
import kotlin.time.ExperimentalTime
import kotlin.time.Instant

class DocumentsApi(private val client: HttpClient, private val baseUrl: String) {

Expand Down
Loading