mirror of
https://github.com/DefinedNet/mobile_nebula.git
synced 2025-09-05 10:46:04 +00:00
Compare commits
11 commits
4d21e1d6b8
...
ad9b331f32
Author | SHA1 | Date | |
---|---|---|---|
|
ad9b331f32 | ||
|
379b997c05 | ||
|
545b679fce | ||
|
18952a229f | ||
|
4270e9fdac | ||
|
531b234ec4 | ||
|
90a6c7f01a | ||
|
a8eee16e24 | ||
|
5b1724d454 | ||
|
261a79579c | ||
|
a8303a166d |
11 changed files with 102 additions and 89 deletions
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
|
@ -3,35 +3,35 @@ on:
|
|||
push:
|
||||
tags:
|
||||
# Only builds for tags with a meaningless build number suffix: v1.0.0-1
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+-*'
|
||||
- "v[0-9]+.[0-9]+.[0-9]+-*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build ios and android package
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-15
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #4.2.2
|
||||
with:
|
||||
show-progress: false
|
||||
fetch-depth: 25 # For sentry releases
|
||||
fetch-depth: 75 # For sentry releases
|
||||
|
||||
- name: Set up Go 1.22
|
||||
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 #5.3.0
|
||||
with:
|
||||
go-version: '1.22'
|
||||
go-version: "1.22"
|
||||
cache-dependency-path: nebula/go.sum
|
||||
|
||||
- uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 #v4.7.0
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '17'
|
||||
distribution: "zulu"
|
||||
java-version: "17"
|
||||
|
||||
- name: Install flutter
|
||||
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff #v2.18.0
|
||||
with:
|
||||
flutter-version: '3.29.2'
|
||||
flutter-version: "3.29.2"
|
||||
|
||||
- name: Setup bundletool for APK generation
|
||||
uses: amyu/setup-bundletool@f7a6fdd8e04bb23d2fdf3c2f60c9257a6298a40a
|
||||
|
|
4
.github/workflows/smoke.yml
vendored
4
.github/workflows/smoke.yml
vendored
|
@ -10,7 +10,7 @@ on:
|
|||
jobs:
|
||||
build-android:
|
||||
name: Android
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-15
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #4.2.2
|
||||
|
@ -85,7 +85,7 @@ jobs:
|
|||
|
||||
build-ios:
|
||||
name: iOS
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-15
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
|
|
2
.github/workflows/swiftfmt.yml
vendored
2
.github/workflows/swiftfmt.yml
vendored
|
@ -10,7 +10,7 @@ on:
|
|||
jobs:
|
||||
swiftfmt:
|
||||
name: Run swift format
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-15
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #4.2.2
|
||||
|
|
41
DEVELOPING.md
Normal file
41
DEVELOPING.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
**This project is not accepting PRs. These instructions are for employees of Defined Networking.**
|
||||
|
||||
## Setting up dev environment
|
||||
|
||||
Install all the following things:
|
||||
|
||||
- [`xcode`](https://apps.apple.com/us/app/xcode/) - use the version specified by `xcode_select` in `/ios/fastlane/Fastfile`
|
||||
- [`android-studio`](https://developer.android.com/studio)
|
||||
- [`flutter` 3.29.2](https://docs.flutter.dev/get-started/install)
|
||||
- [`gomobile`](https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile)
|
||||
- [Flutter Android Studio Extension](https://docs.flutter.dev/get-started/editor?tab=androidstudio)
|
||||
|
||||
Ensure your path is set up correctly to execute flutter
|
||||
|
||||
Run `flutter doctor` and fix everything it complains before proceeding
|
||||
|
||||
*NOTE* on iOS, always open `Runner.xcworkspace` and NOT the `Runner.xccodeproj`
|
||||
|
||||
### Before first compile
|
||||
|
||||
- Copy `env.sh.example` and set it up for your machine
|
||||
- Ensure you have run `gomobile init`
|
||||
- In Android Studio, make sure you have the current NDK installed by going to Tools → SDK Manager, go to the SDK Tools tab, check the `Show package details` box, expand the NDK section and select `27.0.12077973` version.
|
||||
- Ensure you have downloaded an NDK via android studio, this is likely not the default one, and you need to check the
|
||||
`Show package details` box to select the correct version. The correct version comes from the error when you try and compile
|
||||
- Make sure you have `gem` installed with `sudo gem install`
|
||||
- If on macOS arm64, `sudo gem install ffi -- --enable-libffi-alloc`
|
||||
|
||||
If you are having issues with iOS pods, try blowing it all away! `cd ios && rm -rf Pods/ Podfile.lock && pod install --repo-update`
|
||||
|
||||
## Formatting
|
||||
|
||||
`dart format` can be used to format the code in `lib` and `test`. We use a line-length of 120 characters.
|
||||
|
||||
Use:
|
||||
```sh
|
||||
dart format lib/ test/ -l 120
|
||||
```
|
||||
|
||||
In Android Studio, set the line length using Preferences → Editor → Code Style → Dart → Line length, set it to 120. Enable auto-format with Preferences → Languages & Frameworks → Flutter → Format code on save.
|
||||
|
59
README.md
59
README.md
|
@ -2,61 +2,8 @@
|
|||
|
||||
[Play Store](https://play.google.com/store/apps/details?id=net.defined.mobile_nebula&hl=en_US&gl=US) | [App Store](https://apps.apple.com/us/app/mobile-nebula/id1509587936)
|
||||
|
||||
## Setting up dev environment
|
||||
Nebula is an overlay networking tool designed to be fast, secure, and scalable. Connect any number of hosts with on-demand, encrypted tunnels that work across any IP networks and without opening firewall ports.
|
||||
|
||||
Install all of the following things:
|
||||
Mobile Nebula brings this functionality to devices running Android and iOS.
|
||||
|
||||
- [`xcode`](https://apps.apple.com/us/app/xcode/)
|
||||
- [`android-studio`](https://developer.android.com/studio)
|
||||
- [`flutter` 3.29.2](https://docs.flutter.dev/get-started/install)
|
||||
- [`gomobile`](https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile)
|
||||
- [Flutter Android Studio Extension](https://docs.flutter.dev/get-started/editor?tab=androidstudio)
|
||||
|
||||
Ensure your path is set up correctly to execute flutter
|
||||
|
||||
Run `flutter doctor` and fix everything it complains before proceeding
|
||||
|
||||
*NOTE* on iOS, always open `Runner.xcworkspace` and NOT the `Runner.xccodeproj`
|
||||
|
||||
### Before first compile
|
||||
|
||||
- Copy `env.sh.example` and set it up for your machine
|
||||
- Ensure you have run `gomobile init`
|
||||
- In Android Studio, make sure you have the current ndk installed by going to Tools -> SDK Manager, go to the SDK Tools tab, check the `Show package details` box, expand the NDK section and select `27.0.12077973` version.
|
||||
- Ensure you have downloaded an ndk via android studio, this is likely not the default one and you need to check the
|
||||
`Show package details` box to select the correct version. The correct version comes from the error when you try and compile
|
||||
- Make sure you have `gem` installed with `sudo gem install`
|
||||
- If on MacOS arm, `sudo gem install ffi -- --enable-libffi-alloc`
|
||||
|
||||
If you are having issues with iOS pods, try blowing it all away! `cd ios && rm -rf Pods/ Podfile.lock && pod install --repo-update`
|
||||
|
||||
# Formatting
|
||||
|
||||
`dart format` can be used to format the code in `lib` and `test`. We use a line-length of 120 characters.
|
||||
|
||||
Use:
|
||||
```sh
|
||||
dart format lib/ test/ -l 120
|
||||
```
|
||||
|
||||
In Android Studio, set the line length using Preferences -> Editor -> Code Style -> Dart -> Line length, set it to 120. Enable auto-format with Preferences -> Languages & Frameworks -> Flutter -> Format code on save.
|
||||
|
||||
`./swift-format.sh` can be used to format Swift code in the repo.
|
||||
|
||||
Once `swift-format` supports ignoring directories (<https://github.com/swiftlang/swift-format/issues/870>), we can move to a method of running it more like what <https://calebhearth.com/swift-format-github-action> describes.
|
||||
|
||||
# Release
|
||||
|
||||
Update `version` in `pubspec.yaml` to reflect this release, then
|
||||
|
||||
## Android
|
||||
|
||||
`flutter build appbundle`
|
||||
|
||||
This will create an android app bundle at `build/app/outputs/bundle/release/`
|
||||
|
||||
Upload the android bundle to the google play store https://play.google.com/apps/publish
|
||||
|
||||
## iOS
|
||||
|
||||
In xcode, Release -> Archive then follow the directions to upload to the app store. If you have issues, https://flutter.dev/docs/deployment/ios#create-a-build-archive
|
||||
This code is **source-available** meaning that the source is provided for viewing, but we are **not accepting contributions** and provide no license past what the [GitHub Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service#5-license-grant-to-other-users) permit.
|
||||
|
|
16
RELEASING.md
Normal file
16
RELEASING.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Releasing
|
||||
|
||||
## Prerelease
|
||||
|
||||
Push a git tag `v#.#.#-##`, e.g. `v0.5.1-0`, and `.github/release.yml` will build a draft release and publish it to iOS TestFlight and Android internal track.
|
||||
|
||||
`./swift-format.sh` can be used to format Swift code in the repo.
|
||||
|
||||
Once `swift-format` supports ignoring directories (<https://github.com/swiftlang/swift-format/issues/870>), we can move to a method of running it more like what <https://calebhearth.com/swift-format-github-action> describes.
|
||||
|
||||
## Release
|
||||
|
||||
1. Manually promote a prerelease build from TestFlight and Android internal track to the corresponding public app stores.
|
||||
2. Mark the associated draft release as published, removing the `-##` from it, ending with a release in the format `v#.#.#`, e.g. `v0.5.1`.
|
||||
3. Remove the old draft releases that will never be published.
|
||||
4. Add the notable changes to the app to the release summary, e.g.: <https://github.com/DefinedNet/mobile_nebula/releases/tag/v0.5.1>.
|
|
@ -10,11 +10,11 @@ PODS:
|
|||
- path_provider_foundation (0.0.1):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- Sentry/HybridSDK (8.42.0)
|
||||
- sentry_flutter (8.12.0):
|
||||
- Sentry/HybridSDK (8.46.0)
|
||||
- sentry_flutter (8.14.2):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
- Sentry/HybridSDK (= 8.42.0)
|
||||
- Sentry/HybridSDK (= 8.46.0)
|
||||
- share_plus (0.0.1):
|
||||
- Flutter
|
||||
- SwiftyJSON (5.0.2)
|
||||
|
@ -56,16 +56,16 @@ EXTERNAL SOURCES:
|
|||
:path: ".symlinks/plugins/url_launcher_ios/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
file_picker: 8272ff2f2365937598e2407f4f2ff55c723f084a
|
||||
file_picker: c79185e70b9b45728cde2a8d8da454e0cb43f287
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
mobile_scanner: 9157936403f5a0644ca3779a38ff8404c5434a93
|
||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
||||
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
|
||||
Sentry: 38ed8bf38eab5812787274bf591e528074c19e02
|
||||
sentry_flutter: a72ca0eb6e78335db7c4ddcddd1b9f6c8ed5b764
|
||||
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
|
||||
mobile_scanner: 77265f3dc8d580810e91849d4a0811a90467ed5e
|
||||
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
|
||||
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||
Sentry: da60d980b197a46db0b35ea12cb8f39af48d8854
|
||||
sentry_flutter: 2df8b0aab7e4aba81261c230cbea31c82a62dd1b
|
||||
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
|
||||
SwiftyJSON: f5b1bf1cd8dd53cd25887ac0eabcfd92301c6a5a
|
||||
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
|
||||
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
||||
|
||||
PODFILE CHECKSUM: b44d9de9944d89118a4ff4bfffe1c2dab91de156
|
||||
|
||||
|
|
|
@ -18,6 +18,11 @@ default_platform(:ios)
|
|||
platform :ios do
|
||||
desc "Push a new beta build to TestFlight"
|
||||
|
||||
before_all do
|
||||
xcode_select("/Applications/Xcode_16.2.0.app")
|
||||
end
|
||||
|
||||
|
||||
lane :build do
|
||||
# Do some things like setting up a temporary keystore to host secrets in CI
|
||||
setup_ci
|
||||
|
|
|
@ -152,6 +152,10 @@ class SwitchCameraButton extends StatelessWidget {
|
|||
icon = const Icon(Icons.camera_front);
|
||||
case CameraFacing.back:
|
||||
icon = const Icon(Icons.camera_rear);
|
||||
case CameraFacing.external:
|
||||
icon = const Icon(Icons.usb);
|
||||
case CameraFacing.unknown:
|
||||
icon = const Icon(Icons.device_unknown);
|
||||
}
|
||||
|
||||
return IconButton(
|
||||
|
|
18
pubspec.lock
18
pubspec.lock
|
@ -316,10 +316,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: mobile_scanner
|
||||
sha256: "1779bf862cfcf7a142117e707e2230624d42f153ddf51f4cc9f5ba455a2dd01e"
|
||||
sha256: "54005bdea7052d792d35b4fef0f84ec5ddc3a844b250ecd48dc192fb9b4ebc95"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "7.0.0-beta.4"
|
||||
version: "7.0.1"
|
||||
package_info_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -452,26 +452,26 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
name: sentry
|
||||
sha256: "576ad83415102ba2060142a6701611abc6e67a55af1d7ab339cedd3ba1b0f84c"
|
||||
sha256: "599701ca0693a74da361bc780b0752e1abc98226cf5095f6b069648116c896bb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.12.0"
|
||||
version: "8.14.2"
|
||||
sentry_dart_plugin:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sentry_dart_plugin
|
||||
sha256: "14c298de1be3ba3a6a16d9ce0aad8662b14ca6ed85b8ade234f75b2f3c285edf"
|
||||
sha256: "84436958fa9231e2e716be117a3b31695e54458b9f27039f76d14515e24248a6"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
version: "2.4.1"
|
||||
sentry_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sentry_flutter
|
||||
sha256: dc3761e8659839cc67a18432d9f12e5531affb7ff68e196dbb56846909b5dfdc
|
||||
sha256: "5ba2cf40646a77d113b37a07bd69f61bb3ec8a73cbabe5537b05a7c89d2656f8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "8.12.0"
|
||||
version: "8.14.2"
|
||||
share_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -719,4 +719,4 @@ packages:
|
|||
version: "3.1.3"
|
||||
sdks:
|
||||
dart: ">=3.7.0 <4.0.0"
|
||||
flutter: ">=3.27.0"
|
||||
flutter: ">=3.29.0"
|
||||
|
|
|
@ -36,9 +36,9 @@ dependencies:
|
|||
flutter_svg: ^2.0.10+1
|
||||
intl: ^0.19.0
|
||||
share_plus: ^10.0.2
|
||||
sentry_flutter: ^8.9.0
|
||||
sentry_dart_plugin: ^2.0.0
|
||||
mobile_scanner: ^7.0.0-beta.3
|
||||
sentry_flutter: ^8.14.2
|
||||
sentry_dart_plugin: ^2.4.1
|
||||
mobile_scanner: ^7.0.1
|
||||
path: ^1.9.1
|
||||
|
||||
dev_dependencies:
|
||||
|
|
Loading…
Add table
Reference in a new issue