Skip to content

Commit

Permalink
fix: Fixed a bug in specifying parameters for functions in purchase.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathrunet committed Dec 20, 2023
1 parent 5966944 commit 55e18bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/katana_cli/lib/action/purchase/purchase.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import 'dart:io';

// Package imports:
import 'package:katana_cli/config.dart';
import 'package:xml/xml.dart';

// Project imports:
Expand Down Expand Up @@ -144,7 +145,8 @@ class PurchaseCliAction extends CliCommand with CliActionMixin {
gradle.dependencies.add(
GradleDependencies(
group: "implementation",
packageName: "com.android.billingclient:billing:5.2.0",
packageName:
"com.android.billingclient:billing:${Config.androidBillingVersion}",
),
);
}
Expand Down Expand Up @@ -203,7 +205,7 @@ class PurchaseCliAction extends CliCommand with CliActionMixin {
),
XmlAttribute(
XmlName("android:value"),
"5.2.0",
Config.androidBillingVersion,
),
],
[],
Expand Down Expand Up @@ -257,8 +259,8 @@ class PurchaseCliAction extends CliCommand with CliActionMixin {
}
if (!functions.functions
.any((e) => e.startsWith("purchaseWebhookAndroid"))) {
functions.functions
.add("purchaseWebhookAndroid(\"$googlePlayPubsubTopic\")");
functions.functions.add(
"purchaseWebhookAndroid({topic: \"$googlePlayPubsubTopic\"})");
}
}
await functions.save();
Expand Down
5 changes: 5 additions & 0 deletions packages/katana_cli/lib/config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
class Config {
Config._();

/// Version of the Android Billing Library.
///
/// AndroidのBillingライブラリのバージョン。
static const String androidBillingVersion = "6.0.1";

/// Contents of katana.yaml.
///
/// katana.yamlの中身。
Expand Down

0 comments on commit 55e18bc

Please sign in to comment.