mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-17 05:44:20 +01:00
make it easier to use local packages
This commit is contained in:
15
.github/workflows/main.yml
vendored
15
.github/workflows/main.yml
vendored
@@ -111,7 +111,7 @@ jobs:
|
|||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: breez-sdk-flutter-${{ needs.setup.outputs.package-version }}
|
name: breez-sdk-flutter-${{ needs.setup.outputs.package-version }}
|
||||||
path: breez-sdk-flutter
|
path: snippets/dart_snippets/packages/breez-sdk-flutter
|
||||||
|
|
||||||
- name: pub-get
|
- name: pub-get
|
||||||
working-directory: snippets/dart_snippets
|
working-directory: snippets/dart_snippets
|
||||||
@@ -140,7 +140,18 @@ jobs:
|
|||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: Breez.Sdk.${{ needs.setup.outputs.package-version }}.nupkg
|
name: Breez.Sdk.${{ needs.setup.outputs.package-version }}.nupkg
|
||||||
path: packages
|
path: .
|
||||||
|
|
||||||
|
- name: Create nuget package source
|
||||||
|
working-directory: snippets/csharp
|
||||||
|
run: |
|
||||||
|
mkdir packages
|
||||||
|
nuget add ../../Breez.Sdk.${{ needs.setup.outputs.package-version }}.nupkg -Source ./packages
|
||||||
|
|
||||||
|
- name: Add nuget dependency
|
||||||
|
working-directory: snippets/csharp
|
||||||
|
run: |
|
||||||
|
dotnet add package Breez.Sdk -s ./packages
|
||||||
|
|
||||||
- name: Build the csharp project
|
- name: Build the csharp project
|
||||||
working-directory: snippets/csharp
|
working-directory: snippets/csharp
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -2,6 +2,4 @@ book
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
# Sub-projects with code snippets
|
*.nupkg
|
||||||
snippets/react-native/node_modules
|
|
||||||
snippets/rust/target
|
|
||||||
17
snippets/csharp/README.md
Normal file
17
snippets/csharp/README.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
## Steps to compile the snippets locally
|
||||||
|
1. Build a C# package
|
||||||
|
- By running the publish-all-platforms CI in the breez-sdk repository (use dummy binaries)
|
||||||
|
- or by downloading from nuget https://www.nuget.org/packages/Breez.Sdk
|
||||||
|
2. Place it in the root folder
|
||||||
|
|
||||||
|
From the `snippets/csharp` folder run the following command (replace the version):
|
||||||
|
```bash
|
||||||
|
nuget add ../../Breez.Sdk.1.0.0.nupkg -Source ./packages
|
||||||
|
```
|
||||||
|
|
||||||
|
Add a package reference to your local nuget package:
|
||||||
|
```bash
|
||||||
|
dotnet add package Breez.Sdk -s ./packages
|
||||||
|
```
|
||||||
|
|
||||||
|
Happy coding
|
||||||
@@ -6,10 +6,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<RestoreSources>$(RestoreSources);../../packages;https://api.nuget.org/v3/index.json</RestoreSources>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Breez.Sdk" Version="*" />
|
<PackageReference Include="Breez.Sdk" Version="*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
1
snippets/dart_snippets/.gitignore
vendored
1
snippets/dart_snippets/.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
# https://dart.dev/guides/libraries/private-files
|
# https://dart.dev/guides/libraries/private-files
|
||||||
# Created by `dart pub`
|
# Created by `dart pub`
|
||||||
.dart_tool/
|
.dart_tool/
|
||||||
|
packages/
|
||||||
@@ -1,2 +1,6 @@
|
|||||||
A sample command-line application with an entrypoint in `bin/`, library code
|
## Steps to compile the snippets locally
|
||||||
in `lib/`, and example unit test in `test/`.
|
1. Build a flutter package
|
||||||
|
- By running the publish-all-platforms CI in the breez-sdk repository (use dummy binaries)
|
||||||
|
- or by cloning https://github.com/breez/breez-sdk-flutter
|
||||||
|
2. Place the files in the folder `snippets/dart-snippets/packages/breez-sdk-flutter`
|
||||||
|
3. happy coding
|
||||||
@@ -19,9 +19,9 @@ include: package:lints/recommended.yaml
|
|||||||
# rules:
|
# rules:
|
||||||
# - camel_case_types
|
# - camel_case_types
|
||||||
|
|
||||||
# analyzer:
|
analyzer:
|
||||||
# exclude:
|
exclude:
|
||||||
# - path/to/excluded/files/**
|
- packages/**
|
||||||
|
|
||||||
# For more information about the core and recommended set of lints, see
|
# For more information about the core and recommended set of lints, see
|
||||||
# https://dart.dev/go/core-lints
|
# https://dart.dev/go/core-lints
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ environment:
|
|||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
breez_sdk:
|
breez_sdk:
|
||||||
path: ../../breez-sdk-flutter
|
path: ./packages/breez-sdk-flutter
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
lints: ^2.0.0
|
lints: ^2.0.0
|
||||||
|
|||||||
1
snippets/react-native/.gitignore
vendored
Normal file
1
snippets/react-native/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
node_modules
|
||||||
1
snippets/rust/.gitignore
vendored
Normal file
1
snippets/rust/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
target
|
||||||
3
snippets/rust/README.md
Normal file
3
snippets/rust/README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
## Steps to compile the snippets locally
|
||||||
|
1. Update the `rev` in Cargo.toml to the commit you want to use.
|
||||||
|
2. happy coding
|
||||||
Reference in New Issue
Block a user