From f9b1996329abe70395933e787bec8e943af72c88 Mon Sep 17 00:00:00 2001 From: hyochan Date: Sun, 14 Nov 2021 23:49:11 +0900 Subject: [PATCH 01/11] Migrate to android billing client 4.0.0 --- CHANGELOG.md | 4 + android/build.gradle | 2 +- .../AndroidInappPurchasePlugin.java | 99 ++++++++++++------- pubspec.yaml | 2 +- 4 files changed, 71 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9be99b15..f304b753 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 5.1.0 + +- Upgrade android billing client to `4.0.0` (#326) + ## 5.0.4 - Add iOS promo codes (#325) diff --git a/android/build.gradle b/android/build.gradle index 5b68df40..4301793a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -34,7 +34,7 @@ android { } dependencies { - implementation 'com.android.billingclient:billing:3.0.0' + implementation 'com.android.billingclient:billing:4.0.0' implementation files('jars/in-app-purchasing-2.0.76.jar') } diff --git a/android/src/main/java/com/dooboolab/flutterinapppurchase/AndroidInappPurchasePlugin.java b/android/src/main/java/com/dooboolab/flutterinapppurchase/AndroidInappPurchasePlugin.java index cbf747ba..f2ae01d3 100644 --- a/android/src/main/java/com/dooboolab/flutterinapppurchase/AndroidInappPurchasePlugin.java +++ b/android/src/main/java/com/dooboolab/flutterinapppurchase/AndroidInappPurchasePlugin.java @@ -8,6 +8,7 @@ import android.os.Bundle; import android.util.Log; +import com.android.billingclient.api.AccountIdentifiers; import com.android.billingclient.api.AcknowledgePurchaseParams; import com.android.billingclient.api.AcknowledgePurchaseResponseListener; import com.android.billingclient.api.BillingClient; @@ -316,7 +317,7 @@ else if (call.method.equals("getAvailableItemsByType")) { if (purchases != null) { for (Purchase purchase : purchases) { JSONObject item = new JSONObject(); - item.put("productId", purchase.getSku()); + item.put("productId", purchase.getSkus().get(0)); item.put("transactionId", purchase.getOrderId()); item.put("transactionDate", purchase.getPurchaseTime()); item.put("transactionReceipt", purchase.getOriginalJson()); @@ -362,7 +363,7 @@ public void onPurchaseHistoryResponse(BillingResult billingResult, List=2.12.0 <3.0.0" From 7fbf78c70f1dbd35f8c219409fe2c56dd21e8bc1 Mon Sep 17 00:00:00 2001 From: hyochan Date: Sun, 14 Nov 2021 23:52:28 +0900 Subject: [PATCH 02/11] Remove `orderId` from `Purchase` which is dup --- CHANGELOG.md | 3 +++ README.md | 1 - .../flutterinapppurchase/AndroidInappPurchasePlugin.java | 1 - lib/modules.dart | 3 --- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f304b753..79fb8714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ - Upgrade android billing client to `4.0.0` (#326) +- Remove `orderId` in `Purchase` + - This is duplicate of `transactionId`. + ## 5.0.4 - Add iOS promo codes (#325) diff --git a/README.md b/README.md index ebf40d2e..43423804 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,6 @@ For help on editing plugin code, view the [documentation](https://flutter.io/dev final DateTime transactionDate; final String transactionReceipt; final String purchaseToken; - final String orderId; // Android only final String dataAndroid; diff --git a/android/src/main/java/com/dooboolab/flutterinapppurchase/AndroidInappPurchasePlugin.java b/android/src/main/java/com/dooboolab/flutterinapppurchase/AndroidInappPurchasePlugin.java index f2ae01d3..1e43308f 100644 --- a/android/src/main/java/com/dooboolab/flutterinapppurchase/AndroidInappPurchasePlugin.java +++ b/android/src/main/java/com/dooboolab/flutterinapppurchase/AndroidInappPurchasePlugin.java @@ -321,7 +321,6 @@ else if (call.method.equals("getAvailableItemsByType")) { item.put("transactionId", purchase.getOrderId()); item.put("transactionDate", purchase.getPurchaseTime()); item.put("transactionReceipt", purchase.getOriginalJson()); - item.put("orderId", purchase.getOrderId()); item.put("purchaseToken", purchase.getPurchaseToken()); item.put("signatureAndroid", purchase.getSignature()); item.put("purchaseStateAndroid", purchase.getPurchaseState()); diff --git a/lib/modules.dart b/lib/modules.dart index 51a490bf..9f3fa143 100644 --- a/lib/modules.dart +++ b/lib/modules.dart @@ -212,7 +212,6 @@ class PurchasedItem { final DateTime? transactionDate; final String? transactionReceipt; final String? purchaseToken; - final String? orderId; // Android only final String? dataAndroid; @@ -234,7 +233,6 @@ class PurchasedItem { transactionDate = _extractDate(json['transactionDate']), transactionReceipt = json['transactionReceipt'] as String?, purchaseToken = json['purchaseToken'] as String?, - orderId = json['orderId'] as String?, dataAndroid = json['dataAndroid'] as String?, signatureAndroid = json['signatureAndroid'] as String?, isAcknowledgedAndroid = json['isAcknowledgedAndroid'] as bool?, @@ -257,7 +255,6 @@ class PurchasedItem { 'transactionDate: ${transactionDate?.toIso8601String()}, ' 'transactionReceipt: $transactionReceipt, ' 'purchaseToken: $purchaseToken, ' - 'orderId: $orderId, ' /// android specific 'dataAndroid: $dataAndroid, ' From 18e6eee6304f8718947bcb537b4abeb2c034fbea Mon Sep 17 00:00:00 2001 From: hyochan Date: Sun, 14 Nov 2021 23:53:17 +0900 Subject: [PATCH 03/11] Remove `originalJsonAndroid` which is dup of `dataAndroid` --- README.md | 1 - lib/modules.dart | 3 --- 2 files changed, 4 deletions(-) diff --git a/README.md b/README.md index 43423804..99266ebc 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,6 @@ For help on editing plugin code, view the [documentation](https://flutter.io/dev final bool autoRenewingAndroid; final bool isAcknowledgedAndroid; final int purchaseStateAndroid; - final String originalJsonAndroid; // iOS only final DateTime originalTransactionDateIOS; diff --git a/lib/modules.dart b/lib/modules.dart index 9f3fa143..c7a9d143 100644 --- a/lib/modules.dart +++ b/lib/modules.dart @@ -219,7 +219,6 @@ class PurchasedItem { final bool? autoRenewingAndroid; final bool? isAcknowledgedAndroid; final PurchaseState? purchaseStateAndroid; - final String? originalJsonAndroid; // iOS only final DateTime? originalTransactionDateIOS; @@ -239,7 +238,6 @@ class PurchasedItem { autoRenewingAndroid = json['autoRenewingAndroid'] as bool?, purchaseStateAndroid = _decodePurchaseStateAndroid(json['purchaseStateAndroid'] as int?), - originalJsonAndroid = json['originalJsonAndroid'] as String?, originalTransactionDateIOS = _extractDate(json['originalTransactionDateIOS']), originalTransactionIdentifierIOS = @@ -262,7 +260,6 @@ class PurchasedItem { 'isAcknowledgedAndroid: $isAcknowledgedAndroid, ' 'autoRenewingAndroid: $autoRenewingAndroid, ' 'purchaseStateAndroid: $purchaseStateAndroid, ' - 'originalJsonAndroid: $originalJsonAndroid, ' /// ios specific 'originalTransactionDateIOS: ${originalTransactionDateIOS?.toIso8601String()}, ' From d851732057f7008425fb60cd1776dbe0f506aa4a Mon Sep 17 00:00:00 2001 From: hyochan Date: Mon, 15 Nov 2021 00:13:35 +0900 Subject: [PATCH 04/11] Include flutter github workflow --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..f295f483 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: Flutter CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-java@v1 + with: + java-version: "14.x" + + - uses: subosito/flutter-action@v1 + with: + channel: "beta" + flutter-version: "2.0.5" + + - run: flutter pub get + + - run: flutter format --set-exit-if-changed . + + - run: flutter analyze . + + - run: flutter test --coverage + + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GH_TOKEN }} + + - run: flutter build apk + + # Upload generated apk to the artifacts. + # - uses: actions/upload-artifact@v1 + # with: + # name: release-apk + # path: build/app/outputs/apk/release/app-release.apk From 8b47263e041cb560e0f614448696aad64afd5490 Mon Sep 17 00:00:00 2001 From: hyochan Date: Mon, 15 Nov 2021 00:14:24 +0900 Subject: [PATCH 05/11] Add ci badge --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 99266ebc..0e1fb5ab 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # flutter_inapp_purchase [![Pub Version](https://img.shields.io/pub/v/flutter_inapp_purchase.svg?style=flat-square)](https://pub.dartlang.org/packages/flutter_inapp_purchase) -[![Build Status](https://travis-ci.com/dooboolab/flutter_inapp_purchase.svg?branch=master)](https://travis-ci.com/dooboolab/flutter_inapp_purchase) -![License](https://img.shields.io/badge/license-MIT-blue.svg) +[![Flutter CI](https://github.com/dooboolab/flutter_inapp_purchase/actions/workflows/ci.yml/badge.svg)](https://github.com/dooboolab/flutter_inapp_purchase/actions/workflows/ci.yml) [![Coverage Status](https://coveralls.io/repos/github/dooboolab/flutter_inapp_purchase/badge.svg?branch=master)](https://coveralls.io/github/dooboolab/flutter_inapp_purchase?branch=master) +![License](https://img.shields.io/badge/license-MIT-blue.svg) ## Flutter V2 From 9f5054ed18786d1f6ac0220e3dfb0d8d8960ffb5 Mon Sep 17 00:00:00 2001 From: hyochan Date: Mon, 15 Nov 2021 00:15:06 +0900 Subject: [PATCH 06/11] Flutter version config in workflow --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f295f483..e284b531 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,8 +17,8 @@ jobs: - uses: subosito/flutter-action@v1 with: - channel: "beta" - flutter-version: "2.0.5" + channel: "stable" + flutter-version: "2.x" - run: flutter pub get From e63273617271a6dba00162370a7f41748c1931b6 Mon Sep 17 00:00:00 2001 From: hyochan Date: Mon, 15 Nov 2021 00:19:31 +0900 Subject: [PATCH 07/11] Run flutter format --- example/lib/main.dart | 19 ++++++++++++------- lib/utils.dart | 5 ++--- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index afe73047..908c0346 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -88,15 +88,18 @@ class _InAppState extends State { print('consumeAllItems error: $err'); } - _conectionSubscription = FlutterInappPurchase.connectionUpdated.listen((connected) { + _conectionSubscription = + FlutterInappPurchase.connectionUpdated.listen((connected) { print('connected: $connected'); }); - _purchaseUpdatedSubscription = FlutterInappPurchase.purchaseUpdated.listen((productItem) { + _purchaseUpdatedSubscription = + FlutterInappPurchase.purchaseUpdated.listen((productItem) { print('purchase-updated: $productItem'); }); - _purchaseErrorSubscription = FlutterInappPurchase.purchaseError.listen((purchaseError) { + _purchaseErrorSubscription = + FlutterInappPurchase.purchaseError.listen((purchaseError) { print('purchase-error: $purchaseError'); }); } @@ -106,7 +109,8 @@ class _InAppState extends State { } Future _getProduct() async { - List items = await FlutterInappPurchase.instance.getProducts(_productLists); + List items = + await FlutterInappPurchase.instance.getProducts(_productLists); for (var item in items) { print('${item.toString()}'); this._items.add(item); @@ -133,7 +137,8 @@ class _InAppState extends State { } Future _getPurchaseHistory() async { - List items = await FlutterInappPurchase.instance.getPurchaseHistory(); + List items = + await FlutterInappPurchase.instance.getPurchaseHistory(); for (var item in items) { print('${item.toString()}'); this._purchases.add(item); @@ -217,8 +222,8 @@ class _InAppState extends State { @override Widget build(BuildContext context) { - double screenWidth = MediaQuery.of(context).size.width-20; - double buttonWidth=(screenWidth/3)-20; + double screenWidth = MediaQuery.of(context).size.width - 20; + double buttonWidth = (screenWidth / 3) - 20; return Container( padding: EdgeInsets.all(10.0), diff --git a/lib/utils.dart b/lib/utils.dart index 96cff361..8842ebe9 100644 --- a/lib/utils.dart +++ b/lib/utils.dart @@ -24,7 +24,6 @@ List? extractPurchased(dynamic result) { return decoded; } - List? extractResult(dynamic result) { List? decoded = json .decode(result.toString()) @@ -37,12 +36,12 @@ List? extractResult(dynamic result) { return decoded; } - class EnumUtil { /// return enum value /// /// example: enum Type {Hoge}, /// String value = EnumUtil.getValueString(Type.Hoge); /// assert(value == "Hoge"); - static String getValueString(dynamic enumType) => enumType.toString().split('.')[1]; + static String getValueString(dynamic enumType) => + enumType.toString().split('.')[1]; } From 29a397fbcae648b19f823ad40feeabc5e5a36f05 Mon Sep 17 00:00:00 2001 From: hyochan Date: Mon, 15 Nov 2021 00:23:49 +0900 Subject: [PATCH 08/11] Remove flutter analyze from testing temporarily --- .github/workflows/ci.yml | 2 +- example/lib/main.dart | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e284b531..2341c482 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: - run: flutter format --set-exit-if-changed . - - run: flutter analyze . + # - run: flutter analyze . - run: flutter test --coverage diff --git a/example/lib/main.dart b/example/lib/main.dart index 908c0346..42ff8288 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -55,6 +55,7 @@ class _InAppState extends State { _conectionSubscription.cancel(); _conectionSubscription = null; } + super.dispose(); } // Platform messages are asynchronous, so we initialize in an async method. From 64ebed7e743ff9a7df67d434188cbf925c98969a Mon Sep 17 00:00:00 2001 From: hyochan Date: Mon, 15 Nov 2021 01:03:07 +0900 Subject: [PATCH 09/11] Specify coveralls version Related - https://githubmemory.com/repo/coverallsapp/github-action/issues/26 --- .github/workflows/ci.yml | 2 +- coverage/lcov.info | 443 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 444 insertions(+), 1 deletion(-) create mode 100644 coverage/lcov.info diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2341c482..172b6852 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: - run: flutter test --coverage - name: Coveralls - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@1.1.3 with: github-token: ${{ secrets.GH_TOKEN }} diff --git a/coverage/lcov.info b/coverage/lcov.info new file mode 100644 index 00000000..4add8ddd --- /dev/null +++ b/coverage/lcov.info @@ -0,0 +1,443 @@ +SF:lib/utils.dart +DA:4,1 +DA:5,2 +DA:7,1 +DA:8,2 +DA:10,1 +DA:15,1 +DA:17,2 +DA:18,1 +DA:19,1 +DA:20,1 +DA:22,1 +DA:27,0 +DA:29,0 +DA:30,0 +DA:31,0 +DA:32,0 +DA:34,0 +DA:45,2 +DA:46,6 +LF:19 +LH:13 +end_of_record +SF:lib/modules.dart +DA:1,2 +DA:45,1 +DA:46,1 +DA:47,1 +DA:48,1 +DA:49,1 +DA:50,1 +DA:51,1 +DA:52,1 +DA:54,1 +DA:56,1 +DA:58,1 +DA:60,1 +DA:62,1 +DA:64,1 +DA:66,1 +DA:68,1 +DA:70,1 +DA:71,1 +DA:72,1 +DA:73,1 +DA:74,1 +DA:75,2 +DA:76,2 +DA:87,0 +DA:88,0 +DA:89,0 +DA:90,0 +DA:91,0 +DA:92,0 +DA:93,0 +DA:94,0 +DA:95,0 +DA:97,0 +DA:98,0 +DA:99,0 +DA:100,0 +DA:101,0 +DA:102,0 +DA:103,0 +DA:104,0 +DA:106,0 +DA:107,0 +DA:108,0 +DA:109,0 +DA:110,0 +DA:111,0 +DA:112,0 +DA:114,0 +DA:115,0 +DA:116,0 +DA:117,0 +DA:122,0 +DA:124,0 +DA:125,0 +DA:126,0 +DA:127,0 +DA:128,0 +DA:129,0 +DA:130,0 +DA:131,0 +DA:132,0 +DA:133,0 +DA:134,0 +DA:135,0 +DA:136,0 +DA:137,0 +DA:138,0 +DA:139,0 +DA:140,0 +DA:141,0 +DA:142,0 +DA:143,0 +DA:144,0 +DA:147,1 +DA:153,0 +DA:154,0 +DA:155,0 +DA:157,0 +DA:174,0 +DA:175,0 +DA:176,0 +DA:177,0 +DA:178,0 +DA:179,0 +DA:180,0 +DA:181,0 +DA:183,0 +DA:184,0 +DA:185,0 +DA:186,0 +DA:187,0 +DA:188,0 +DA:189,0 +DA:190,0 +DA:191,0 +DA:196,0 +DA:198,0 +DA:199,0 +DA:200,0 +DA:201,0 +DA:202,0 +DA:203,0 +DA:204,0 +DA:229,1 +DA:230,1 +DA:231,1 +DA:232,2 +DA:233,1 +DA:234,1 +DA:235,1 +DA:236,1 +DA:237,1 +DA:238,1 +DA:240,2 +DA:242,2 +DA:244,1 +DA:246,2 +DA:249,0 +DA:251,0 +DA:252,0 +DA:253,0 +DA:254,0 +DA:255,0 +DA:258,0 +DA:259,0 +DA:260,0 +DA:261,0 +DA:262,0 +DA:265,0 +DA:266,0 +DA:267,0 +DA:271,1 +DA:274,4 +DA:275,2 +DA:285,0 +DA:292,0 +DA:293,0 +DA:294,0 +DA:295,0 +DA:296,0 +DA:298,0 +DA:299,0 +DA:300,0 +DA:301,0 +DA:302,0 +DA:305,0 +DA:307,0 +DA:308,0 +DA:309,0 +DA:310,0 +DA:317,0 +DA:321,0 +DA:322,0 +DA:324,0 +DA:325,0 +DA:328,0 +DA:330,0 +DA:335,2 +DA:352,1 +DA:354,1 +DA:356,1 +DA:358,1 +DA:360,1 +DA:362,1 +DA:370,2 +DA:378,1 +DA:380,1 +DA:382,1 +DA:384,1 +LF:170 +LH:54 +end_of_record +SF:lib/flutter_inapp_purchase.dart +DA:16,2 +DA:19,1 +DA:23,0 +DA:24,0 +DA:27,0 +DA:28,0 +DA:31,0 +DA:32,0 +DA:35,0 +DA:36,0 +DA:39,2 +DA:40,2 +DA:45,3 +DA:46,3 +DA:48,1 +DA:50,1 +DA:53,1 +DA:56,1 +DA:61,1 +DA:62,3 +DA:69,1 +DA:70,2 +DA:71,3 +DA:73,2 +DA:76,0 +DA:77,0 +DA:84,1 +DA:85,2 +DA:86,2 +DA:87,3 +DA:89,2 +DA:90,2 +DA:91,3 +DA:94,0 +DA:95,0 +DA:101,1 +DA:102,1 +DA:103,2 +DA:104,3 +DA:106,1 +DA:107,1 +DA:111,1 +DA:112,2 +DA:113,3 +DA:115,1 +DA:120,2 +DA:122,0 +DA:123,0 +DA:129,1 +DA:130,1 +DA:131,2 +DA:132,3 +DA:134,1 +DA:135,1 +DA:140,1 +DA:141,2 +DA:142,3 +DA:144,1 +DA:149,2 +DA:151,0 +DA:152,0 +DA:159,1 +DA:160,2 +DA:161,2 +DA:163,1 +DA:164,1 +DA:168,2 +DA:170,1 +DA:171,1 +DA:176,3 +DA:178,2 +DA:179,3 +DA:180,2 +DA:181,3 +DA:183,2 +DA:185,0 +DA:186,0 +DA:192,1 +DA:193,2 +DA:194,3 +DA:196,1 +DA:197,1 +DA:201,3 +DA:203,1 +DA:204,1 +DA:208,3 +DA:209,2 +DA:210,3 +DA:212,2 +DA:214,0 +DA:215,0 +DA:223,1 +DA:229,2 +DA:230,4 +DA:231,1 +DA:234,1 +DA:239,2 +DA:240,4 +DA:245,0 +DA:246,0 +DA:256,1 +DA:264,2 +DA:265,4 +DA:266,1 +DA:269,1 +DA:274,2 +DA:275,4 +DA:279,0 +DA:280,0 +DA:287,0 +DA:288,0 +DA:289,0 +DA:299,0 +DA:300,0 +DA:301,0 +DA:303,0 +DA:304,0 +DA:310,0 +DA:315,0 +DA:316,0 +DA:317,0 +DA:323,0 +DA:324,0 +DA:330,0 +DA:334,0 +DA:335,0 +DA:336,0 +DA:338,0 +DA:341,0 +DA:342,0 +DA:348,0 +DA:349,0 +DA:350,0 +DA:354,0 +DA:356,0 +DA:362,1 +DA:363,2 +DA:365,4 +DA:370,0 +DA:373,0 +DA:374,0 +DA:389,1 +DA:390,2 +DA:392,4 +DA:396,0 +DA:399,0 +DA:400,0 +DA:406,1 +DA:407,2 +DA:408,3 +DA:409,1 +DA:411,2 +DA:412,3 +DA:413,1 +DA:416,0 +DA:417,0 +DA:425,1 +DA:426,2 +DA:428,2 +DA:430,4 +DA:435,0 +DA:436,0 +DA:442,0 +DA:444,0 +DA:447,0 +DA:448,0 +DA:452,0 +DA:453,0 +DA:454,0 +DA:458,0 +DA:460,0 +DA:461,0 +DA:465,0 +DA:466,0 +DA:472,0 +DA:473,0 +DA:475,0 +DA:476,0 +DA:479,0 +DA:480,0 +DA:485,1 +DA:486,2 +DA:487,1 +DA:488,2 +DA:490,3 +DA:492,2 +DA:494,0 +DA:495,0 +DA:503,0 +DA:508,0 +DA:510,0 +DA:512,0 +DA:514,0 +DA:515,0 +DA:516,0 +DA:520,0 +DA:522,0 +DA:524,0 +DA:525,0 +DA:530,0 +DA:531,0 +DA:545,1 +DA:552,3 +DA:553,1 +DA:554,1 +DA:558,1 +DA:578,1 +DA:587,1 +DA:588,3 +DA:589,1 +DA:590,1 +DA:596,1 +DA:598,1 +DA:602,1 +DA:606,1 +DA:610,1 +DA:613,2 +DA:614,0 +DA:615,0 +DA:616,0 +DA:617,0 +DA:619,0 +DA:620,0 +DA:621,0 +DA:623,0 +DA:624,0 +DA:625,0 +DA:627,0 +DA:628,0 +DA:629,0 +DA:632,0 +DA:634,0 +DA:638,1 +DA:641,1 +DA:642,1 +DA:647,1 +DA:648,1 +DA:653,0 +DA:654,0 +DA:655,0 +DA:657,0 +DA:658,0 +LF:242 +LH:129 +end_of_record From 5844eb48decec6f81c865bf14b639236d3ed0f34 Mon Sep 17 00:00:00 2001 From: hyochan Date: Mon, 15 Nov 2021 01:27:15 +0900 Subject: [PATCH 10/11] Change token to coveralls token --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 172b6852..8192e941 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - name: Coveralls uses: coverallsapp/github-action@1.1.3 with: - github-token: ${{ secrets.GH_TOKEN }} + github-token: ${{ secrets.COVERALLS_TOKEN }} - run: flutter build apk From 6bdeb315abcf796207d37b40c1b73e5465375f0a Mon Sep 17 00:00:00 2001 From: hyochan Date: Mon, 15 Nov 2021 01:34:38 +0900 Subject: [PATCH 11/11] Remove travis --- .coveralls.yml | 1 - .github/workflows/ci.yml | 3 +- .gitignore | 2 + .travis.yml | 90 -------- coverage/lcov.info | 443 --------------------------------------- 5 files changed, 4 insertions(+), 535 deletions(-) delete mode 100644 .coveralls.yml delete mode 100644 .travis.yml delete mode 100644 coverage/lcov.info diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index be0600e8..00000000 --- a/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -repo_token: YNS7xpQBdxfJBE4tt126qzKAsEQRXajJe diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8192e941..cd6d6ea6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,8 @@ jobs: - name: Coveralls uses: coverallsapp/github-action@1.1.3 with: - github-token: ${{ secrets.COVERALLS_TOKEN }} + github-token: ${{ secrets.GH_TOKEN }} + path-to-lcov: coverage/lcov.info - run: flutter build apk diff --git a/.gitignore b/.gitignore index e3ae6fbe..a79a12fe 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ flutter_inapp_android.iml flutter_export_environment* launch.json .flutter-plugins-* + +coverage \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4a8e0f57..00000000 --- a/.travis.yml +++ /dev/null @@ -1,90 +0,0 @@ -matrix: - # This causes the build to complete immediately upon first failure or once - # required jobs are green. - fast_finish: true - - # Building APK/IPA takes a long time; do not wait for them to finish. - # allow_failures: - # - env: JOB=APK - # - env: JOB=IPA - - include: - # Runs unit tests without emulator. - - env: JOB=PR - os: linux - language: dart - sudo: false - addons: - apt: - # Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18 - sources: - - ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version - packages: - - libstdc++6 - install: - - echo 'Avoid default Travis CI install step' - before_script: - - git clone https://github.com/flutter/flutter.git -b stable - - export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH - - flutter doctor - - gem install coveralls-lcov - script: - - ./flutter/bin/flutter test --coverage - after_success: - - coveralls-lcov coverage/lcov.info - -# # Builds an APK. -# - env: JOB=APK -# os: linux -# language: android -# licenses: -# - 'android-sdk-preview-license-.+' -# - 'android-sdk-license-.+' -# - 'google-gdk-license-.+' -# android: -# components: -# - tools -# - platform-tools -# - build-tools-25.0.3 -# - android-25 -# - sys-img-armeabi-v7a-google_apis-25 -# - extra-android-m2repository -# - extra-google-m2repository -# - extra-google-android-support -# jdk: oraclejdk8 -# sudo: false -# addons: -# apt: -# # Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18 -# sources: -# - ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version -# packages: -# - libstdc++6 -# - fonts-droid -# before_script: -# - wget http://services.gradle.org/distributions/gradle-3.5-bin.zip -# - unzip -qq gradle-3.5-bin.zip -# - export GRADLE_HOME=$PWD/gradle-3.5 -# - export PATH=$GRADLE_HOME/bin:$PATH -# - git clone https://github.com/flutter/flutter.git -b beta -# script: -# - ./flutter/bin/flutter -v build apk -# -# # Builds an IPA. -# - env: JOB=IPA -# os: osx -# language: generic -# osx_image: xcode8.3 -# before_script: -# - pip install six -# - brew update -# - brew install --HEAD libimobiledevice -# - brew install ideviceinstaller -# - brew install ios-deploy -# - git clone https://github.com/flutter/flutter.git -b beta -# script: -# - ./flutter/bin/flutter -v build ios --no-codesign - -cache: - directories: - - $HOME/.pub-cache diff --git a/coverage/lcov.info b/coverage/lcov.info deleted file mode 100644 index 4add8ddd..00000000 --- a/coverage/lcov.info +++ /dev/null @@ -1,443 +0,0 @@ -SF:lib/utils.dart -DA:4,1 -DA:5,2 -DA:7,1 -DA:8,2 -DA:10,1 -DA:15,1 -DA:17,2 -DA:18,1 -DA:19,1 -DA:20,1 -DA:22,1 -DA:27,0 -DA:29,0 -DA:30,0 -DA:31,0 -DA:32,0 -DA:34,0 -DA:45,2 -DA:46,6 -LF:19 -LH:13 -end_of_record -SF:lib/modules.dart -DA:1,2 -DA:45,1 -DA:46,1 -DA:47,1 -DA:48,1 -DA:49,1 -DA:50,1 -DA:51,1 -DA:52,1 -DA:54,1 -DA:56,1 -DA:58,1 -DA:60,1 -DA:62,1 -DA:64,1 -DA:66,1 -DA:68,1 -DA:70,1 -DA:71,1 -DA:72,1 -DA:73,1 -DA:74,1 -DA:75,2 -DA:76,2 -DA:87,0 -DA:88,0 -DA:89,0 -DA:90,0 -DA:91,0 -DA:92,0 -DA:93,0 -DA:94,0 -DA:95,0 -DA:97,0 -DA:98,0 -DA:99,0 -DA:100,0 -DA:101,0 -DA:102,0 -DA:103,0 -DA:104,0 -DA:106,0 -DA:107,0 -DA:108,0 -DA:109,0 -DA:110,0 -DA:111,0 -DA:112,0 -DA:114,0 -DA:115,0 -DA:116,0 -DA:117,0 -DA:122,0 -DA:124,0 -DA:125,0 -DA:126,0 -DA:127,0 -DA:128,0 -DA:129,0 -DA:130,0 -DA:131,0 -DA:132,0 -DA:133,0 -DA:134,0 -DA:135,0 -DA:136,0 -DA:137,0 -DA:138,0 -DA:139,0 -DA:140,0 -DA:141,0 -DA:142,0 -DA:143,0 -DA:144,0 -DA:147,1 -DA:153,0 -DA:154,0 -DA:155,0 -DA:157,0 -DA:174,0 -DA:175,0 -DA:176,0 -DA:177,0 -DA:178,0 -DA:179,0 -DA:180,0 -DA:181,0 -DA:183,0 -DA:184,0 -DA:185,0 -DA:186,0 -DA:187,0 -DA:188,0 -DA:189,0 -DA:190,0 -DA:191,0 -DA:196,0 -DA:198,0 -DA:199,0 -DA:200,0 -DA:201,0 -DA:202,0 -DA:203,0 -DA:204,0 -DA:229,1 -DA:230,1 -DA:231,1 -DA:232,2 -DA:233,1 -DA:234,1 -DA:235,1 -DA:236,1 -DA:237,1 -DA:238,1 -DA:240,2 -DA:242,2 -DA:244,1 -DA:246,2 -DA:249,0 -DA:251,0 -DA:252,0 -DA:253,0 -DA:254,0 -DA:255,0 -DA:258,0 -DA:259,0 -DA:260,0 -DA:261,0 -DA:262,0 -DA:265,0 -DA:266,0 -DA:267,0 -DA:271,1 -DA:274,4 -DA:275,2 -DA:285,0 -DA:292,0 -DA:293,0 -DA:294,0 -DA:295,0 -DA:296,0 -DA:298,0 -DA:299,0 -DA:300,0 -DA:301,0 -DA:302,0 -DA:305,0 -DA:307,0 -DA:308,0 -DA:309,0 -DA:310,0 -DA:317,0 -DA:321,0 -DA:322,0 -DA:324,0 -DA:325,0 -DA:328,0 -DA:330,0 -DA:335,2 -DA:352,1 -DA:354,1 -DA:356,1 -DA:358,1 -DA:360,1 -DA:362,1 -DA:370,2 -DA:378,1 -DA:380,1 -DA:382,1 -DA:384,1 -LF:170 -LH:54 -end_of_record -SF:lib/flutter_inapp_purchase.dart -DA:16,2 -DA:19,1 -DA:23,0 -DA:24,0 -DA:27,0 -DA:28,0 -DA:31,0 -DA:32,0 -DA:35,0 -DA:36,0 -DA:39,2 -DA:40,2 -DA:45,3 -DA:46,3 -DA:48,1 -DA:50,1 -DA:53,1 -DA:56,1 -DA:61,1 -DA:62,3 -DA:69,1 -DA:70,2 -DA:71,3 -DA:73,2 -DA:76,0 -DA:77,0 -DA:84,1 -DA:85,2 -DA:86,2 -DA:87,3 -DA:89,2 -DA:90,2 -DA:91,3 -DA:94,0 -DA:95,0 -DA:101,1 -DA:102,1 -DA:103,2 -DA:104,3 -DA:106,1 -DA:107,1 -DA:111,1 -DA:112,2 -DA:113,3 -DA:115,1 -DA:120,2 -DA:122,0 -DA:123,0 -DA:129,1 -DA:130,1 -DA:131,2 -DA:132,3 -DA:134,1 -DA:135,1 -DA:140,1 -DA:141,2 -DA:142,3 -DA:144,1 -DA:149,2 -DA:151,0 -DA:152,0 -DA:159,1 -DA:160,2 -DA:161,2 -DA:163,1 -DA:164,1 -DA:168,2 -DA:170,1 -DA:171,1 -DA:176,3 -DA:178,2 -DA:179,3 -DA:180,2 -DA:181,3 -DA:183,2 -DA:185,0 -DA:186,0 -DA:192,1 -DA:193,2 -DA:194,3 -DA:196,1 -DA:197,1 -DA:201,3 -DA:203,1 -DA:204,1 -DA:208,3 -DA:209,2 -DA:210,3 -DA:212,2 -DA:214,0 -DA:215,0 -DA:223,1 -DA:229,2 -DA:230,4 -DA:231,1 -DA:234,1 -DA:239,2 -DA:240,4 -DA:245,0 -DA:246,0 -DA:256,1 -DA:264,2 -DA:265,4 -DA:266,1 -DA:269,1 -DA:274,2 -DA:275,4 -DA:279,0 -DA:280,0 -DA:287,0 -DA:288,0 -DA:289,0 -DA:299,0 -DA:300,0 -DA:301,0 -DA:303,0 -DA:304,0 -DA:310,0 -DA:315,0 -DA:316,0 -DA:317,0 -DA:323,0 -DA:324,0 -DA:330,0 -DA:334,0 -DA:335,0 -DA:336,0 -DA:338,0 -DA:341,0 -DA:342,0 -DA:348,0 -DA:349,0 -DA:350,0 -DA:354,0 -DA:356,0 -DA:362,1 -DA:363,2 -DA:365,4 -DA:370,0 -DA:373,0 -DA:374,0 -DA:389,1 -DA:390,2 -DA:392,4 -DA:396,0 -DA:399,0 -DA:400,0 -DA:406,1 -DA:407,2 -DA:408,3 -DA:409,1 -DA:411,2 -DA:412,3 -DA:413,1 -DA:416,0 -DA:417,0 -DA:425,1 -DA:426,2 -DA:428,2 -DA:430,4 -DA:435,0 -DA:436,0 -DA:442,0 -DA:444,0 -DA:447,0 -DA:448,0 -DA:452,0 -DA:453,0 -DA:454,0 -DA:458,0 -DA:460,0 -DA:461,0 -DA:465,0 -DA:466,0 -DA:472,0 -DA:473,0 -DA:475,0 -DA:476,0 -DA:479,0 -DA:480,0 -DA:485,1 -DA:486,2 -DA:487,1 -DA:488,2 -DA:490,3 -DA:492,2 -DA:494,0 -DA:495,0 -DA:503,0 -DA:508,0 -DA:510,0 -DA:512,0 -DA:514,0 -DA:515,0 -DA:516,0 -DA:520,0 -DA:522,0 -DA:524,0 -DA:525,0 -DA:530,0 -DA:531,0 -DA:545,1 -DA:552,3 -DA:553,1 -DA:554,1 -DA:558,1 -DA:578,1 -DA:587,1 -DA:588,3 -DA:589,1 -DA:590,1 -DA:596,1 -DA:598,1 -DA:602,1 -DA:606,1 -DA:610,1 -DA:613,2 -DA:614,0 -DA:615,0 -DA:616,0 -DA:617,0 -DA:619,0 -DA:620,0 -DA:621,0 -DA:623,0 -DA:624,0 -DA:625,0 -DA:627,0 -DA:628,0 -DA:629,0 -DA:632,0 -DA:634,0 -DA:638,1 -DA:641,1 -DA:642,1 -DA:647,1 -DA:648,1 -DA:653,0 -DA:654,0 -DA:655,0 -DA:657,0 -DA:658,0 -LF:242 -LH:129 -end_of_record