expo-iap 2.3.1-rc.2 → 2.3.1-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  apply plugin: 'com.android.library'
2
+ apply plugin: 'kotlin-android'
2
3
 
3
4
  group = 'expo.modules.iap'
4
5
  version = '0.1.0'
@@ -41,3 +42,9 @@ android {
41
42
  abortOnError false
42
43
  }
43
44
  }
45
+
46
+ dependencies {
47
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7"
48
+ implementation "com.android.billingclient:billing-ktx:7.0.0"
49
+ implementation "com.google.android.gms:play-services-base:18.1.0"
50
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-iap",
3
- "version": "2.3.1-rc.2",
3
+ "version": "2.3.1-rc.4",
4
4
  "description": "In App Purchase module in Expo",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -14,15 +14,6 @@ const addLineToGradle = (content, anchor, lineToAdd, offset = 1) => {
14
14
  }
15
15
  return lines.join('\n');
16
16
  };
17
- const modifyProjectBuildGradle = (gradle) => {
18
- let modified = gradle;
19
- // 1. supportLibVersion
20
- const supportLib = `supportLibVersion = "28.0.0"`;
21
- if (!modified.includes(supportLib)) {
22
- modified = addLineToGradle(modified, /ext\s*{/, supportLib);
23
- }
24
- return modified;
25
- };
26
17
  const modifyAppBuildGradle = (gradle) => {
27
18
  let modified = gradle;
28
19
  // Add billing library dependencies to app-level build.gradle
@@ -37,11 +28,6 @@ const modifyAppBuildGradle = (gradle) => {
37
28
  return modified;
38
29
  };
39
30
  const withIAPAndroid = (config) => {
40
- // Add supportLibVersion to project build.gradle
41
- config = (0, config_plugins_1.withProjectBuildGradle)(config, (config) => {
42
- config.modResults.contents = modifyProjectBuildGradle(config.modResults.contents);
43
- return config;
44
- });
45
31
  // Add IAP dependencies to app build.gradle
46
32
  config = (0, config_plugins_1.withAppBuildGradle)(config, (config) => {
47
33
  config.modResults.contents = modifyAppBuildGradle(config.modResults.contents);
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  WarningAggregator,
3
3
  withAndroidManifest,
4
- withProjectBuildGradle,
5
4
  withAppBuildGradle,
6
5
  ConfigPlugin,
7
6
  createRunOncePlugin,
@@ -28,18 +27,6 @@ const addLineToGradle = (
28
27
  return lines.join('\n');
29
28
  };
30
29
 
31
- const modifyProjectBuildGradle = (gradle: string): string => {
32
- let modified = gradle;
33
-
34
- // 1. supportLibVersion
35
- const supportLib = `supportLibVersion = "28.0.0"`;
36
- if (!modified.includes(supportLib)) {
37
- modified = addLineToGradle(modified, /ext\s*{/, supportLib);
38
- }
39
-
40
- return modified;
41
- };
42
-
43
30
  const modifyAppBuildGradle = (gradle: string): string => {
44
31
  let modified = gradle;
45
32
 
@@ -57,14 +44,6 @@ const modifyAppBuildGradle = (gradle: string): string => {
57
44
  };
58
45
 
59
46
  const withIAPAndroid: ConfigPlugin = (config) => {
60
- // Add supportLibVersion to project build.gradle
61
- config = withProjectBuildGradle(config, (config) => {
62
- config.modResults.contents = modifyProjectBuildGradle(
63
- config.modResults.contents,
64
- );
65
- return config;
66
- });
67
-
68
47
  // Add IAP dependencies to app build.gradle
69
48
  config = withAppBuildGradle(config, (config) => {
70
49
  config.modResults.contents = modifyAppBuildGradle(