Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
springeye committed Jan 18, 2024
1 parent cb4eef4 commit 918ec13
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 96 deletions.
2 changes: 2 additions & 0 deletions composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ compose.desktop {
mainClass = "com.github.springeye.memosc.MainKt"
buildTypes.release {
proguard {
version="7.4.0"
isEnabled=false
configurationFiles.from("rules.pro")
obfuscate=true
}
}
nativeDistributions {
Expand Down
15 changes: 11 additions & 4 deletions composeApp/rules.pro
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
-dontwarn
-dontwarn org.apache.**
-dontwarn com.sun.**
-dontwarn javax.**
-dontwarn org.**
-keep class kotlinx.coroutines.** {*;}
-keep class org.jetbrains.skia.** {*;}
-keep class org.jetbrains.skiko.** {*;}
-keepclassmembernames class kotlinx.** {
volatile <fields>;
}
-keep public class MainKt {
-keepclasseswithmembers public class com.github.springeye.memosc.MainKt {
public void main();
}
-keepattributes *Annotation*

-keep class api.** {*;}
-keep class model.** {*;}
-keep class kotlin.Metadata { *; }


-keep class com.github.springeye.memosc.api.** {*;}
-keep class com.github.springeye.memosc.model.** {*;}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.github.springeye.memosc
package com.github.springeye.memosc.api
import com.github.springeye.memosc.model.Memo
import com.github.springeye.memosc.model.MemosRowStatus
import com.github.springeye.memosc.model.MemosVisibility
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.github.springeye.memosc.di
import com.github.springeye.memosc.AppPreferences
import com.github.springeye.memosc.CoreComponent
import com.github.springeye.memosc.CoreComponentImpl
import com.github.springeye.memosc.MemosApi
import com.github.springeye.memosc.api.MemosApi

import com.github.springeye.memosc.db.createAppDatabase
import com.github.springeye.memosc.db.model.AppDatabase
Expand All @@ -18,7 +18,6 @@ import com.github.springeye.memosc.ui.login.LoginScreenModel
import de.jensklingenberg.ktorfit.Ktorfit
import de.jensklingenberg.ktorfit.converter.builtin.CallConverterFactory
import de.jensklingenberg.ktorfit.ktorfit
import io.github.aakira.napier.Napier
import io.ktor.client.HttpClient
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
import io.ktor.client.plugins.cookies.CookiesStorage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package com.github.springeye.memosc.repository

import com.github.springeye.memosc.MemosApi
import com.github.springeye.memosc.api.MemosApi
import com.github.springeye.memosc.db.MemoQueryWhere
import com.github.springeye.memosc.model.Memo
import com.github.springeye.memosc.model.MemosRowStatus
import com.github.springeye.memosc.model.MemosVisibility
import kotlinx.coroutines.delay


class MemoRepository(private val api: MemosApi,) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@ package com.github.springeye.memosc.ui.app
import cafe.adriel.voyager.core.model.StateScreenModel
import cafe.adriel.voyager.core.model.screenModelScope
import com.github.springeye.memosc.AppPreferences
import com.github.springeye.memosc.MemosApi
import com.github.springeye.memosc.api.MemosApi
import com.github.springeye.memosc.getPlatform
import io.ktor.client.HttpClient
import io.ktor.client.call.body
import io.ktor.client.plugins.cookies.cookies
import io.ktor.client.request.get
import io.ktor.client.request.header
import io.ktor.client.statement.bodyAsText
import io.ktor.utils.io.printStack
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import kotlinx.serialization.json.Json

class AppScreenModel(private val api: MemosApi,
private val httpClient: HttpClient,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,56 +1,21 @@
package com.github.springeye.memosc.ui.home

import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.runtime.snapshotFlow
import androidx.paging.ExperimentalPagingApi
import androidx.paging.PagingConfig
import androidx.paging.PagingData
import androidx.paging.cachedIn
import androidx.paging.filter
import app.cash.paging.Pager
import app.cash.paging.map
import app.cash.sqldelight.Query
import app.cash.sqldelight.coroutines.asFlow
import app.cash.sqldelight.coroutines.mapToList
import cafe.adriel.voyager.core.model.ScreenModel
import cafe.adriel.voyager.core.model.screenModelScope
import com.github.springeye.memosc.CreateMemoInput
import com.github.springeye.memosc.MemosApi
import com.github.springeye.memosc.PatchMemoInput
import com.github.springeye.memosc.UpdateMemoOrganizerInput
import com.github.springeye.memosc.core.createIFile
import com.github.springeye.memosc.core.formatDate
import com.github.springeye.memosc.core.parseDate
import com.github.springeye.memosc.api.MemosApi
import com.github.springeye.memosc.api.UpdateMemoOrganizerInput
import com.github.springeye.memosc.db.MemoQueryWhere
import com.github.springeye.memosc.db.model.QueryQueries
import com.github.springeye.memosc.model.DailyUsageStat
import com.github.springeye.memosc.model.Memo
import com.github.springeye.memosc.model.MemosRowStatus
import com.github.springeye.memosc.model.MemosVisibility
import com.github.springeye.memosc.model.Resource
import com.github.springeye.memosc.model.calculateMatrix
import com.github.springeye.memosc.model.initialMatrix
import com.github.springeye.memosc.repository.MemoPagingSource
import com.github.springeye.memosc.repository.MemoRepository
import io.ktor.client.request.forms.MultiPartFormDataContent
import io.ktor.client.request.forms.formData
import io.ktor.http.Headers
import io.ktor.http.HttpHeaders
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import kotlinx.datetime.Instant
import org.jetbrains.compose.resources.LoadState

@OptIn(ExperimentalPagingApi::class)
class ArchivedModel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import app.cash.paging.Pager
import app.cash.sqldelight.Query
import cafe.adriel.voyager.core.model.ScreenModel
import cafe.adriel.voyager.core.model.screenModelScope
import com.github.springeye.memosc.CreateMemoInput
import com.github.springeye.memosc.MemosApi
import com.github.springeye.memosc.PatchMemoInput
import com.github.springeye.memosc.UpdateMemoOrganizerInput
import com.github.springeye.memosc.api.CreateMemoInput
import com.github.springeye.memosc.api.MemosApi
import com.github.springeye.memosc.api.PatchMemoInput
import com.github.springeye.memosc.api.UpdateMemoOrganizerInput
import com.github.springeye.memosc.core.createIFile
import com.github.springeye.memosc.core.formatDate
import com.github.springeye.memosc.core.parseDate
Expand All @@ -40,7 +40,6 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import kotlinx.datetime.Instant
import kotlinx.datetime.TimeZone
Expand Down
Original file line number Diff line number Diff line change
@@ -1,56 +1,20 @@
package com.github.springeye.memosc.ui.home

import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.compose.runtime.snapshotFlow
import androidx.paging.ExperimentalPagingApi
import androidx.paging.PagingConfig
import androidx.paging.PagingData
import androidx.paging.cachedIn
import androidx.paging.filter
import app.cash.paging.Pager
import app.cash.paging.map
import app.cash.sqldelight.Query
import app.cash.sqldelight.coroutines.asFlow
import app.cash.sqldelight.coroutines.mapToList
import cafe.adriel.voyager.core.model.ScreenModel
import cafe.adriel.voyager.core.model.screenModelScope
import com.github.springeye.memosc.CreateMemoInput
import com.github.springeye.memosc.MemosApi
import com.github.springeye.memosc.PatchMemoInput
import com.github.springeye.memosc.UpdateMemoOrganizerInput
import com.github.springeye.memosc.core.createIFile
import com.github.springeye.memosc.core.formatDate
import com.github.springeye.memosc.core.parseDate
import com.github.springeye.memosc.api.MemosApi
import com.github.springeye.memosc.api.UpdateMemoOrganizerInput
import com.github.springeye.memosc.db.MemoQueryWhere
import com.github.springeye.memosc.db.model.QueryQueries
import com.github.springeye.memosc.model.DailyUsageStat
import com.github.springeye.memosc.model.Memo
import com.github.springeye.memosc.model.MemosRowStatus
import com.github.springeye.memosc.model.MemosVisibility
import com.github.springeye.memosc.model.Resource
import com.github.springeye.memosc.model.calculateMatrix
import com.github.springeye.memosc.model.initialMatrix
import com.github.springeye.memosc.repository.MemoPagingSource
import com.github.springeye.memosc.repository.MemoRepository
import io.ktor.client.request.forms.MultiPartFormDataContent
import io.ktor.client.request.forms.formData
import io.ktor.http.Headers
import io.ktor.http.HttpHeaders
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.flatMapLatest
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import kotlinx.datetime.Instant
import org.jetbrains.compose.resources.LoadState

@OptIn(ExperimentalPagingApi::class)
class ProfileModel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ package com.github.springeye.memosc.ui.login
import cafe.adriel.voyager.core.model.StateScreenModel
import cafe.adriel.voyager.core.model.screenModelScope
import com.github.springeye.memosc.AppPreferences
import com.github.springeye.memosc.MemosApi
import com.github.springeye.memosc.SignInInput
import com.github.springeye.memosc.api.MemosApi
import com.github.springeye.memosc.api.SignInInput
import io.ktor.client.HttpClient
import io.ktor.http.isSuccess
import kotlinx.coroutines.launch
Expand Down

0 comments on commit 918ec13

Please sign in to comment.