Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on: [ push, pull_request ]
name: Build
jobs:
build:
name: OpenBubbles APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Update submodules
run: git submodule update --init --recursive --remote

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: false
dotnet: true
haskell: true
large-packages: true
swap-storage: true

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.24.0

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'temurin'

- name: Install Protobuf compiler
run: sudo apt-get install -y protobuf-compiler

# First run is expected to fail until ffmpeg_kit_flutter_new is fixed.
- name: Run Build Script
run: |
./build.sh
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ pubspeck.lock
**/android/.settings
**/releases

# Android
android/app/.cxx
android/local.properties

#objectbox
.dart_tool/*
!.dart_tool/build
Expand All @@ -57,4 +61,8 @@ pubspeck.lock
native-lib/target/**

/rust/src/api/hw_testing.plist
/rust/src/api/id_testing.plist
/rust/src/api/id_testing.plist

# Android
android/app/local.properties
android/app/.gradle/**
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "rustpush"]
path = rustpush
url = https://github.com/OpenBubbles/rustpush.git
branch = master
[submodule "android-smsmms"]
path = android-smsmms
url = https://github.com/OpenBubbles/android-smsmms.git
branch = master
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ In order to start contributing, follow these steps:
6. Pull the latest changes, or a specific branch you want to start from
* Pull code from the main repository's master branch: `git pull upstream master`
* Checkout a specific branch: `git checkout upstream <name of branch>`
7. Initialize and update git submodules (required for building the Rust components)
* `git submodule update --init --recursive`

## Picking an Issue

Expand Down
1 change: 1 addition & 0 deletions android-smsmms
Submodule android-smsmms added at 36f34f
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
org.gradle.jvmargs=-Xmx4608M
org.gradle.jvmargs=-Xmx6400M
android.useAndroidX=true
android.enableJetifier=true
3 changes: 2 additions & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ plugins {
}

include ":android-smsmms"
project(":android-smsmms").projectDir = file("/home/tae/Downloads/telephony_plus/android-smsmms/library")
project(":android-smsmms").projectDir = new File(rootProject.projectDir, "../android-smsmms/library")

include ":app"
28 changes: 28 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

# Pull submodules
git submodule update --init --recursive --remote

# Set up fake certificates for FairPlay
mkdir -p rustpush/certs/fairplay

cert_names=(
"4056631661436364584235346952193"
"4056631661436364584235346952194"
"4056631661436364584235346952195"
"4056631661436364584235346952196"
"4056631661436364584235346952197"
"4056631661436364584235346952198"
"4056631661436364584235346952199"
"4056631661436364584235346952200"
"4056631661436364584235346952201"
"4056631661436364584235346952208"
)

for name in "${cert_names[@]}"; do
touch rustpush/certs/fairplay/$name.pem
touch rustpush/certs/fairplay/$name.crt
done

# Build APK
flutter build apk --flavor alpha --debug --target-platform android-arm64
1 change: 1 addition & 0 deletions ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
Flutter/ephemeral/**
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*

Expand Down
12 changes: 6 additions & 6 deletions lib/services/backend/action_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import 'package:bluebubbles/services/network/backend_service.dart';
import 'package:bluebubbles/utils/logger/logger.dart';
import 'package:collection/collection.dart';
import 'package:dio/dio.dart';
import 'package:ffmpeg_kit_flutter/ffmpeg_kit.dart';
import 'package:ffmpeg_kit_flutter/ffprobe_kit.dart';
import 'package:ffmpeg_kit_flutter/log.dart';
import 'package:ffmpeg_kit_flutter/return_code.dart';
import 'package:ffmpeg_kit_flutter/session.dart';
import 'package:ffmpeg_kit_flutter/statistics.dart';
import 'package:ffmpeg_kit_flutter_new/ffmpeg_kit.dart';
import 'package:ffmpeg_kit_flutter_new/ffprobe_kit.dart';
import 'package:ffmpeg_kit_flutter_new/log.dart';
import 'package:ffmpeg_kit_flutter_new/return_code.dart';
import 'package:ffmpeg_kit_flutter_new/session.dart';
import 'package:ffmpeg_kit_flutter_new/statistics.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart' hide Response;
Expand Down
2 changes: 1 addition & 1 deletion lib/services/rustpush/rustpush_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import 'package:bluebubbles/utils/crypto_utils.dart';
import 'package:bluebubbles/utils/logger/logger.dart';
import 'package:collection/collection.dart';
import 'package:crypto/crypto.dart';
import 'package:ffmpeg_kit_flutter/ffmpeg_kit.dart';
import 'package:ffmpeg_kit_flutter_new/ffmpeg_kit.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge.dart';
Expand Down
2 changes: 1 addition & 1 deletion macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import desktop_webview_auth
import device_info_plus
import dynamic_color
import emoji_picker_flutter
import ffmpeg_kit_flutter
import ffmpeg_kit_flutter_new
import file_selector_macos
import flutter_image_compress_macos
import flutter_inappwebview_macos
Expand Down
28 changes: 19 additions & 9 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.4.2"
cli_config:
dependency: transitive
description:
name: cli_config
sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec
url: "https://pub.dev"
source: hosted
version: "0.2.0"
cli_util:
dependency: transitive
description:
Expand Down Expand Up @@ -443,10 +451,10 @@ packages:
dependency: transitive
description:
name: coverage
sha256: "4b03e11f6d5b8f6e5bb5e9f7889a56fe6c5cbe942da5378ea4d4d7f73ef9dfe5"
sha256: "802bd084fb82e55df091ec8ad1553a7331b61c08251eef19a508b6f3f3a9858d"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.13.1"
crop_your_image:
dependency: "direct main"
description:
Expand Down Expand Up @@ -729,14 +737,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.3"
ffmpeg_kit_flutter:
ffmpeg_kit_flutter_new:
dependency: "direct main"
description:
name: ffmpeg_kit_flutter
sha256: "843aae41823ca94a0988d975b4b6cdc6948744b9b7e2707d81a3a9cd237b0100"
name: ffmpeg_kit_flutter_new
sha256: a6f881b2a41c8900733afef1806e069f58ab48e395174552e98157eb10d8adc0
url: "https://pub.dev"
source: hosted
version: "6.0.3"
version: "3.2.0"
ffmpeg_kit_flutter_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -3124,9 +3132,11 @@ packages:
telephony_plus:
dependency: "direct main"
description:
path: "/home/tae/Downloads/telephony_plus"
relative: false
source: path
path: "."
ref: "6db951e1e2e055e8ec844ccaf4319161f6fe6e3e"
resolved-ref: "6db951e1e2e055e8ec844ccaf4319161f6fe6e3e"
url: "https://github.com/stevesoltys/telephony_plus.git"
source: git
version: "0.0.1"
term_glyph:
dependency: transitive
Expand Down
7 changes: 4 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,12 @@ dependencies:
path: rust_builder
freezed_annotation: ^2.4.1
telephony_plus:
path: /home/tae/Downloads/telephony_plus
git:
url: https://github.com/stevesoltys/telephony_plus.git
ref: 6db951e1e2e055e8ec844ccaf4319161f6fe6e3e
barcode_widget: ^2.0.4
vpn_connection_detector: ^1.0.6
ffmpeg_kit_flutter: 6.0.3
ffmpeg_kit_flutter_new: ^3.2.0
dotted_border: ^2.1.0
external_path: ^2.0.1
flutter_inappwebview: ^6.1.5
Expand Down Expand Up @@ -332,7 +334,6 @@ flutter:
- assets/badges/badge-10.ico
- assets/rustpush/uti-map.json
- assets/scripts/AppleAccountSetup.js
- .env
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
Expand Down
5 changes: 2 additions & 3 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ crate-type = ["cdylib", "staticlib"]

[dependencies]
flutter_rust_bridge = "=2.3.0"
rustpush = { path = "/home/tae/Documents/GitHub/rustpush", features = ["macos-validation-data"] }
rustpush = { path = "../rustpush", features = ["macos-validation-data", "remote-anisette-v3"] }
plist = "1.5.0"
tokio = { version = "1", features = ["full"] }
serde = { version = "1.0", features = ["derive", "rc"] }
serde = { version = "1.0.219", features = ["derive", "rc"] }
anyhow = "1.0.75"
uniffi = { git = "https://github.com/mozilla/uniffi-rs", features = [ "cli", "tokio" ] }
async-recursion = "1.0.5"
icloud_auth = { path = "/home/tae/Documents/GitHub/apple-private-apis/icloud-auth", default-features = false, features = ["remote-clearadi"] }
prost = "0.12"
# Only necessary if using Protobuf well-known types:
prost-types = "0.12"
Expand Down
Loading