payme-mini-app 0.7.8 → 0.8.0
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/android/build.gradle +26 -12
- package/android/src/main/AndroidManifestNew.xml +2 -0
- package/package.json +23 -23
- package/payme-mini-app.podspec +41 -17
package/android/build.gradle
CHANGED
|
@@ -14,6 +14,11 @@ buildscript {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
def reactNativeArchitectures() {
|
|
18
|
+
def value = rootProject.getProperties().get("reactNativeArchitectures")
|
|
19
|
+
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
|
20
|
+
}
|
|
21
|
+
|
|
17
22
|
def isNewArchitectureEnabled() {
|
|
18
23
|
return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true"
|
|
19
24
|
}
|
|
@@ -33,14 +38,33 @@ def getExtOrIntegerDefault(name) {
|
|
|
33
38
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["RNPayMEMiniApp_" + name]).toInteger()
|
|
34
39
|
}
|
|
35
40
|
|
|
41
|
+
def supportsNamespace() {
|
|
42
|
+
def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')
|
|
43
|
+
def major = parsed[0].toInteger()
|
|
44
|
+
def minor = parsed[1].toInteger()
|
|
45
|
+
|
|
46
|
+
// Namespace support was added in 7.3.0
|
|
47
|
+
return (major == 7 && minor >= 3) || major >= 8
|
|
48
|
+
}
|
|
49
|
+
|
|
36
50
|
android {
|
|
51
|
+
if (supportsNamespace()) {
|
|
52
|
+
namespace "com.paymeminiapp"
|
|
53
|
+
|
|
54
|
+
sourceSets {
|
|
55
|
+
main {
|
|
56
|
+
manifest.srcFile "src/main/AndroidManifestNew.xml"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
37
61
|
compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
|
|
38
62
|
|
|
39
63
|
defaultConfig {
|
|
40
64
|
minSdkVersion getExtOrIntegerDefault("minSdkVersion")
|
|
41
65
|
targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
|
|
42
|
-
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
|
|
43
66
|
}
|
|
67
|
+
|
|
44
68
|
buildTypes {
|
|
45
69
|
release {
|
|
46
70
|
minifyEnabled false
|
|
@@ -55,15 +79,12 @@ android {
|
|
|
55
79
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
56
80
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
57
81
|
}
|
|
58
|
-
|
|
59
82
|
}
|
|
60
83
|
|
|
61
84
|
repositories {
|
|
62
85
|
mavenCentral()
|
|
63
86
|
google()
|
|
64
|
-
maven {
|
|
65
|
-
url 'https://jitpack.io'
|
|
66
|
-
}
|
|
87
|
+
maven { url 'https://jitpack.io' }
|
|
67
88
|
}
|
|
68
89
|
|
|
69
90
|
def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
@@ -77,10 +98,3 @@ dependencies {
|
|
|
77
98
|
implementation 'com.github.PayME-Miniapp:native-android:0.1.1'
|
|
78
99
|
}
|
|
79
100
|
|
|
80
|
-
if (isNewArchitectureEnabled()) {
|
|
81
|
-
react {
|
|
82
|
-
jsRootDir = file("../src/")
|
|
83
|
-
libraryName = "RNPayMEMiniApp"
|
|
84
|
-
codegenJavaPackageName = "com.paymeminiapp"
|
|
85
|
-
}
|
|
86
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payme-mini-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Thư viện tích hợp PayME Miniapp",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"test": "jest",
|
|
31
31
|
"typecheck": "tsc --noEmit",
|
|
32
32
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
33
|
-
"
|
|
33
|
+
"prepare": "bob build",
|
|
34
34
|
"release": "release-it",
|
|
35
35
|
"example": "yarn --cwd example",
|
|
36
36
|
"bootstrap": "yarn example && yarn install && yarn example pods",
|
|
@@ -53,36 +53,36 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@commitlint/config-conventional": "^17.0.2",
|
|
56
|
-
"@evilmartians/lefthook": "^1.
|
|
57
|
-
"@react-native
|
|
56
|
+
"@evilmartians/lefthook": "^1.5.0",
|
|
57
|
+
"@react-native/eslint-config": "^0.73.1",
|
|
58
58
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
59
|
-
"@types/jest": "^
|
|
60
|
-
"@types/react": "
|
|
61
|
-
"@types/react-native": "0.70.0",
|
|
59
|
+
"@types/jest": "^29.5.5",
|
|
60
|
+
"@types/react": "^18.2.44",
|
|
62
61
|
"commitlint": "^17.0.2",
|
|
63
|
-
"del-cli": "^5.
|
|
64
|
-
"eslint": "^8.
|
|
65
|
-
"eslint-config-prettier": "^
|
|
66
|
-
"eslint-plugin-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"prettier": "^
|
|
70
|
-
"react": "18.
|
|
71
|
-
"react-native": "0.
|
|
62
|
+
"del-cli": "^5.1.0",
|
|
63
|
+
"eslint": "^8.51.0",
|
|
64
|
+
"eslint-config-prettier": "^9.0.0",
|
|
65
|
+
"eslint-plugin-ft-flow": "^3.0.9",
|
|
66
|
+
"eslint-plugin-prettier": "^5.0.1",
|
|
67
|
+
"jest": "^29.7.0",
|
|
68
|
+
"prettier": "^3.0.3",
|
|
69
|
+
"react": "18.2.0",
|
|
70
|
+
"react-native": "0.74.1",
|
|
72
71
|
"react-native-builder-bob": "^0.20.0",
|
|
73
72
|
"release-it": "^15.0.0",
|
|
74
|
-
"
|
|
73
|
+
"turbo": "^1.10.7",
|
|
74
|
+
"typescript": "^5.2.2"
|
|
75
75
|
},
|
|
76
76
|
"resolutions": {
|
|
77
|
-
"@types/react": "
|
|
77
|
+
"@types/react": "^18.2.44"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"react": "*",
|
|
81
81
|
"react-native": "*"
|
|
82
82
|
},
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
|
|
83
|
+
"workspaces": [
|
|
84
|
+
"example"
|
|
85
|
+
],
|
|
86
86
|
"jest": {
|
|
87
87
|
"preset": "react-native",
|
|
88
88
|
"modulePathIgnorePatterns": [
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"eslintConfig": {
|
|
116
116
|
"root": true,
|
|
117
117
|
"extends": [
|
|
118
|
-
"@react-native
|
|
118
|
+
"@react-native",
|
|
119
119
|
"prettier"
|
|
120
120
|
],
|
|
121
121
|
"rules": {
|
|
@@ -156,5 +156,5 @@
|
|
|
156
156
|
]
|
|
157
157
|
]
|
|
158
158
|
},
|
|
159
|
-
"packageManager": "yarn@4.
|
|
159
|
+
"packageManager": "yarn@4.2.2"
|
|
160
160
|
}
|
package/payme-mini-app.podspec
CHANGED
|
@@ -18,23 +18,47 @@ Pod::Spec.new do |s|
|
|
|
18
18
|
s.resource_bundles = {
|
|
19
19
|
'payme-mini-app_PrivacyInfo' => ['ios/PrivacyInfo.xcprivacy'],
|
|
20
20
|
}
|
|
21
|
+
s.dependency "PayME-Miniapp", "0.2.46"
|
|
21
22
|
|
|
22
|
-
s.dependency "
|
|
23
|
-
s.
|
|
24
|
-
|
|
25
|
-
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
26
|
-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
# s.dependency "React-Core"
|
|
24
|
+
# s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }
|
|
25
|
+
|
|
26
|
+
# # Don't install the dependencies when we run `pod install` in the old architecture.
|
|
27
|
+
# if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
28
|
+
# s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
29
|
+
# s.pod_target_xcconfig = {
|
|
30
|
+
# "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
31
|
+
# "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
32
|
+
# "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
|
|
33
|
+
# "BUILD_LIBRARY_FOR_DISTRIBUTION" => "YES",
|
|
34
|
+
# }
|
|
35
|
+
# s.dependency "React-Codegen"
|
|
36
|
+
# s.dependency "RCT-Folly"
|
|
37
|
+
# s.dependency "RCTRequired"
|
|
38
|
+
# s.dependency "RCTTypeSafety"
|
|
39
|
+
# s.dependency "ReactCommon/turbomodule/core"
|
|
40
|
+
# end
|
|
41
|
+
|
|
42
|
+
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
43
|
+
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
|
44
|
+
if respond_to?(:install_modules_dependencies, true)
|
|
45
|
+
install_modules_dependencies(s)
|
|
46
|
+
else
|
|
47
|
+
s.dependency "React-Core"
|
|
48
|
+
|
|
49
|
+
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
50
|
+
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
51
|
+
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
52
|
+
s.pod_target_xcconfig = {
|
|
53
|
+
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
54
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
55
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
56
|
+
}
|
|
57
|
+
s.dependency "React-Codegen"
|
|
58
|
+
s.dependency "RCT-Folly"
|
|
59
|
+
s.dependency "RCTRequired"
|
|
60
|
+
s.dependency "RCTTypeSafety"
|
|
61
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
62
|
+
end
|
|
39
63
|
end
|
|
40
64
|
end
|