Skip to content

Commit

Permalink
feat: split project into app, common, cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Tienisto committed Sep 27, 2023
1 parent 7ae0e6b commit c77d89b
Show file tree
Hide file tree
Showing 410 changed files with 534 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutterSdkVersion": "3.13.2",
"flutterSdkVersion": "3.13.5",
"flavors": {}
}
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main]

env:
FLUTTER_VERSION: "3.13.2"
FLUTTER_VERSION: "3.13.5"

jobs:
format:
Expand All @@ -20,8 +20,10 @@ jobs:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: "stable"
- name: Dependencies
working-directory: app
run: flutter pub get
- name: Check format
working-directory: app
run: dart format --line-length 150 --set-exit-if-changed lib test

test:
Expand All @@ -34,10 +36,14 @@ jobs:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: "stable"
- name: Dependencies
working-directory: app
run: flutter pub get
- name: Build generated files
working-directory: app
run: flutter pub run build_runner build -d
- name: Analyze
working-directory: app
run: flutter analyze
- name: Test
working-directory: app
run: flutter test
17 changes: 12 additions & 5 deletions .github/workflows/linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:

env:
FLUTTER_VERSION: "3.13.2"
FLUTTER_VERSION: "3.13.5"
APK_BUILD_DIR: "/tmp/build"

jobs:
Expand All @@ -18,6 +18,7 @@ jobs:

- name: Get version from pubspec.yaml
id: get_version
working-directory: app
run: |
VERSION=$(sed -n 's/^version: \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/p' pubspec.yaml)
echo "version=$VERSION" >> $GITHUB_OUTPUT
Expand All @@ -28,16 +29,18 @@ jobs:
channel: "stable"

- name: Dependencies
working-directory: app
run: flutter pub get

- name: Build generated files
working-directory: app
run: flutter pub run build_runner build -d

- name: Upload updated lib files with generated code
uses: actions/upload-artifact@v3
with:
name: lib-files
path: ./lib/*
path: ./app/lib/*

build_appimage:
needs: build
Expand All @@ -50,7 +53,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: lib-files
path: lib
path: app/lib

- name: Install dependencies
run: |
Expand All @@ -63,17 +66,21 @@ jobs:
channel: "stable"

- name: Dependencies
working-directory: app
run: flutter pub get

- name: Compile linux
working-directory: app
run: flutter build linux

- name: Copy compiled linux files
working-directory: app
run: |
mkdir AppDir
cp -r build/linux/x64/release/bundle/* AppDir/
- name: Copy logo to AppDir
working-directory: app
run: |
mkdir -p AppDir/usr/share/icons/hicolor/32x32/apps
cp assets/img/logo-32.png AppDir/usr/share/icons/hicolor/32x32/apps/localsend.png
Expand All @@ -85,10 +92,10 @@ jobs:
- name: Build AppImage
uses: AppImageCrafters/build-appimage@57c3bc6963f870ce3be103117de5b5e33ffbaeb6
with:
recipe: ./AppImageBuilder.yml
recipe: ./app/AppImageBuilder.yml

- name: Upload AppImage file
uses: actions/upload-artifact@v3
with:
name: appimage-result
path: ./*.AppImage
path: ./app/*.AppImage
51 changes: 3 additions & 48 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,57 +1,12 @@
/.fvm/flutter_sdk
.idea

# Linux AppImage
/AppDir
/appimage-build
/app/AppDir
/app/appimage-build

*.g.dart
*.gen.dart
*.freezed.dart

/secrets

# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
/dist/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
45 changes: 0 additions & 45 deletions .metadata

This file was deleted.

2 changes: 1 addition & 1 deletion CHANGELOG.md
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ You can help translating this app to other languages!

1. Fork this repository
2. Choose one
- Add missing translations in existing languages: Only update `_missing_translations_<locale>.json` in [assets/i18n](https://github.com/localsend/localsend/tree/main/assets/i18n)
- Fix existing translations: Update `strings_<locale>.i18n.json` in [assets/i18n](https://github.com/localsend/localsend/tree/main/assets/i18n)
- Add missing translations in existing languages: Only update `_missing_translations_<locale>.json` in [assets/i18n](https://github.com/localsend/localsend/tree/main/app/assets/i18n)
- Fix existing translations: Update `strings_<locale>.i18n.json` in [assets/i18n](https://github.com/localsend/localsend/tree/main/app/assets/i18n)
- Add new languages: Create a new file, see also: [locale codes](https://saimana.com/list-of-country-locale-code/).
3. Optional: Re-run this app
1. Make sure you have [run](#run) this app once.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ LocalSend is a cross-platform app that enables secure communication between devi

It is recommended to download the app either from an app store or from a package manager because the app does not have auto-update.

| Windows | macOS | Linux | Android | iOS | Fire OS |
| Windows | macOS | Linux | Android | iOS | Fire OS |
|--------------------------|-------------------------|--------------------|----------------|---------------|------------|
| [Winget][] | [App Store][] | [Flathub][] | [Play Store][] | [App Store][] | [Amazon][] |
| [Scoop][] | [Homebrew][] | [AUR][] | [F-Droid][] | | |
Expand Down Expand Up @@ -106,7 +106,7 @@ You can help translating this app to other languages!
3. Run app via `flutter run`
4. Open a pull request

[i18n]: https://github.com/localsend/localsend/tree/main/assets/i18n
[i18n]: https://github.com/localsend/localsend/tree/main/app/assets/i18n
[locale codes]: https://saimana.com/list-of-country-locale-code/

#### _Take note:_ Fields decorated with `@` are not meant to be translated, they are not used in the app in any way, being merely informative text about the file or to give context to the translator.
Expand Down
45 changes: 45 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
/dist/

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit c77d89b

Please sign in to comment.