Skip to content

Commit

Permalink
Merge pull request #604 from shiosyakeyakini-info/feature/miria_v2
Browse files Browse the repository at this point in the history
Feature/miria v2
  • Loading branch information
shiosyakeyakini-info authored Nov 4, 2024
2 parents 5b5869c + bf842a0 commit 7f157ff
Show file tree
Hide file tree
Showing 467 changed files with 36,315 additions and 22,431 deletions.
3 changes: 3 additions & 0 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"flutter": "3.24.3"
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.freezed.dart linguist-generated=true
*.g.dart linguist-generated=true
14 changes: 8 additions & 6 deletions .github/workflows/aab_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,21 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Get Flutter version from .fvmrc
run: echo "FLUTTER_FVM_VERSION=$(jq -r .flutter .fvmrc)" >> $GITHUB_ENV

- name: Install flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{ env.FLUTTER_FVM_VERSION }}
cache: true

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
cache: 'gradle'


- name: Cache pubspec dependencies
uses: actions/cache@v4
Expand All @@ -53,14 +56,13 @@ jobs:
- name: Run flutter test with coverage
run: flutter test --coverage --coverage-path=~/coverage/lcov.info


- name: Create aab file
run: |
echo -n "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > ./android/release.keystore
export ANDROID_KEYSTORE_PASSWORD="${{ secrets.ANDROID_KEYSTORE_PASSWORD }}"
export ANDROID_KEY_ALIAS="${{ secrets.ANDROID_KEY_ALIAS }}"
export ANDROID_KEY_PASSWORD="${{ secrets.ANDROID_KEY_PASSWORD }}"
export ANDROID_KEY_PASSWORD="${{ secrets.ANDROID_KEY_PASSWORD }}"
flutter build appbundle --no-tree-shake-icons --release
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand All @@ -69,4 +71,4 @@ jobs:
# 保存するファイル
path: ./build/app/outputs/bundle/release/app-release.aab
# 保存期間(日)
retention-days: 3
retention-days: 3
12 changes: 10 additions & 2 deletions .github/workflows/dart_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,30 @@ jobs:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1

- run: dart format --output=none --set-exit-if-changed .

- name: Get Flutter version from .fvmrc
run: echo "FLUTTER_FVM_VERSION=$(jq -r .flutter .fvmrc)" >> $GITHUB_ENV

- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{ env.FLUTTER_FVM_VERSION }}
cache: true

- name: Run flutter version
run: flutter --version

- name: Run flutter pub get
run: flutter pub get

# ゆくゆくは
# - run: flutter analyze --fatal-infos

- name: Run flutter test with coverage
run: flutter test --coverage --coverage-path=~/coverage/lcov.info

- uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ~/coverage/lcov.info
file: ~/coverage/lcov.info
10 changes: 8 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Get Flutter version from .fvmrc
run: echo "FLUTTER_FVM_VERSION=$(jq -r .flutter .fvmrc)" >> $GITHUB_ENV

- name: Install flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{ env.FLUTTER_FVM_VERSION }}
cache: true

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'
cache: 'gradle'


Expand All @@ -43,6 +46,9 @@ jobs:
restore-keys: |
build-pubspec-
- name: Create symbolic link
run: ln -s ${{ env.FLUTTER_ROOT }} $HOME/work/flutter

- name: Flutter pub get
run: flutter pub get

Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/snap_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

name: デプロイ(snap)
on:
workflow_dispatch:
release:
types: [published]

permissions:
contents: write

jobs:
build:
name: ビルド(Snap)
runs-on: ubuntu-latest
strategy:
matrix:
platform: [amd64, arm64]
outputs:
snap: ${{ steps.snapcraft.outputs.snap }}
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Build Snap
id: snapcraft
uses: diddlesnaps/snapcraft-multiarch-action@v1
with:
architecture: ${{ matrix.platform }}

- name: Get Build Version
run: |
echo "VERSION=$(yq -r '.version' pubspec.yaml)" >> $GITHUB_ENV
- name: Upload snap
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload v$VERSION ${{ steps.snapcraft.outputs.snap }}
# https://gihyo.jp/admin/serial/01/ubuntu-recipe/0660#sec3 : Snapパッケージアップロードまでの流れ
# https://github.com/snapcore/action-publish : Snap ActionのREADME.md
# Snap Storeでパッケージ名"miria"を予約($ snapcraft register miria)後、"SNAPCRAFT_STORE_CREDENTIALS"を登録し、
# 以下をコメントアウトを解除することでSnap Storeへアップロードすることが可能です。
# 通常、SnapファイルをそのままStore外で公開することはありません。
#
#- name: Upload Snap Store
# uses: snapcore/action-publish@v1
# env:
# SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
# with:
# snap: ${{ steps.snapcraft.outputs.snap }}
# release: stable

18 changes: 14 additions & 4 deletions .github/workflows/windows_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Get Flutter version from .fvmrc
run: echo "FLUTTER_FVM_VERSION=$(jq -r .flutter .fvmrc)" >> $env:GITHUB_ENV

- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{ env.FLUTTER_FVM_VERSION }}
cache: true

- name: Flutter pub get
Expand All @@ -35,16 +38,23 @@ jobs:
run: |
flutter build windows --release
- name: Delete unnecessary DLL
run: |
rm build\windows\x64\runner\Release\api-ms-*.dll
rm build\windows\x64\runner\Release\concrt140.dll
rm build\windows\x64\runner\Release\msvcp*.dll
rm build\windows\x64\runner\Release\ucrtbas*.dll
rm build\windows\x64\runner\Release\vc*.dll
- name: Get translation files for Inno Setup
run: |
curl -o ${{ env.builddir }}\Korean.isl https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Korean.isl
curl -o ${{ env.builddir }}\ChineseSimplified.isl https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Unofficial/ChineseSimplified.isl
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/[email protected].4
uses: Minionguyjpro/[email protected].5
with:
path: windows/innosetup.iss
options: /dMyAppVersion="${{ env.version }}" /dMyWorkDir="${{ env.builddir }}"
options: /dMyAppVersion="${{ env.version }}" /dMyWorkDir="${{ env.builddir }}" /Qp

