Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cierra-Runis committed Apr 9, 2024
2 parents a2a9df6 + d018fec commit cb3c9a8
Show file tree
Hide file tree
Showing 300 changed files with 5,639 additions and 4,150 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion README_ja.md → .github/README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p>『 Mercurius - 日記を書きましょう!』</p>

<a href="https://github.com/Cierra-Runis/mercurius/blob/master/README.md">English</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/README_zh.md">中文</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/README_ja.md">日本語</a>
<a href="https://github.com/Cierra-Runis/mercurius/blob/master/README.md">English</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/.github/README_zh.md">中文</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/.github/README_ja.md">日本語</a>

</div>

Expand Down
File renamed without changes.
55 changes: 54 additions & 1 deletion .github/image/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 16 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"blockquote",
"Buildless",
"checkmark",
"CRDT",
"Cupertino",
"diarys",
"displaymode",
Expand All @@ -15,6 +16,7 @@
"hitokoto",
"horiz",
"keframe",
"keypress",
"lerp",
"LTRB",
"mercurius",
Expand All @@ -25,6 +27,7 @@
"riverpod",
"Saira",
"salomon",
"scrollbars",
"startfile",
"syncfusion",
"timeago",
Expand All @@ -46,20 +49,21 @@
"**/.next": true,
"**/*.g.dart": true,
"**/*.freezed.dart": true,
"custom_lint.log": true,
"mercurius.iml": true,
".metadata": true,
".flutter-plugins": true,
".flutter-plugins-dependencies": true,
"build": true,
".idea": true,
".dart_tool": true,
"splitMap": true,
"lib/l10n/intl": true,
"lib/l10n/**/*.dart": true
"**/custom_lint.log": true,
"**/mercurius.iml": true,
"**/.metadata": true,
"**/.flutter-plugins": true,
"**/.flutter-plugins-dependencies": true,
"**/build": true,
"**/.idea": true,
"**/.dart_tool": true,
"**/splitMap": true,
"**/lib/l10n/intl": true,
"**/lib/l10n/**/*.dart": true
},
"commentTranslate.hover.string": true,
"commentTranslate.hover.variable": true,
"commentTranslate.multiLineMerge": true,
"explorerExclude.backup": {}
"explorerExclude.backup": {},
"java.configuration.updateBuildConfiguration": "automatic"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p>『 Mercurius - Write Some Diaries!』</p>

<a href="https://github.com/Cierra-Runis/mercurius/blob/master/README.md">English</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/README_zh.md">中文</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/README_ja.md">日本語</a>
<a href="https://github.com/Cierra-Runis/mercurius/blob/master/README.md">English</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/.github/README_zh.md">中文</a> | <a href="https://github.com/Cierra-Runis/mercurius/blob/master/.github/README_ja.md">日本語</a>

</div>

Expand Down
22 changes: 22 additions & 0 deletions SYNC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Sync

`A => B`

| id | createAt | editAt | hash | 情形 | 处理 |
| :-: | :------: | :----: | :--: | :------------------: | :-----------------------------------: |
| `=` | `=` | `=` | `=` | 两方完全相同 | 不做处理,两者步进 `id` |
| `=` | `=` | `=` | `!=` | 各自创建日记 | 两者新建错开,两者步进 `id` |
| `=` | `=` | `!=` | `=` | 各自修改未更新 | 两者都取 `editAt` 大者,两者步进 `id` |
| `=` | `=` | `!=` | `!=` | 各自修改更新 | 两者新建错开,两者步进 `id` |
| `=` | `!=` | `=` | `=` | 各自创建日记 | 两者新建错开,两者步进 `id` |
| `=` | `!=` | `=` | `!=` | 各自创建日记 | 两者新建错开,两者步进 `id` |
| `=` | `!=` | `!=` | `=` | 各自创建日记 | 两者新建错开,两者步进 `id` |
| `=` | `!=` | `!=` | `!=` | 各自创建日记 | 两者新建错开,两者步进 `id` |
| `>` | `-` | `-` | `-` | `A` 删除小 `id` 日记 | `B` 删除小 `id` 日记,`B` 步进 `id` |
| `<` | `-` | `-` | `-` | `A` 新建小 `id` 日记 | `B` 新增小 `id` 日记,`A` 步进 `id` |

## NOTE

- [关于离线优先应用的多端同步的思考和总结](https://www.auroras.xyz/blog/post/关于离线优先应用的多端同步的思考和总结/)
- [Isar CRDT](https://github.com/kerero/isar-crdt)
- [数据同步原理](https://segmentfault.com/a/1190000004887200)
11 changes: 0 additions & 11 deletions android/settings.gradle

This file was deleted.

7 changes: 3 additions & 4 deletions .gitignore → app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ app.*.map.json
/android/app/profile
/android/app/release

# release_tool
.release_tool/*
assets/fonts/**

*.g.dart
*.freezed.dart
lib/l10n/**/*.dart
lib/common/key.dart

.release_tool/
.env
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
38 changes: 20 additions & 18 deletions android/app/build.gradle → app/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}


def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
Expand All @@ -6,11 +13,6 @@ if (localPropertiesFile.exists()) {
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
Expand All @@ -21,10 +23,6 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 34
ndkVersion flutter.ndkVersion
Expand Down Expand Up @@ -53,34 +51,38 @@ android {
}

signingConfigs{
debug{
keyAlias 'key_alias'
keyPassword 'key_alias_password'
storeFile file('C:\\click\\key_alias.jks')
storePassword 'key_alias_password'
}
release{
keyAlias 'key_alias'
keyPassword 'key_alias_password'
storeFile file('C:\\click\\key_alias.jks')
storeFile file('D:\\Desktop\\Default\\key_alias.jks')
storePassword 'key_alias_password'
}
}

buildTypes {
debug {
signingConfig signingConfigs.debug
applicationIdSuffix ".debug"
}
release {
signingConfig signingConfigs.release
}
}

/// TIPS: https://juejin.cn/post/7330471268033478666
packagingOptions {
dex {
useLegacyPackaging true
}
jniLibs {
useLegacyPackaging true
}
}
}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.20"
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
</resources>
File renamed without changes.
15 changes: 2 additions & 13 deletions android/build.gradle → app/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
buildscript {
ext.kotlin_version = '1.7.20'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
Expand All @@ -21,6 +8,8 @@ allprojects {
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

Expand Down
File renamed without changes.
26 changes: 26 additions & 0 deletions app/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()

includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")

repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.1.3" apply false
id "org.jetbrains.kotlin.android" version "1.7.20" apply false
}

include ":app"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Bold.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Demibold.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-ExtraLight.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Heavy.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Light.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Medium.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Normal.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Regular.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Semibold.ttf
Binary file not shown.
Binary file added app/assets/fonts/MiSans/MiSans-Thin.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Black.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-BlackItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Bold.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-BoldItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-ExtraBold.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-ExtraBoldItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-ExtraLight.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-ExtraLightItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Italic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Light.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-LightItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Medium.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-MediumItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Regular.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-SemiBold.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-SemiBoldItalic.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-Thin.ttf
Binary file not shown.
Binary file added app/assets/fonts/Saira/Saira-ThinItalic.ttf
Binary file not shown.
Loading

0 comments on commit cb3c9a8

Please sign in to comment.