Skip to content

Commit b131e3e

Browse files
committed
refactor: update gradle
1 parent 17f330e commit b131e3e

File tree

3 files changed

+3
-49
lines changed

3 files changed

+3
-49
lines changed

client/mobile/android/app/build.gradle

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ apply plugin: "com.facebook.react"
33
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
44
apply plugin: 'com.huawei.agconnect' // huawei push
55

6-
import com.android.build.OutputFile
7-
86
/**
97
* This is the configuration block to customize your React Native Android app.
108
* By default you don't need to apply any configuration, just uncomment the lines you need.
@@ -15,8 +13,8 @@ react {
1513
// root = file("../")
1614
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
1715
// reactNativeDir = file("../node_modules/react-native")
18-
// The folder where the react-native Codegen package is. Default is ../node_modules/react-native-codegen
19-
// codegenDir = file("../node_modules/react-native-codegen")
16+
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
17+
// codegenDir = file("../node_modules/@react-native/codegen")
2018
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
2119
// cliFile = file("../node_modules/react-native/cli.js")
2220

@@ -54,14 +52,6 @@ react {
5452
// hermesFlags = ["-O", "-output-source-map"]
5553
}
5654

57-
/**
58-
* Set this to true to create four separate APKs instead of one,
59-
* one for each native architecture. This is useful if you don't
60-
* use App Bundles (https://developer.android.com/guide/app-bundle/)
61-
* and want to have separate APKs to upload to the Play Store.
62-
*/
63-
def enableSeparateBuildPerCPUArchitecture = false
64-
6555
/**
6656
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
6757
*/
@@ -80,16 +70,6 @@ def enableProguardInReleaseBuilds = false
8070
*/
8171
def jscFlavor = 'org.webkit:android-jsc:+'
8272

83-
/**
84-
* Private function to get the list of Native Architectures you want to build.
85-
* This reads the value from reactNativeArchitectures in your gradle.properties
86-
* file and works together with the --active-arch-only flag of react-native run-android.
87-
*/
88-
def reactNativeArchitectures() {
89-
def value = project.getProperties().get("reactNativeArchitectures")
90-
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
91-
}
92-
9373
android {
9474
ndkVersion rootProject.ext.ndkVersion
9575

@@ -122,14 +102,6 @@ android {
122102
]
123103
}
124104

125-
splits {
126-
abi {
127-
reset()
128-
enable enableSeparateBuildPerCPUArchitecture
129-
universalApk false // If true, also generate a universal APK
130-
include (*reactNativeArchitectures())
131-
}
132-
}
133105
signingConfigs {
134106
debug {
135107
if (project.env.get('TAILCHAT_UPLOAD_STORE_FILE')) {
@@ -162,30 +134,12 @@ android {
162134
// https://stackoverflow.com/questions/49286268/error-execution-failed-for-task-app-lintvitalrelease-any-one-can-solve-it
163135
checkReleaseBuilds false
164136
}
165-
166-
// applicationVariants are e.g. debug, release
167-
applicationVariants.all { variant ->
168-
variant.outputs.each { output ->
169-
// For each separate APK per architecture, set a unique version code as described here:
170-
// https://developer.android.com/studio/build/configure-apk-splits.html
171-
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
172-
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
173-
def abi = output.getFilter(OutputFile.ABI)
174-
if (abi != null) { // null for the universal-debug, universal-release variants
175-
output.versionCodeOverride =
176-
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
177-
}
178-
179-
}
180-
}
181137
}
182138

183139
dependencies {
184140
// The version of react-native is set by the React Native Gradle Plugin
185141
implementation("com.facebook.react:react-android")
186142

187-
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
188-
189143
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
190144
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
191145
exclude group:'com.squareup.okhttp3', module:'okhttp'

client/mobile/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ android.useAndroidX=true
2525
android.enableJetifier=true
2626

2727
# Version of flipper SDK to use with React Native
28-
FLIPPER_VERSION=0.185.0
28+
FLIPPER_VERSION=0.182.0
2929

3030
# Use this property to specify which architecture you want to build.
3131
# You can also override it from the CLI using
Binary file not shown.

0 commit comments

Comments
 (0)