-
Notifications
You must be signed in to change notification settings - Fork 2
/
libraryCreation.patch
89 lines (85 loc) · 3.59 KB
/
libraryCreation.patch
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
diff --git a/app/build.gradle b/app/build.gradle
index 66394e7..18fd9a4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,4 +1,4 @@
-apply plugin: 'com.android.application'
+apply plugin: 'com.android.library'
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: 'kotlin-parcelize'
apply plugin: 'io.hyperswitch.react'
@@ -67,7 +67,7 @@ def enableSeparateBuildPerCPUArchitecture = true
/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
-def enableProguardInReleaseBuilds = true
+def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore (JSC)
@@ -100,7 +100,6 @@ android {
namespace 'io.hyperswitch'
defaultConfig {
- applicationId "io.hyperswitch"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
@@ -154,7 +153,7 @@ android {
}
}
// applicationVariants are e.g. debug, release
- applicationVariants.all { variant ->
+ libraryVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
@@ -186,14 +185,16 @@ dependencies {
implementation 'androidx.activity:activity-ktx:1.6.1'
implementation 'org.greenrobot:eventbus:3.3.1'
- //Debug Dependencies
- implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
- implementation 'com.github.kittinunf.fuel:fuel:2.3.1'
- implementation 'com.github.kittinunf.fuel:fuel-json:2.3.1'
-
}
//apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
//applyNativeModulesAppBuildGradle(project)
//apply from: "../../node_modules/react-native/react.gradle"
//apply from: file("../../node_modules/react-native-code-push/android/codepush.gradle")
+
+def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
+try {
+ appProject.android.buildTypes.debug.manifestPlaceholders += [applicationName: "io.hyperswitch.react.MainApplication"]
+ appProject.android.buildTypes.profile.manifestPlaceholders += [applicationName: "io.hyperswitch.react.MainApplication"]
+ appProject.android.buildTypes.release.manifestPlaceholders += [applicationName: "io.hyperswitch.react.MainApplication"]
+} catch (ignored) {}
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 9ada947..031940a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -9,8 +9,7 @@
<application
android:name=".react.MainApplication"
android:enableOnBackInvokedCallback="true"
- android:extractNativeLibs="true"
- android:theme="@style/AppTheme"
+ tools:replace="android:name"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
tools:targetApi="tiramisu">
@@ -28,15 +27,6 @@
<data android:scheme="${applicationId}.hyperswitch" />
</intent-filter>
</activity>
- <activity
- android:name=".MainActivity"
- android:exported="true">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
-
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
<activity
android:name=".payments.gpay.GooglePayActivity"
android:exported="false"