- name: Rename .EXE Installer
run: mv miria-installer.exe miria-installer_${env:version}_x64.exe
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,9 @@ app.*.map.json
**/build/

# Release
/private_keys/
/private_keys/

# Snap package related
*.snap
# FVM Version Cache
.fvm/
7 changes: 7 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
"request": "launch",
"type": "dart",
"flutterMode": "release"
},
{
"name": "debug current file",
"request": "launch",
"type": "dart",
"flutterMode": "debug",
"program": "${file}"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dart.flutterSdkPath": ".fvm/versions/3.24.3"
}
10 changes: 5 additions & 5 deletions README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ MiriaはiOS, Android向けMisskeyクライアントです。Windowsでも動作
- 「ページ」機能(閲覧のみ)
- サーバー情報の表示(オンラインユーザー数、ジョブキュー、広告、カスタム絵文字等)


### 機能に対する制限

- Miriaはサーバー独自の機能に基本的には対応していません。
Expand All @@ -44,14 +43,15 @@ MiriaはiOS, Android向けMisskeyクライアントです。Windowsでも動作
- MFMの見た目がブラウザと異なる場合があります。
- カスタムCSSは実装できません。

# コントリビュート

## コントリビュート

### ローカライズ

# ライセンス
[Issue #164](https://github.com/shiosyakeyakini-info/miria/issues/164)を確認してください。

## アイコンについて
## ライセンス

### アイコンについて

![Miriaのアイコン](/assets/images/icon.png)

Expand Down
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EN | [日本語](https://github.com/shiosyakeyakini-info/miria/blob/develop/README-ja.md)
EN | [日本語](https://github.com/shiosyakeyakini-info/miria/blob/develop/README-ja.md)

# Miria

Expand Down Expand Up @@ -33,19 +33,25 @@ I'm planning to deploy from F-Droid.

- Miria does not support forked server's unique features.
- Miria supports only over Misskey v13 and forked servers.
- [Sharkey](https://joinsharkey.org/), [CherryPick](https://github.com/kokonect-link/cherrypick) and [mkkey.net](https://mkkey.net/) may be available but did not test.
- [Firefish](https://joinfirefish.org/ja/), [Catodon](https://catodon.social/), Mastodon will not support in the future too.
- Miria does not support AiScript related features. (Plugin, Play)
- Miria does not depend browser features. ¥
- There are cases in which Miria's MFM appearance is different from browsers.
- [Sharkey](https://joinsharkey.org/), [CherryPick](https://github.com/kokonect-link/cherrypick) and [mkkey.net](https://mkkey.net/) may be available but did not test.
- [Firefish](https://joinfirefish.org/ja/), [Catodon](https://catodon.social/), Mastodon will not support in the future too.
- Miria does not support AiScript related features. (Plugin, Play)
- Miria does not depend browser features. ¥
- There are cases in which Miria's MFM appearance is different from browsers.
- Custom CSS didn't support.

# License
## Contribute

## About Miria Icon
### Localization

See [Issue #164](https://github.com/shiosyakeyakini-info/miria/issues/164).

## License

### About Miria Icon

![Miria Icon](/assets/images/icon.png)

Miria icons is avaiable `/assets/images/icon.png`

Miria icons is PD(Public Domain). you can use such as registering custom-emojis to your server.
Miria icons is PD(Public Domain). you can use such as registering custom-emojis to your server.
54 changes: 53 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,60 @@
include: package:flutter_lints/flutter.yaml

linter:
rules:
- always_use_package_imports
- avoid_dynamic_calls
- cancel_subscriptions
- close_sinks
- discarded_futures
- literal_only_boolean_expressions
- no_self_assignments
- prefer_void_to_null
- unnecessary_statements
- always_declare_return_types
- always_put_required_named_parameters_first
- avoid_bool_literals_in_conditional_expressions
- avoid_classes_with_only_static_members
- avoid_private_typedef_functions
# - avoid_redundant_argument_values
- avoid_returning_this
- avoid_setters_without_getters
- avoid_types_on_closure_parameters
- avoid_unused_constructor_parameters
- avoid_void_async
- cascade_invocations
- cast_nullable_to_non_nullable
- directives_ordering
- eol_at_end_of_file
- join_return_with_assignment
- matching_super_parameters
- no_literal_bool_comparisons
- omit_local_variable_types
- one_member_abstracts
- parameter_assignments
- prefer_asserts_in_initializer_lists
- prefer_constructors_over_static_methods
- prefer_double_quotes
- prefer_final_in_for_each
- prefer_final_locals
- avoid_final_parameters
- prefer_if_elements_to_conditional_expressions
- prefer_null_aware_method_calls
- require_trailing_commas
- unawaited_futures
- unnecessary_breaks
- unnecessary_null_aware_operator_on_extension_on_nullable
- unnecessary_null_checks
- unnecessary_parenthesis
- unnecessary_raw_strings

analyzer:
exclude:
- /**/*.freezed.dart
- /**/*.g.dart
- /**/*.g.dart
plugins:
- custom_lint
language:
# strict-casts: true
# strict-inference: true
# strict-raw-types: true
Loading

0 comments on commit 7f157ff

Please sign in to comment.