diff --git a/.github/workflows/build-android-app.yml b/.github/workflows/build-android-app.yml
new file mode 100644
index 00000000..e985b692
--- /dev/null
+++ b/.github/workflows/build-android-app.yml
@@ -0,0 +1,45 @@
+name: Flutter Android CI/CD
+
+on:
+ push:
+ branches: [ main ]
+jobs:
+ build-and-deploy:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up Java
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'zulu'
+ java-version: '11'
+
+ - name: Set up Flutter
+ uses: subosito/flutter-action@v2
+ with:
+ flutter-version: '3.24.4'
+ channel: 'stable'
+
+ - name: Install dependencies
+ run: flutter pub get
+
+
+
+ - name: Setup Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: '3.0'
+
+ - name: Install Fastlane
+ run: |
+ cd android
+ gem install bundler
+ bundle install
+
+ - name: Deploy to Test Track Play Store
+ env:
+ G_PLAY_FASTLANE_SERVICE_ACCOUNT: ${{ secrets.G_PLAY_FASTLANE_SERVICE_ACCOUNT }}
+ run: |
+ cd android
+ bundle exec fastlane android beta
\ No newline at end of file
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 00000000..78ff3ecc
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,21 @@
+name: flutter CI
+
+on:
+ push:
+ branches: [ dev, main ]
+ pull_request:
+ branches: [ dev, main ]
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: subosito/flutter-action@v2
+ with:
+ channel: 'stable'
+ cache: true
+ cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
+ cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
+ #architecture: x64 # optional, x64 or arm64
+ - run: flutter --version
+ - run: flutter test -j 1
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 15edab5e..1667066e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,7 @@
.buildlog/
.history
.svn/
+.keys/
migrate_working_dir/
# IntelliJ related
@@ -49,3 +50,20 @@ app.*.map.json
#
NOTES.md
+
+#db
+default.isar
+default.isar-lck
+isar.dll
+
+# fastlane specific
+**/fastlane/report.xml
+
+# deliver temporary files
+**/fastlane/Preview.html
+
+# snapshot generated screenshots
+**/fastlane/screenshots
+
+# scan temporary files
+**/fastlane/test_output
\ No newline at end of file
diff --git a/.metadata b/.metadata
index 39f2501e..90eabcff 100644
--- a/.metadata
+++ b/.metadata
@@ -1,11 +1,11 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
-# This file should be version controlled.
+# This file should be version controlled and should not be manually edited.
version:
- revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- channel: stable
+ revision: "80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819"
+ channel: "stable"
project_type: app
@@ -13,26 +13,26 @@ project_type: app
migration:
platforms:
- platform: root
- create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+ create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
+ base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
- platform: android
- create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+ create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
+ base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
- platform: ios
- create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+ create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
+ base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
- platform: linux
- create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+ create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
+ base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
- platform: macos
- create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+ create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
+ base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
- platform: web
- create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+ create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
+ base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
- platform: windows
- create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
+ create_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
+ base_revision: 80c2e84975bbd28ecf5f8d4bd4ca5a2490bfc819
# User provided section
diff --git a/README.md b/README.md
index b3f63c58..1d4acf29 100644
--- a/README.md
+++ b/README.md
@@ -2,13 +2,33 @@
## What is it?
-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.
+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.
+The targeted platforms are mobile clients. Camelus uses dart_ndk as its core lib.
+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.
-## What is the current mission?
-I want to transform camelus into a simple but usable client. If you are looking for fancy features, please look elsewhere.
+## architecture
+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.
-## how can I test it?
+dart_ndk is therefore included as an external lib.
+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.
+
+
+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`.
+I use the riverpod provider very similar to singeltons, but the riverpod provider provides a better way to test code.
+
+
+## state of the project
+
+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.
+
+## Development
+
+To get started, link dart_ndk in `pubspec.yaml` like this:
+```
+ dart_ndk:
+ path: ../dart_ndk
+```
### Android
@@ -21,3 +41,16 @@ or use the [apk](https://camelus.app/), it is signed with my key so you will nee
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.
Otherwise wait for testflight to be available.
+
+
+# How to build
+
+1. make sure flutter is installed
+
+2. clone the repo
+
+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
+
+4. run `flutter pub get`
+
+5. run `flutter build apk --release` or `flutter run` to run directly on your device in debug mode
\ No newline at end of file
diff --git a/android/.gitignore b/android/.gitignore
index 6f568019..bc8b9cb9 100644
--- a/android/.gitignore
+++ b/android/.gitignore
@@ -5,6 +5,7 @@ gradle-wrapper.jar
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
+/.keys/
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
diff --git a/android/Gemfile b/android/Gemfile
new file mode 100644
index 00000000..7a118b49
--- /dev/null
+++ b/android/Gemfile
@@ -0,0 +1,3 @@
+source "https://rubygems.org"
+
+gem "fastlane"
diff --git a/android/Gemfile.lock b/android/Gemfile.lock
new file mode 100644
index 00000000..2e6b3e9a
--- /dev/null
+++ b/android/Gemfile.lock
@@ -0,0 +1,217 @@
+GEM
+ remote: https://rubygems.org/
+ specs:
+ CFPropertyList (3.0.6)
+ rexml
+ addressable (2.8.5)
+ public_suffix (>= 2.0.2, < 6.0)
+ artifactory (3.0.15)
+ atomos (0.1.3)
+ aws-eventstream (1.2.0)
+ aws-partitions (1.828.0)
+ aws-sdk-core (3.183.1)
+ aws-eventstream (~> 1, >= 1.0.2)
+ aws-partitions (~> 1, >= 1.651.0)
+ aws-sigv4 (~> 1.5)
+ jmespath (~> 1, >= 1.6.1)
+ aws-sdk-kms (1.71.0)
+ aws-sdk-core (~> 3, >= 3.177.0)
+ aws-sigv4 (~> 1.1)
+ aws-sdk-s3 (1.136.0)
+ aws-sdk-core (~> 3, >= 3.181.0)
+ aws-sdk-kms (~> 1)
+ aws-sigv4 (~> 1.6)
+ aws-sigv4 (1.6.0)
+ aws-eventstream (~> 1, >= 1.0.2)
+ babosa (1.0.4)
+ claide (1.1.0)
+ colored (1.2)
+ colored2 (3.1.2)
+ commander (4.6.0)
+ highline (~> 2.0.0)
+ declarative (0.0.20)
+ digest-crc (0.6.5)
+ rake (>= 12.0.0, < 14.0.0)
+ domain_name (0.5.20190701)
+ unf (>= 0.0.5, < 1.0.0)
+ dotenv (2.8.1)
+ emoji_regex (3.2.3)
+ excon (0.103.0)
+ faraday (1.10.3)
+ faraday-em_http (~> 1.0)
+ faraday-em_synchrony (~> 1.0)
+ faraday-excon (~> 1.1)
+ faraday-httpclient (~> 1.0)
+ faraday-multipart (~> 1.0)
+ faraday-net_http (~> 1.0)
+ faraday-net_http_persistent (~> 1.0)
+ faraday-patron (~> 1.0)
+ faraday-rack (~> 1.0)
+ faraday-retry (~> 1.0)
+ ruby2_keywords (>= 0.0.4)
+ faraday-cookie_jar (0.0.7)
+ faraday (>= 0.8.0)
+ http-cookie (~> 1.0.0)
+ faraday-em_http (1.0.0)
+ faraday-em_synchrony (1.0.0)
+ faraday-excon (1.1.0)
+ faraday-httpclient (1.0.1)
+ faraday-multipart (1.0.4)
+ multipart-post (~> 2)
+ faraday-net_http (1.0.1)
+ faraday-net_http_persistent (1.2.0)
+ faraday-patron (1.0.0)
+ faraday-rack (1.0.0)
+ faraday-retry (1.0.3)
+ faraday_middleware (1.2.0)
+ faraday (~> 1.0)
+ fastimage (2.2.7)
+ fastlane (2.216.0)
+ CFPropertyList (>= 2.3, < 4.0.0)
+ addressable (>= 2.8, < 3.0.0)
+ artifactory (~> 3.0)
+ aws-sdk-s3 (~> 1.0)
+ babosa (>= 1.0.3, < 2.0.0)
+ bundler (>= 1.12.0, < 3.0.0)
+ colored
+ commander (~> 4.6)
+ dotenv (>= 2.1.1, < 3.0.0)
+ emoji_regex (>= 0.1, < 4.0)
+ excon (>= 0.71.0, < 1.0.0)
+ faraday (~> 1.0)
+ faraday-cookie_jar (~> 0.0.6)
+ faraday_middleware (~> 1.0)
+ fastimage (>= 2.1.0, < 3.0.0)
+ gh_inspector (>= 1.1.2, < 2.0.0)
+ google-apis-androidpublisher_v3 (~> 0.3)
+ google-apis-playcustomapp_v1 (~> 0.1)
+ google-cloud-storage (~> 1.31)
+ highline (~> 2.0)
+ http-cookie (~> 1.0.5)
+ json (< 3.0.0)
+ jwt (>= 2.1.0, < 3)
+ mini_magick (>= 4.9.4, < 5.0.0)
+ multipart-post (>= 2.0.0, < 3.0.0)
+ naturally (~> 2.2)
+ optparse (~> 0.1.1)
+ plist (>= 3.1.0, < 4.0.0)
+ rubyzip (>= 2.0.0, < 3.0.0)
+ security (= 0.1.3)
+ simctl (~> 1.6.3)
+ terminal-notifier (>= 2.0.0, < 3.0.0)
+ terminal-table (~> 3)
+ tty-screen (>= 0.6.3, < 1.0.0)
+ tty-spinner (>= 0.8.0, < 1.0.0)
+ word_wrap (~> 1.0.0)
+ xcodeproj (>= 1.13.0, < 2.0.0)
+ xcpretty (~> 0.3.0)
+ xcpretty-travis-formatter (>= 0.0.3)
+ gh_inspector (1.1.3)
+ google-apis-androidpublisher_v3 (0.50.0)
+ google-apis-core (>= 0.11.0, < 2.a)
+ google-apis-core (0.11.1)
+ addressable (~> 2.5, >= 2.5.1)
+ googleauth (>= 0.16.2, < 2.a)
+ httpclient (>= 2.8.1, < 3.a)
+ mini_mime (~> 1.0)
+ representable (~> 3.0)
+ retriable (>= 2.0, < 4.a)
+ rexml
+ webrick
+ google-apis-iamcredentials_v1 (0.17.0)
+ google-apis-core (>= 0.11.0, < 2.a)
+ google-apis-playcustomapp_v1 (0.13.0)
+ google-apis-core (>= 0.11.0, < 2.a)
+ google-apis-storage_v1 (0.19.0)
+ google-apis-core (>= 0.9.0, < 2.a)
+ google-cloud-core (1.6.0)
+ google-cloud-env (~> 1.0)
+ google-cloud-errors (~> 1.0)
+ google-cloud-env (1.6.0)
+ faraday (>= 0.17.3, < 3.0)
+ google-cloud-errors (1.3.1)
+ google-cloud-storage (1.44.0)
+ addressable (~> 2.8)
+ digest-crc (~> 0.4)
+ google-apis-iamcredentials_v1 (~> 0.1)
+ google-apis-storage_v1 (~> 0.19.0)
+ google-cloud-core (~> 1.6)
+ googleauth (>= 0.16.2, < 2.a)
+ mini_mime (~> 1.0)
+ googleauth (1.8.1)
+ faraday (>= 0.17.3, < 3.a)
+ jwt (>= 1.4, < 3.0)
+ multi_json (~> 1.11)
+ os (>= 0.9, < 2.0)
+ signet (>= 0.16, < 2.a)
+ highline (2.0.3)
+ http-cookie (1.0.5)
+ domain_name (~> 0.5)
+ httpclient (2.8.3)
+ jmespath (1.6.2)
+ json (2.6.3)
+ jwt (2.7.1)
+ mini_magick (4.12.0)
+ mini_mime (1.1.5)
+ multi_json (1.15.0)
+ multipart-post (2.3.0)
+ nanaimo (0.3.0)
+ naturally (2.2.1)
+ optparse (0.1.1)
+ os (1.1.4)
+ plist (3.7.0)
+ public_suffix (5.0.3)
+ rake (13.0.6)
+ representable (3.2.0)
+ declarative (< 0.1.0)
+ trailblazer-option (>= 0.1.1, < 0.2.0)
+ uber (< 0.2.0)
+ retriable (3.1.2)
+ rexml (3.2.6)
+ rouge (2.0.7)
+ ruby2_keywords (0.0.5)
+ rubyzip (2.3.2)
+ security (0.1.3)
+ signet (0.18.0)
+ addressable (~> 2.8)
+ faraday (>= 0.17.5, < 3.a)
+ jwt (>= 1.5, < 3.0)
+ multi_json (~> 1.10)
+ simctl (1.6.10)
+ CFPropertyList
+ naturally
+ terminal-notifier (2.0.0)
+ terminal-table (3.0.2)
+ unicode-display_width (>= 1.1.1, < 3)
+ trailblazer-option (0.1.2)
+ tty-cursor (0.7.1)
+ tty-screen (0.8.1)
+ tty-spinner (0.9.3)
+ tty-cursor (~> 0.7)
+ uber (0.1.0)
+ unf (0.1.4)
+ unf_ext
+ unf_ext (0.0.8.2)
+ unicode-display_width (2.4.2)
+ webrick (1.8.1)
+ word_wrap (1.0.0)
+ xcodeproj (1.23.0)
+ CFPropertyList (>= 2.3.3, < 4.0)
+ atomos (~> 0.1.3)
+ claide (>= 1.0.2, < 2.0)
+ colored2 (~> 3.1)
+ nanaimo (~> 0.3.0)
+ rexml (~> 3.2.4)
+ xcpretty (0.3.0)
+ rouge (~> 2.0.7)
+ xcpretty-travis-formatter (1.0.1)
+ xcpretty (~> 0.2, >= 0.0.7)
+
+PLATFORMS
+ x64-mingw-ucrt
+
+DEPENDENCIES
+ fastlane
+
+BUNDLED WITH
+ 2.4.20
diff --git a/android/app/build.gradle b/android/app/build.gradle
index c58ff2f3..1f378cf5 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -1,3 +1,10 @@
+plugins {
+ id "com.android.application"
+ id "kotlin-android"
+ id "dev.flutter.flutter-gradle-plugin"
+ id "com.google.protobuf"
+}
+
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
@@ -6,10 +13,7 @@ if (localPropertiesFile.exists()) {
}
}
-def flutterRoot = localProperties.getProperty('flutter.sdk')
-if (flutterRoot == null) {
- throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
-}
+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
@@ -21,10 +25,7 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply plugin: 'com.google.protobuf'
-apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
// signing
@@ -37,7 +38,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
- compileSdkVersion 33
+ compileSdk 35
ndkVersion flutter.ndkVersion
compileOptions {
@@ -46,7 +47,7 @@ android {
}
kotlinOptions {
- jvmTarget = '1.8'
+ jvmTarget = JavaVersion.VERSION_1_8
}
sourceSets {
@@ -61,11 +62,10 @@ android {
}
defaultConfig {
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "de.lox.dev.camelus"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
- minSdkVersion 21
+ minSdkVersion 23
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
@@ -91,8 +91,8 @@ flutter {
source '../..'
}
-dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+// dependencies {
+// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-}
+// }
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 579e483c..55ee546b 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -6,7 +6,14 @@
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/build.gradle b/android/build.gradle
index ad28fb22..1e73c4ff 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,20 +1,3 @@
-buildscript {
- ext.kotlin_version = '1.8.20'
- ext.javalite_version = '3.21.7'
- ext.protoc_version = '3.9.2'
- ext.protobuf_gradle = '0.9.1'
-
- repositories {
- google()
- mavenCentral()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:7.4.2'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath "com.google.protobuf:protobuf-gradle-plugin:$protobuf_gradle"
- }
-}
allprojects {
repositories {
diff --git a/android/fastlane/Appfile b/android/fastlane/Appfile
new file mode 100644
index 00000000..c3f396ba
--- /dev/null
+++ b/android/fastlane/Appfile
@@ -0,0 +1,2 @@
+#json_key_file("./.keys/camelus-fastlane-key.json") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
+package_name("de.lox.dev.camelus") # e.g. com.krausefx.app
diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile
new file mode 100644
index 00000000..bd3ffaa4
--- /dev/null
+++ b/android/fastlane/Fastfile
@@ -0,0 +1,44 @@
+# This file contains the fastlane.tools configuration
+# You can find the documentation at https://docs.fastlane.tools
+#
+# For a list of all available actions, check out
+#
+# https://docs.fastlane.tools/actions
+#
+# For a list of all available plugins, check out
+#
+# https://docs.fastlane.tools/plugins/available-plugins
+#
+
+# Uncomment the line if you want fastlane to automatically update itself
+# update_fastlane
+
+default_platform(:android)
+
+platform :android do
+ desc "Runs all the tests"
+ lane :test do
+ gradle(task: "test")
+ end
+
+
+
+ desc "Deploy a new version to the Google Play"
+ lane :production do
+ gradle(task: "clean assembleRelease")
+ upload_to_play_store
+ end
+
+ desc "Deploy a new version to open Testing Track"
+ lane :beta do
+ gradle(
+ task: 'bundle',
+ build_type: 'Release'
+ )
+ upload_to_play_store(
+ track: 'beta',
+ aab: '../build/app/outputs/bundle/release/app-release.aab'
+ json_key_data: ENV['G_PLAY_FASTLANE_SERVICE_ACCOUNT']
+ )
+ end
+end
diff --git a/android/fastlane/README.md b/android/fastlane/README.md
new file mode 100644
index 00000000..c888172d
--- /dev/null
+++ b/android/fastlane/README.md
@@ -0,0 +1,48 @@
+fastlane documentation
+----
+
+# Installation
+
+Make sure you have the latest version of the Xcode command line tools installed:
+
+```sh
+xcode-select --install
+```
+
+For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
+
+# Available Actions
+
+## Android
+
+### android test
+
+```sh
+[bundle exec] fastlane android test
+```
+
+Runs all the tests
+
+### android production
+
+```sh
+[bundle exec] fastlane android production
+```
+
+Deploy a new version to the Google Play
+
+### android beta
+
+```sh
+[bundle exec] fastlane android beta
+```
+
+Deploy a new version to open Testing Track
+
+----
+
+This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
+
+More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
+
+The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).
diff --git a/android/fastlane/metadata/android/en-GB/full_description.txt b/android/fastlane/metadata/android/en-GB/full_description.txt
new file mode 100644
index 00000000..46af2a5b
--- /dev/null
+++ b/android/fastlane/metadata/android/en-GB/full_description.txt
@@ -0,0 +1,5 @@
+On camelus you can follow people to read their posts or write your own posts.
+You can decide where you want to publish your posts, or from which relays posts are received.
+
+
+You stay in control.
\ No newline at end of file
diff --git a/android/fastlane/metadata/android/en-GB/images/featureGraphic.png b/android/fastlane/metadata/android/en-GB/images/featureGraphic.png
new file mode 100644
index 00000000..8da461ff
Binary files /dev/null and b/android/fastlane/metadata/android/en-GB/images/featureGraphic.png differ
diff --git a/android/fastlane/metadata/android/en-GB/images/icon.png b/android/fastlane/metadata/android/en-GB/images/icon.png
new file mode 100644
index 00000000..aef422bb
Binary files /dev/null and b/android/fastlane/metadata/android/en-GB/images/icon.png differ
diff --git a/android/fastlane/metadata/android/en-GB/images/phoneScreenshots/1_en-GB.png b/android/fastlane/metadata/android/en-GB/images/phoneScreenshots/1_en-GB.png
new file mode 100644
index 00000000..46a0f99b
Binary files /dev/null and b/android/fastlane/metadata/android/en-GB/images/phoneScreenshots/1_en-GB.png differ
diff --git a/android/fastlane/metadata/android/en-GB/images/phoneScreenshots/2_en-GB.png b/android/fastlane/metadata/android/en-GB/images/phoneScreenshots/2_en-GB.png
new file mode 100644
index 00000000..1125307e
Binary files /dev/null and b/android/fastlane/metadata/android/en-GB/images/phoneScreenshots/2_en-GB.png differ
diff --git a/android/fastlane/metadata/android/en-GB/images/phoneScreenshots/3_en-GB.png b/android/fastlane/metadata/android/en-GB/images/phoneScreenshots/3_en-GB.png
new file mode 100644
index 00000000..7edd923c
Binary files /dev/null and b/android/fastlane/metadata/android/en-GB/images/phoneScreenshots/3_en-GB.png differ
diff --git a/android/fastlane/metadata/android/en-GB/short_description.txt b/android/fastlane/metadata/android/en-GB/short_description.txt
new file mode 100644
index 00000000..66df3f18
--- /dev/null
+++ b/android/fastlane/metadata/android/en-GB/short_description.txt
@@ -0,0 +1 @@
+camelus connects you to the nostr network
\ No newline at end of file
diff --git a/android/fastlane/metadata/android/en-GB/title.txt b/android/fastlane/metadata/android/en-GB/title.txt
new file mode 100644
index 00000000..4237fa77
--- /dev/null
+++ b/android/fastlane/metadata/android/en-GB/title.txt
@@ -0,0 +1 @@
+camelus
\ No newline at end of file
diff --git a/android/fastlane/metadata/android/en-GB/video.txt b/android/fastlane/metadata/android/en-GB/video.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/android/gradle.properties b/android/gradle.properties
index 94adc3a3..b9a9a246 100644
--- a/android/gradle.properties
+++ b/android/gradle.properties
@@ -1,3 +1,6 @@
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
+android.defaults.buildfeatures.buildconfig=true
+android.nonTransitiveRClass=false
+android.nonFinalResIds=false
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 6b665338..d11cdd90 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
+networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
diff --git a/android/settings.gradle b/android/settings.gradle
index 44e62bcf..d3a2244b 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -1,11 +1,26 @@
-include ':app'
+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
+ }()
-def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
-def properties = new Properties()
+ includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
-assert localPropertiesFile.exists()
-localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
-def flutterSdkPath = properties.getProperty("flutter.sdk")
-assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
-apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
+plugins {
+ id "dev.flutter.flutter-plugin-loader" version "1.0.0"
+ id "com.android.application" version '8.1.0' apply false
+ id "org.jetbrains.kotlin.android" version "1.8.22" apply false
+ id "com.google.protobuf" version "0.9.1" apply false
+}
+
+include ":app"
diff --git a/assets/images/default_header.jpg b/assets/images/default_header.jpg
deleted file mode 100644
index 5fdc5568..00000000
Binary files a/assets/images/default_header.jpg and /dev/null differ
diff --git a/devtools_options.yaml b/devtools_options.yaml
new file mode 100644
index 00000000..7e7e7f67
--- /dev/null
+++ b/devtools_options.yaml
@@ -0,0 +1 @@
+extensions:
diff --git a/fonts/Poppins/Poppins-Black.ttf b/fonts/Poppins/Poppins-Black.ttf
new file mode 100644
index 00000000..71c0f995
Binary files /dev/null and b/fonts/Poppins/Poppins-Black.ttf differ
diff --git a/fonts/Poppins/Poppins-BlackItalic.ttf b/fonts/Poppins/Poppins-BlackItalic.ttf
new file mode 100644
index 00000000..7aeb58bd
Binary files /dev/null and b/fonts/Poppins/Poppins-BlackItalic.ttf differ
diff --git a/fonts/Poppins/Poppins-Bold.ttf b/fonts/Poppins/Poppins-Bold.ttf
new file mode 100644
index 00000000..00559eeb
Binary files /dev/null and b/fonts/Poppins/Poppins-Bold.ttf differ
diff --git a/fonts/Poppins/Poppins-BoldItalic.ttf b/fonts/Poppins/Poppins-BoldItalic.ttf
new file mode 100644
index 00000000..e61e8e88
Binary files /dev/null and b/fonts/Poppins/Poppins-BoldItalic.ttf differ
diff --git a/fonts/Poppins/Poppins-ExtraBold.ttf b/fonts/Poppins/Poppins-ExtraBold.ttf
new file mode 100644
index 00000000..df709360
Binary files /dev/null and b/fonts/Poppins/Poppins-ExtraBold.ttf differ
diff --git a/fonts/Poppins/Poppins-ExtraBoldItalic.ttf b/fonts/Poppins/Poppins-ExtraBoldItalic.ttf
new file mode 100644
index 00000000..14d2b375
Binary files /dev/null and b/fonts/Poppins/Poppins-ExtraBoldItalic.ttf differ
diff --git a/fonts/Poppins/Poppins-ExtraLight.ttf b/fonts/Poppins/Poppins-ExtraLight.ttf
new file mode 100644
index 00000000..e76ec69a
Binary files /dev/null and b/fonts/Poppins/Poppins-ExtraLight.ttf differ
diff --git a/fonts/Poppins/Poppins-ExtraLightItalic.ttf b/fonts/Poppins/Poppins-ExtraLightItalic.ttf
new file mode 100644
index 00000000..89513d94
Binary files /dev/null and b/fonts/Poppins/Poppins-ExtraLightItalic.ttf differ
diff --git a/fonts/Poppins/Poppins-Italic.ttf b/fonts/Poppins/Poppins-Italic.ttf
new file mode 100644
index 00000000..12b7b3c4
Binary files /dev/null and b/fonts/Poppins/Poppins-Italic.ttf differ
diff --git a/fonts/Poppins/Poppins-Light.ttf b/fonts/Poppins/Poppins-Light.ttf
new file mode 100644
index 00000000..bc36bcc2
Binary files /dev/null and b/fonts/Poppins/Poppins-Light.ttf differ
diff --git a/fonts/Poppins/Poppins-LightItalic.ttf b/fonts/Poppins/Poppins-LightItalic.ttf
new file mode 100644
index 00000000..9e70be6a
Binary files /dev/null and b/fonts/Poppins/Poppins-LightItalic.ttf differ
diff --git a/fonts/Poppins/Poppins-Medium.ttf b/fonts/Poppins/Poppins-Medium.ttf
new file mode 100644
index 00000000..6bcdcc27
Binary files /dev/null and b/fonts/Poppins/Poppins-Medium.ttf differ
diff --git a/fonts/Poppins/Poppins-MediumItalic.ttf b/fonts/Poppins/Poppins-MediumItalic.ttf
new file mode 100644
index 00000000..be67410f
Binary files /dev/null and b/fonts/Poppins/Poppins-MediumItalic.ttf differ
diff --git a/fonts/Poppins/Poppins-Regular.ttf b/fonts/Poppins/Poppins-Regular.ttf
new file mode 100644
index 00000000..9f0c71b7
Binary files /dev/null and b/fonts/Poppins/Poppins-Regular.ttf differ
diff --git a/fonts/Poppins/Poppins-SemiBold.ttf b/fonts/Poppins/Poppins-SemiBold.ttf
new file mode 100644
index 00000000..74c726e3
Binary files /dev/null and b/fonts/Poppins/Poppins-SemiBold.ttf differ
diff --git a/fonts/Poppins/Poppins-SemiBoldItalic.ttf b/fonts/Poppins/Poppins-SemiBoldItalic.ttf
new file mode 100644
index 00000000..3e6c9422
Binary files /dev/null and b/fonts/Poppins/Poppins-SemiBoldItalic.ttf differ
diff --git a/fonts/Poppins/Poppins-Thin.ttf b/fonts/Poppins/Poppins-Thin.ttf
new file mode 100644
index 00000000..03e73661
Binary files /dev/null and b/fonts/Poppins/Poppins-Thin.ttf differ
diff --git a/fonts/Poppins/Poppins-ThinItalic.ttf b/fonts/Poppins/Poppins-ThinItalic.ttf
new file mode 100644
index 00000000..e26db5dd
Binary files /dev/null and b/fonts/Poppins/Poppins-ThinItalic.ttf differ
diff --git a/integration_test/onboarding_test.dart b/integration_test/onboarding_test.dart
index adece8e1..5dcca4ea 100644
--- a/integration_test/onboarding_test.dart
+++ b/integration_test/onboarding_test.dart
@@ -1,4 +1,4 @@
-import 'package:camelus/routes/nostr/onboarding/onboarding.dart';
+import 'package:camelus/presentation_layer/routes/nostr/onboarding/onboarding.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:flutter/material.dart';
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 9625e105..7c569640 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 11.0
+ 12.0
diff --git a/ios/Podfile b/ios/Podfile
index 88359b22..f3eff09a 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -1,5 +1,6 @@
# Uncomment this line to define a global platform for your project
-# platform :ios, '11.0'
+# minimum iOS version
+ platform :ios, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -37,5 +38,17 @@ end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
+
+ # Set custom iOS target for flutter_secure_storage and flutter_email_sender
+ #target.build_configurations.each do |config|
+ # if target.name == 'flutter_secure_storage'
+ # config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' # Custom iOS target for flutter_secure_storage
+ # else Gem::Version.new($iOSVersion) > Gem::Version.new(config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'])
+ # config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = $iOSVersion
+ # end
+ #end
+ target.build_configurations.each do |config|
+ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0' # Set this to match your platform version
+ end
end
end
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 38baa3da..ab4e5347 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -1,51 +1,55 @@
-
- CFBundleDevelopmentRegion
- $(DEVELOPMENT_LANGUAGE)
- CFBundleDisplayName
- camelus
- CFBundleExecutable
- $(EXECUTABLE_NAME)
- CFBundleIdentifier
- $(PRODUCT_BUNDLE_IDENTIFIER)
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- camelus
- CFBundlePackageType
- APPL
- CFBundleShortVersionString
- $(FLUTTER_BUILD_NAME)
- CFBundleSignature
- ????
- CFBundleVersion
- $(FLUTTER_BUILD_NUMBER)
- LSRequiresIPhoneOS
-
- UILaunchStoryboardName
- LaunchScreen
- UIMainStoryboardFile
- Main
- UISupportedInterfaceOrientations
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UISupportedInterfaceOrientations~ipad
-
- UIInterfaceOrientationPortrait
- UIInterfaceOrientationPortraitUpsideDown
- UIInterfaceOrientationLandscapeLeft
- UIInterfaceOrientationLandscapeRight
-
- UIViewControllerBasedStatusBarAppearance
-
- CADisableMinimumFrameDurationOnPhone
-
- UIApplicationSupportsIndirectInputEvents
-
-
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ camelus
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ camelus
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UIViewControllerBasedStatusBarAppearance
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+ NSPhotoLibraryUsageDescription
+ Photo access is used to add account profile, include pictures in posts
+ ITSAppUsesNonExemptEncryption
+
+
diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 00000000..86a7c3b1
--- /dev/null
+++ b/ios/RunnerTests/RunnerTests.swift
@@ -0,0 +1,12 @@
+import Flutter
+import UIKit
+import XCTest
+
+class RunnerTests: XCTestCase {
+
+ func testExample() {
+ // If you add code to the Runner application, consider adding tests here.
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
+ }
+
+}
diff --git a/lib/atoms/my_profile_picture.dart b/lib/atoms/my_profile_picture.dart
deleted file mode 100644
index 7e9ab9c0..00000000
--- a/lib/atoms/my_profile_picture.dart
+++ /dev/null
@@ -1,103 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:flutter_svg/svg.dart';
-import 'package:camelus/config/palette.dart';
-import 'package:cached_network_image/cached_network_image.dart';
-
-Widget myProfilePicture({
- required String pictureUrl,
- required String pubkey,
- FilterQuality filterQuality = FilterQuality.medium,
- int? cacheHeight,
- bool disableGif = false,
-}) {
- // all other image types
- if (pictureUrl.contains(".png") ||
- pictureUrl.contains(".jpg") ||
- pictureUrl.contains(".jpeg") ||
- (!disableGif && pictureUrl.contains(".gif")) ||
- pictureUrl.contains(".webp") ||
- pictureUrl.contains(".avif")) {
- return ClipOval(
- child: SizedBox.fromSize(
- size: const Size.fromRadius(30), // Image radius
- child: Container(
- color: Palette.background,
- child: CachedNetworkImage(
- imageUrl: pictureUrl,
- filterQuality: filterQuality,
- progressIndicatorBuilder: (context, url, downloadProgress) =>
- const CircularProgressIndicator(
- color: Palette.darkGray,
- ),
- errorWidget: (context, url, error) => const Icon(Icons.error),
- //memCacheHeight: cacheHeight ?? 200,
- memCacheWidth: cacheHeight ?? 150, //cacheHeight ?? 200,
- maxHeightDiskCache: cacheHeight ?? 150,
- maxWidthDiskCache: cacheHeight ?? 150,
- alignment: Alignment.center,
- fit: BoxFit.cover,
- )),
- ),
- );
- }
-
- //if svg
- if (pictureUrl.contains(".svg")) {
- return Container(
- height: 60,
- width: 60,
- decoration: const BoxDecoration(
- color: Palette.primary,
- shape: BoxShape.circle,
- ),
- child: SvgPicture.network(pictureUrl),
- );
- }
- // default
- return Container(
- height: 60,
- width: 60,
- decoration: const BoxDecoration(
- color: Palette.primary,
- shape: BoxShape.circle,
- ),
- child: SvgPicture.network(
- "https://avatars.dicebear.com/api/personas/$pubkey.svg"),
- );
-}
-
-class UserImage extends StatelessWidget {
- const UserImage({
- super.key,
- required this.myMetadata,
- required this.pubkey,
- });
-
- final Future