๐Ÿ“ฆ amake / in_app_purchase_stub

๐Ÿ“„ README.md ยท 33 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33A stub implementation of the
[`in_app_purchase`](https://pub.dev/packages/in_app_purchase) library.

The intent is to allow overriding the default implementation for a given
platform in order to prevent unwanted code or dependencies from being included
in your app.

Currently only an Android implementation is provided.

## Usage

Simply add the dependency to your `pubspec.yaml`:

```yaml
dependencies:
  ...
  in_app_purchase_stub_android:
    git:
      url: https://github.com/amake/in_app_purchase_stub.git
      ref: main # Or pin to a commit
      path: in_app_purchase_stub_android
```

## Why?

I have an app that uses IAP on iOS but *not* on Android. I publish this app to
Google Play and also to F-Droid. `in_app_purchase_android` includes non-free
software that F-Droid forcibly strips out at build time, causing the build to
break.

Depending on the stub package allows the build to succeed by avoiding including
or referring to any of the non-free dependencies.