This repository was archived by the owner on Oct 17, 2025. It is now read-only.
Commit a579a0e
authored
chore(deps): upgrade openiap-gql 1.0.11 (#15)
## Summary
Update openiap-gql from 1.0.9 to 1.0.11 to support new subscription
management features
## Changes
### Type System Updates
- **ActiveSubscription**: Added `basePlanIdAndroid`, `currentPlanId`,
`purchaseTokenAndroid` fields for enhanced subscription management
- **PurchaseCommon/PurchaseAndroid/PurchaseIOS**: Added `currentPlanId`
field for unified plan identification across platforms
- Android: uses `basePlanId` (e.g., "premium", "premium-year")
- iOS: uses `productId` (e.g., "com.example.premium_monthly")
### Script Improvements
- Updated [generate-types.sh](scripts/generate-types.sh#L163-L174) to
automatically add `override` modifier for `currentPlanId` in generated
types
- Ensures Types.kt remains read-only and regenerates correctly without
manual fixes
### Code Cleanup
- Simplified
[BillingConverters.kt](openiap/src/main/java/dev/hyo/openiap/utils/BillingConverters.kt#L158):
`toPurchaseInput()` now returns `this` directly (PurchaseInput is a
typealias of Purchase)
- Removed unnecessary `PurchaseInput` constructor calls in Example app
screens:
-
[AlternativeBillingScreen.kt](Example/src/main/java/dev/hyo/martie/screens/AlternativeBillingScreen.kt#L89)
-
[AvailablePurchasesScreen.kt](Example/src/main/java/dev/hyo/martie/screens/AvailablePurchasesScreen.kt#L221)
-
[SubscriptionFlowScreen.kt](Example/src/main/java/dev/hyo/martie/screens/SubscriptionFlowScreen.kt#L790)
## Benefits
- **Better subscription upgrade/downgrade support**:
`purchaseTokenAndroid` enables seamless plan changes
- **Unified plan identification**: `currentPlanId` provides
platform-agnostic way to identify user's subscription tier
- **Improved maintainability**: Auto-generated types now compile without
manual patches
## Testing
- ✅ Library module builds successfully
- ✅ Example app compiles and runs
- ✅ Types regeneration tested with `./scripts/generate-types.sh`1 parent c0d224a commit a579a0e
File tree
7 files changed
+38
-87
lines changed- Example/src/main/java/dev/hyo/martie/screens
- openiap/src/main/java/dev/hyo/openiap
- utils
- scripts
7 files changed
+38
-87
lines changedLines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 89 | + | |
101 | 90 | | |
102 | 91 | | |
103 | 92 | | |
| |||
Lines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 221 | + | |
233 | 222 | | |
234 | 223 | | |
235 | 224 | | |
| |||
Lines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
787 | 787 | | |
788 | 788 | | |
789 | 789 | | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
| 790 | + | |
802 | 791 | | |
803 | 792 | | |
804 | 793 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
371 | 378 | | |
372 | 379 | | |
373 | 380 | | |
| |||
386 | 393 | | |
387 | 394 | | |
388 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
389 | 404 | | |
390 | 405 | | |
391 | 406 | | |
392 | 407 | | |
393 | 408 | | |
394 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
395 | 414 | | |
396 | 415 | | |
397 | 416 | | |
| |||
401 | 420 | | |
402 | 421 | | |
403 | 422 | | |
| 423 | + | |
| 424 | + | |
404 | 425 | | |
405 | 426 | | |
406 | 427 | | |
407 | 428 | | |
408 | 429 | | |
409 | 430 | | |
| 431 | + | |
410 | 432 | | |
411 | 433 | | |
412 | 434 | | |
| |||
417 | 439 | | |
418 | 440 | | |
419 | 441 | | |
| 442 | + | |
| 443 | + | |
420 | 444 | | |
421 | 445 | | |
422 | 446 | | |
423 | 447 | | |
424 | 448 | | |
425 | 449 | | |
| 450 | + | |
426 | 451 | | |
427 | 452 | | |
428 | 453 | | |
| |||
956 | 981 | | |
957 | 982 | | |
958 | 983 | | |
| 984 | + | |
959 | 985 | | |
960 | 986 | | |
961 | 987 | | |
| |||
979 | 1005 | | |
980 | 1006 | | |
981 | 1007 | | |
| 1008 | + | |
982 | 1009 | | |
983 | 1010 | | |
984 | 1011 | | |
| |||
1003 | 1030 | | |
1004 | 1031 | | |
1005 | 1032 | | |
| 1033 | + | |
1006 | 1034 | | |
1007 | 1035 | | |
1008 | 1036 | | |
| |||
1053 | 1081 | | |
1054 | 1082 | | |
1055 | 1083 | | |
| 1084 | + | |
1056 | 1085 | | |
1057 | 1086 | | |
1058 | 1087 | | |
| |||
1089 | 1118 | | |
1090 | 1119 | | |
1091 | 1120 | | |
| 1121 | + | |
1092 | 1122 | | |
1093 | 1123 | | |
1094 | 1124 | | |
| |||
1126 | 1156 | | |
1127 | 1157 | | |
1128 | 1158 | | |
| 1159 | + | |
1129 | 1160 | | |
1130 | 1161 | | |
1131 | 1162 | | |
| |||
1582 | 1613 | | |
1583 | 1614 | | |
1584 | 1615 | | |
1585 | | - | |
1586 | | - | |
1587 | | - | |
1588 | | - | |
1589 | | - | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
1593 | | - | |
1594 | | - | |
1595 | | - | |
1596 | | - | |
1597 | | - | |
1598 | | - | |
1599 | | - | |
1600 | | - | |
1601 | | - | |
1602 | | - | |
1603 | | - | |
1604 | | - | |
1605 | | - | |
1606 | | - | |
1607 | | - | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | | - | |
1614 | | - | |
1615 | | - | |
1616 | | - | |
1617 | | - | |
1618 | | - | |
1619 | | - | |
1620 | | - | |
1621 | | - | |
1622 | | - | |
1623 | | - | |
| 1616 | + | |
1624 | 1617 | | |
1625 | 1618 | | |
1626 | 1619 | | |
| |||
Lines changed: 1 addition & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 158 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
0 commit comments