Skip to content

Commit 38b36bd

Browse files
authored
Merge pull request #43 from leo-lox/dev
test ci
2 parents b91c5eb + 150a8e9 commit 38b36bd

File tree

305 files changed

+13594
-13257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

305 files changed

+13594
-13257
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Flutter Android CI/CD
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
jobs:
7+
build-and-deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Set up Java
13+
uses: actions/setup-java@v3
14+
with:
15+
distribution: 'zulu'
16+
java-version: '11'
17+
18+
- name: Set up Flutter
19+
uses: subosito/flutter-action@v2
20+
with:
21+
flutter-version: '3.24.4'
22+
channel: 'stable'
23+
24+
- name: Install dependencies
25+
run: flutter pub get
26+
27+
28+
29+
- name: Setup Ruby
30+
uses: ruby/setup-ruby@v1
31+
with:
32+
ruby-version: '3.0'
33+
34+
- name: Install Fastlane
35+
run: |
36+
cd android
37+
gem install bundler
38+
bundle install
39+
40+
- name: Deploy to Test Track Play Store
41+
env:
42+
G_PLAY_FASTLANE_SERVICE_ACCOUNT: ${{ secrets.G_PLAY_FASTLANE_SERVICE_ACCOUNT }}
43+
run: |
44+
cd android
45+
bundle exec fastlane android beta

.github/workflows/tests.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: flutter CI
2+
3+
on:
4+
push:
5+
branches: [ dev, main ]
6+
pull_request:
7+
branches: [ dev, main ]
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: subosito/flutter-action@v2
14+
with:
15+
channel: 'stable'
16+
cache: true
17+
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
18+
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
19+
#architecture: x64 # optional, x64 or arm64
20+
- run: flutter --version
21+
- run: flutter test -j 1

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.buildlog/
99
.history
1010
.svn/
11+
.keys/
1112
migrate_working_dir/
1213

1314
# IntelliJ related
@@ -49,3 +50,20 @@ app.*.map.json
4950

5051
#
5152
NOTES.md
53+
54+
#db
55+
default.isar
56+
default.isar-lck
57+
isar.dll
58+
59+
# fastlane specific
60+
**/fastlane/report.xml
61+
62+
# deliver temporary files
63+
**/fastlane/Preview.html
64+
65+
# snapshot generated screenshots
66+
**/fastlane/screenshots
67+
68+
# scan temporary files
69+
**/fastlane/test_output

.metadata

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
# This file tracks properties of this Flutter project.
22
# Used by Flutter tool to assess capabilities and perform upgrades etc.
33
#
4-
# This file should be version controlled.
4+
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: f1875d570e39de09040c8f79aa13cc56baab8db1
8-
channel: stable
7+
revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819"
8+
channel: "stable"
99

1010
project_type: app
1111

1212
# Tracks metadata for the flutter migrate command
1313
migration:
1414
platforms:
1515
- platform: root
16-
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
17-
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
16+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
17+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
1818
- platform: android
19-
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
20-
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
19+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
20+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
2121
- platform: ios
22-
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
23-
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
22+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
23+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
2424
- platform: linux
25-
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
26-
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
25+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
26+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
2727
- platform: macos
28-
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
29-
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
28+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
29+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
3030
- platform: web
31-
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
32-
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
31+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
32+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
3333
- platform: windows
34-
create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
35-
base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
34+
create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
35+
base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
3636

3737
# User provided section
3838

README.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,33 @@
22

33
## What is it?
44

5-
camelus is a nostr client written in flutter, it is in heavy development, feel free to test it but expect some issues and missing features.
5+
camelus is a nostr microblogging client written in flutter, it is in heavy development. Feel free to test it, but expect some issues and missing features.
6+
The targeted platforms are mobile clients. Camelus uses dart_ndk as its core lib.
7+
Dart_ndk is maintained by camelus and yana, combining efforts to offer a usable nostr lib accounting for mobile constraints (battery, data). The lib also does the heavy lifting with inbox/outbox (gossip) and database optimizations.
68

7-
## What is the current mission?
89

9-
I want to transform camelus into a simple but usable client. If you are looking for fancy features, please look elsewhere.
10+
## architecture
11+
The project uses clean architecture; if you are new to this, look in `domain_layer/usecases` and `domain_layer/entities`. Entities represent data and use cases, the core business logic of camelus.
1012

11-
## how can I test it?
13+
dart_ndk is therefore included as an external lib.
14+
Because camelus and dart_ndk entities are very similar (e.g., `nostr_note`), the conversion is trivial and might raise the question, why not rely on dart_ndk entities? Right now, abstraction is not really needed, and there is a performance penalty. Still, it also offers a clear boundary to dart_ndk and allows us to deviate and experiment on camelus and dart_ndk in the future. In my opinion, this flexibility is more valuable if performance is good enough.
15+
16+
17+
To initialize the code, I use riverpod provider. Combined with clean architecture, it allows me to play Lego and manage dependencies in a central location, and expose it to the presentation_layer. A good example of this is `ndk_provider.dart`.
18+
I use the riverpod provider very similar to singeltons, but the riverpod provider provides a better way to test code.
19+
20+
21+
## state of the project
22+
23+
Right now, camelus is unusable/experimental state. We are right in the process of integrating dart_ndk into camelus, on the way cleaning up obsolete code and refactoring widgets. The goal is to have a reliable codebase that makes it easy for other developers (you?) to contribute to the project.
24+
25+
## Development
26+
27+
To get started, link dart_ndk in `pubspec.yaml` like this:
28+
```
29+
dart_ndk:
30+
path: ../dart_ndk
31+
```
1232

1333
### Android
1434

@@ -21,3 +41,16 @@ or use the [apk](https://camelus.app/), it is signed with my key so you will nee
2141
I don't have an iOS device so I can't test it, if you have an iOS device and want to test it, you can build it yourself, I will be happy to help you.
2242

2343
Otherwise wait for testflight to be available.
44+
45+
46+
# How to build
47+
48+
1. make sure flutter is installed
49+
50+
2. clone the repo
51+
52+
3. clone [dart_ndk](https://github.com/relaystr/dart_ndk) and depending on your folder structure edit pubspec.yaml to point to the correct path
53+
54+
4. run `flutter pub get`
55+
56+
5. run `flutter build apk --release` or `flutter run` to run directly on your device in debug mode

android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
/.keys/
89

910
# Remember to never publicly share your keystore.
1011
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app

android/Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source "https://rubygems.org"
2+
3+
gem "fastlane"

0 commit comments

Comments
 (0)