Skip to content

Commit

Permalink
Merge pull request LtbLightning#130 from LtbLightning/pre-compiled-bi…
Browse files Browse the repository at this point in the history
…naries

Pre compiled binaries
  • Loading branch information
BitcoinZavior authored Apr 23, 2024
2 parents cd4289d + 6be18e8 commit aeda33a
Show file tree
Hide file tree
Showing 51 changed files with 10,629 additions and 7,361 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/precompile_binaries.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: [v0.31.1-dev, master, main]
branches: [v0.31.2-dev, master, main]

name: Precompile Binaries

Expand Down Expand Up @@ -45,4 +45,4 @@ jobs:
working-directory: cargokit/build_tool
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }}
PRIVATE_KEY: ${{ secrets.CARGOKIT_PRIVATE_KEY }}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [0.31.2-dev]
Updated Rust and Flutter dependencies.
#### APIs added
- Add `InvalidInputException`, `InvalidLockTimeException` & `InvalidTransactionException` .
#### Fixed
- Thread `frb_workerpool` panic on `UnknownUtxo` and `InvalidPsbtInput`.

## [0.31.1-dev]
#### Fixed
- Failed to load `.so` files in android.
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To use the `bdk_flutter` package in your project, add it as a dependency in your

```dart
dependencies:
bdk_flutter: ^0.31.1-dev
bdk_flutter: ^0.31.2-dev
```

### Examples
Expand Down Expand Up @@ -186,7 +186,5 @@ The latest API documentation is available [here](https://pub.dev/documentation/b
- Setting up a local Esplora instance for testing:
https://bitcoin.stackexchange.com/questions/116937/how-do-i-setup-an-esplora-instance-for-local-testing/116938#116938

_Note: This Flutter plugin is currently in its development (dev) stage and has been released for community review and experimentation.
We warmly welcome feedback, bug reports, and contributions from developers and enthusiasts alike ⚡️_

Thanks for taking a look!
2 changes: 1 addition & 1 deletion cargokit/build_pod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ do
fi
done

"$BASEDIR/run_build_tool.sh" build-pod "$@"
sh "$BASEDIR/run_build_tool.sh" build-pod "$@"

# Make a symlink from built framework to phony file, which will be used as input to
# build script. This should force rebuild (podspec currently doesn't support alwaysOutOfDate
Expand Down
5 changes: 4 additions & 1 deletion cargokit/build_tool/lib/src/options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,10 @@ class CargokitUserOptions {
}
userProjectDir = userProjectDir.parent;
}
return CargokitUserOptions._();
return CargokitUserOptions(
usePrecompiledBinaries: true,
verboseLogging: false,
);
}

final bool usePrecompiledBinaries;
Expand Down
4 changes: 3 additions & 1 deletion cargokit/cmake/cargokit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function(apply_cargokit target manifest_dir lib_name any_symbol_name)
else()
set(SCRIPT_EXTENSION ".sh")
set(IMPORT_LIB_EXTENSION "")
execute_process(COMMAND chmod +x "${cargokit_cmake_root}/run_build_tool${SCRIPT_EXTENSION}")
endif()

# Using generators in custom command is only supported in CMake 3.20+
Expand All @@ -75,6 +76,7 @@ function(apply_cargokit target manifest_dir lib_name any_symbol_name)
)
endif()


set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/_phony_" PROPERTIES SYMBOLIC TRUE)

if (TARGET ${target})
Expand All @@ -94,4 +96,4 @@ function(apply_cargokit target manifest_dir lib_name any_symbol_name)
# Allow adding the output library to plugin bundled libraries
set("${target}_cargokit_lib" ${OUTPUT_LIB} PARENT_SCOPE)

endfunction()
endfunction()
8 changes: 7 additions & 1 deletion cargokit/gradle/plugin.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,13 @@ abstract class CargoKitBuildTask extends DefaultTask {
def manifestDir = Paths.get(project.buildscript.sourceFile.parent, project.cargokit.manifestDir)

def rootProjectDir = project.rootProject.projectDir


if (!Os.isFamily(Os.FAMILY_WINDOWS)) {
project.exec {
commandLine 'chmod', '+x', path
}
}

project.exec {
executable path
args "build-gradle"
Expand Down
2 changes: 0 additions & 2 deletions cargokit_options.yaml

This file was deleted.

9 changes: 5 additions & 4 deletions example/lib/simple_wallet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ class _SimpleWalletState extends State<SimpleWallet> {
}

getNewAddress() async {
final res = await lib.getAddress(aliceWallet);
debugPrint(res.address);
setState(() {
displayText = "Address: ${res.address} \n Index: ${res.index}";
final res = (await lib.getAddress(aliceWallet));
debugPrint(await res.address.asString());
setState(() async {
displayText =
"Address: ${await res.address.asString()} \n Index: ${res.index}";
});
}

Expand Down
4 changes: 2 additions & 2 deletions example/macos/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- bdk_flutter (0.31.1-dev):
- bdk_flutter (0.31.2-dev):
- FlutterMacOS
- FlutterMacOS (1.0.0)

Expand All @@ -14,7 +14,7 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral

SPEC CHECKSUMS:
bdk_flutter: 22cd6fbac0aed9857319da174d227539ddfc5f4c
bdk_flutter: 8280f582b6b9b49deb843763027d4864b231c1d2
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24

PODFILE CHECKSUM: 6acf97521436d16fc31cd5e1a02000905acdb3ae
Expand Down
6 changes: 3 additions & 3 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.31.1-dev"
version: "0.31.2-dev"
boolean_selector:
dependency: transitive
description:
Expand Down Expand Up @@ -193,10 +193,10 @@ packages:
dependency: transitive
description:
name: flutter_rust_bridge
sha256: c51fa002e57e64d13030269ed9cd43752173ee4c6f60ec1e9c41450d63c75bae
sha256: e9a8716b1ad2fc81c434f3e4bf84b86c578578678c57e568b44aea7acf210102
url: "https://pub.dev"
source: hosted
version: "2.0.0-dev.28"
version: "2.0.0-dev.31"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down
2 changes: 1 addition & 1 deletion flutter_rust_bridge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ dart_output: lib/src/generated/
full_dep: true
c_output: ios/Classes/frb_generated.h
duplicated_c_output: [macos/Classes/frb_generated.h]
dart_entrypoint_class_name: BdkCore
dart_entrypoint_class_name: CApi
Loading

0 comments on commit aeda33a

Please sign in to comment.