Skip to content

Commit 68caf49

Browse files
Merge pull request #38 from DanGould/payjoin-21
Update to payjoin-ffi 0.21.0
2 parents f395556 + 8b7db6a commit 68caf49

File tree

85 files changed

+9362
-11524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+9362
-11524
lines changed

contrib/clean-and-gen-bindings.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# Delete generated files in lib/src/generated
4+
echo "Deleting generated files in lib/src/generated..."
5+
rm -rf lib/src/generated/*
6+
7+
# Delete generated files in rust/src/frb_generated
8+
echo "Deleting generated files in rust/src/frb_generated..."
9+
rm -rf rust/src/frb_generated*
10+
11+
# Clean the Flutter project
12+
echo "Running flutter clean..."
13+
flutter clean
14+
15+
# Get Flutter dependencies
16+
echo "Running flutter pub get..."
17+
flutter pub get
18+
19+
# Run make all
20+
echo "Running make all..."
21+
make all
22+
23+
echo "Script execution completed."

example/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
.history
1010
.svn/
1111
migrate_working_dir/
12+
.vscode/settings.json
1213

1314
# IntelliJ related
1415
*.iml
@@ -27,10 +28,14 @@ migrate_working_dir/
2728
.dart_tool/
2829
.flutter-plugins
2930
.flutter-plugins-dependencies
31+
.packages
3032
.pub-cache/
3133
.pub/
3234
/build/
3335

36+
# Web related
37+
lib/generated_plugin_registrant.dart
38+
3439
# Symbolication related
3540
app.*.symbols
3641

example/.metadata

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled.
5+
6+
version:
7+
revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
8+
channel: stable
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
17+
base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
18+
- platform: android
19+
create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
20+
base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
21+
- platform: ios
22+
create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
23+
base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
24+
25+
# User provided section
26+
27+
# List of Local paths (relative to this file) that should be
28+
# ignored by the migrate tool.
29+
#
30+
# Files that are not part of the templates will be ignored by default.
31+
unmanaged_files:
32+
- 'lib/main.dart'
33+
- 'ios/Runner.xcodeproj/project.pbxproj'

example/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# payjoin_example
1+
# payjoin_flutter_demo
22

3-
Demonstrates how to use the payjoin plugin.
3+
A new Flutter project.
44

55
## Getting Started
66

@@ -12,5 +12,7 @@ A few resources to get you started if this is your first Flutter project:
1212
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
1313

1414
For help getting started with Flutter development, view the
15-
[online documentation](https://docs.flutter.dev/), which offers tutorials,
16-
samples, guidance on mobile development, and a full API reference.
15+
[online documentation](https://docs.flutter.dev/), which offers tutorials, samples, guidance on
16+
mobile development, and a full API reference.
17+
18+
# payjoin-flutter-demo

example/analysis_options.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ linter:
1313
# The lint rules applied to this project can be customized in the
1414
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
1515
# included above or to enable additional rules. A list of all available lints
16-
# and their documentation is published at https://dart.dev/lints.
16+
# and their documentation is published at
17+
# https://dart-lang.github.io/linter/lints/index.html.
1718
#
1819
# Instead of disabling a lint rule for the entire project in the
1920
# section below, it can also be suppressed for a single line of code
2021
# or a specific dart file by using the `// ignore: name_of_lint` and
2122
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
2223
# producing the lint.
2324
rules:
24-
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25-
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
25+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
26+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
2627

2728
# Additional information about this file can be found at
2829
# https://dart.dev/guides/language/analysis-options

example/android/app/build.gradle

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
plugins {
2-
id "com.android.application"
3-
id "kotlin-android"
4-
id "dev.flutter.flutter-gradle-plugin"
5-
}
6-
71
def localProperties = new Properties()
82
def localPropertiesFile = rootProject.file('local.properties')
93
if (localPropertiesFile.exists()) {
@@ -12,6 +6,11 @@ if (localPropertiesFile.exists()) {
126
}
137
}
148

9+
def flutterRoot = localProperties.getProperty('flutter.sdk')
10+
if (flutterRoot == null) {
11+
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12+
}
13+
1514
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
1615
if (flutterVersionCode == null) {
1716
flutterVersionCode = '1'
@@ -22,8 +21,11 @@ if (flutterVersionName == null) {
2221
flutterVersionName = '1.0'
2322
}
2423

24+
apply plugin: 'com.android.application'
25+
apply plugin: 'kotlin-android'
26+
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27+
2528
android {
26-
namespace "io.f.payjoin.payjoin_example"
2729
compileSdkVersion flutter.compileSdkVersion
2830
ndkVersion flutter.ndkVersion
2931

@@ -42,9 +44,9 @@ android {
4244

4345
defaultConfig {
4446
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
45-
applicationId "io.f.payjoin.payjoin_example"
47+
applicationId "com.bdk.f.bdk_flutter_app"
4648
// You can update the following values to match your application needs.
47-
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
49+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
4850
minSdkVersion 23
4951
targetSdkVersion flutter.targetSdkVersion
5052
versionCode flutterVersionCode.toInteger()
@@ -64,4 +66,6 @@ flutter {
6466
source '../..'
6567
}
6668

67-
dependencies {}
69+
dependencies {
70+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
71+
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.bdk.f.bdk_flutter_app">
23
<!-- The INTERNET permission is required for development. Specifically,
34
the Flutter tool needs it to communicate with the running application
45
to allow setting breakpoints, to provide hot reload, etc.
56
-->
6-
<uses-permission android:name="android.permission.INTERNET"/>
7+
<uses-permission android:name="android.permission.INTERNET" />
78
</manifest>

example/android/app/src/main/AndroidManifest.xml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.bdk.f.bdk_flutter_app">
3+
<uses-permission android:name="android.permission.INTERNET" />
24
<application
3-
android:label="payjoin_flutter_example"
45
android:name="${applicationName}"
5-
android:icon="@mipmap/ic_launcher">
6+
android:icon="@mipmap/ic_launcher"
7+
android:label="bdk_flutter_app">
68
<activity
79
android:name=".MainActivity"
10+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
811
android:exported="true"
12+
android:hardwareAccelerated="true"
913
android:launchMode="singleTop"
1014
android:theme="@style/LaunchTheme"
11-
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
12-
android:hardwareAccelerated="true"
1315
android:windowSoftInputMode="adjustResize">
1416
<!-- Specifies an Android theme to apply to this Activity as soon as
1517
the Android process has started. This theme is visible to the user
1618
while the Flutter UI initializes. After that, this theme continues
1719
to determine the Window background behind the Flutter UI. -->
1820
<meta-data
19-
android:name="io.flutter.embedding.android.NormalTheme"
20-
android:resource="@style/NormalTheme"
21-
/>
21+
android:name="io.flutter.embedding.android.NormalTheme"
22+
android:resource="@style/NormalTheme" />
2223
<intent-filter>
23-
<action android:name="android.intent.action.MAIN"/>
24-
<category android:name="android.intent.category.LAUNCHER"/>
24+
<action android:name="android.intent.action.MAIN" />
25+
<category android:name="android.intent.category.LAUNCHER" />
2526
</intent-filter>
2627
</activity>
2728
<!-- Don't delete the meta-data below.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package com.bdk.f.bdk_flutter_app
2+
3+
import io.flutter.embedding.android.FlutterActivity
4+
5+
class MainActivity : FlutterActivity() {
6+
}

example/android/app/src/main/kotlin/io/payjoin/flutter/payjoin_flutter_example/MainActivity.kt

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)