payme-mini-app 3.0.1 → 3.0.2

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.
package/README.md CHANGED
@@ -1,4 +1,10 @@
1
1
  Vui lòng xem tài liệu tích hợp đầy đủ [tại đây](https://github.com/PayME-Miniapp/payme-mini-app#readme)
2
+ ## 3.0.2: sửa lỗi build Android (tương thích 3.0.1)
3
+
4
+ - Android: module tự áp plugin Kotlin khi ứng dụng đặt `android.builtInKotlin=false` (template React Native 0.88). Trước đây build lỗi `cannot find symbol PaymeMiniAppPackage`.
5
+ - Dùng PayME Miniapp SDK Android `0.8.5`: manifest của SDK chỉ đặt `networkSecurityConfig` (tên `payme_miniapp_network_security_config`, cleartext tới `localhost`) lên `<application>`. Ứng dụng có `networkSecurityConfig` riêng: thêm `tools:replace="android:networkSecurityConfig"` và cho phép cleartext tới `localhost`.
6
+ - Bản debug trên emulator tải JS bundle từ `10.0.2.2`: thêm `android/app/src/debug/res/xml/payme_miniapp_network_security_config.xml` cho phép cleartext tới `localhost` và `10.0.2.2`.
7
+
2
8
  ## 3.0.1: sửa lỗi bridge (tương thích 3.0.0)
3
9
 
4
10
  - Dùng PayME Miniapp SDK iOS `0.8.3`, Android `0.8.4` (SDK 1.0.24): `USER_CANCEL` chỉ báo một lần mỗi lần đóng; Android không còn ép app chuyển sang giao diện sáng và không đổi ngôn ngữ/resources của app.
@@ -10,11 +10,18 @@ buildscript {
10
10
 
11
11
  dependencies {
12
12
  classpath "com.android.tools.build:gradle:9.1.1"
13
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
13
14
  }
14
15
  }
15
16
 
16
17
  apply plugin: "com.android.library"
17
18
 
19
+ // Mã của module là Kotlin. AGP 9 tự biên dịch Kotlin (built-in Kotlin); ứng dụng tắt tính năng này
20
+ // (android.builtInKotlin=false, template React Native 0.88) thì module phải tự áp plugin Kotlin.
21
+ if (project.findProperty("android.builtInKotlin")?.toString()?.toBoolean() == false) {
22
+ apply plugin: "org.jetbrains.kotlin.android"
23
+ }
24
+
18
25
  def getExtOrIntegerDefault(name) {
19
26
  return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["PaymeMiniApp_" + name]).toInteger()
20
27
  }
@@ -73,5 +80,5 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
73
80
  dependencies {
74
81
  implementation "com.facebook.react:react-android"
75
82
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
76
- implementation 'com.github.PayME-Miniapp:native-android:0.8.4'
83
+ implementation 'com.github.PayME-Miniapp:native-android:0.8.5'
77
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "payme-mini-app",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "Thư viện tích hợp PayME Miniapp",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",