@@ -20,12 +20,12 @@ react {
20
20
bundleCommand = " export:embed"
21
21
22
22
/* Folders */
23
- // The root of your project, i.e. where "package.json" lives. Default is '..'
24
- // root = file("../")
25
- // The folder where the react-native NPM package is. Default is ../node_modules/react-native
26
- // reactNativeDir = file("../node_modules/react-native")
27
- // The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
28
- // codegenDir = file("../node_modules/@react-native/codegen")
23
+ // The root of your project, i.e. where "package.json" lives. Default is '../ ..'
24
+ // root = file("../../ ")
25
+ // The folder where the react-native NPM package is. Default is ../../ node_modules/react-native
26
+ // reactNativeDir = file("../../ node_modules/react-native")
27
+ // The folder where the react-native Codegen package is. Default is ../../ node_modules/@react-native/codegen
28
+ // codegenDir = file("../../ node_modules/@react-native/codegen")
29
29
30
30
/* Variants */
31
31
// The list of variants to that are debuggable. For those we're going to
@@ -57,6 +57,9 @@ react {
57
57
//
58
58
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
59
59
// hermesFlags = ["-O", "-output-source-map"]
60
+
61
+ /* Autolinking */
62
+ autolinkLibrariesWithApp()
60
63
}
61
64
62
65
/**
@@ -122,9 +125,17 @@ android {
122
125
shrinkResources (findProperty(' android.enableShrinkResourcesInReleaseBuilds' )?. toBoolean() ?: false )
123
126
minifyEnabled enableProguardInReleaseBuilds
124
127
proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
128
+ crunchPngs (findProperty(' android.enablePngCrunchInReleaseBuilds' )?. toBoolean() ?: true )
125
129
}
126
130
}
127
-
131
+ packagingOptions {
132
+ jniLibs {
133
+ useLegacyPackaging (findProperty(' expo.useLegacyPackaging' )?. toBoolean() ?: false )
134
+ }
135
+ }
136
+ androidResources {
137
+ ignoreAssetsPattern ' !.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~'
138
+ }
128
139
testOptions {
129
140
animationsDisabled true
130
141
@@ -155,34 +166,27 @@ android {
155
166
dependencies {
156
167
// The version of react-native is set by the React Native Gradle Plugin
157
168
implementation(" com.facebook.react:react-android" )
158
- implementation ' com.squareup.okhttp3: okhttp:4.11.0 '
159
- implementation ' com.squareup. okio:okio:3.5.0 '
160
- implementation ' com.squareup. okio:okio-jvm:3.5.0 '
161
- implementation ' commons-fileupload:commons-fileupload:1.5 '
162
- implementation ' com.google. guava:guava:32.1.3-android '
169
+ implementation libs . okhttp
170
+ implementation libs . okio
171
+ implementation libs . okio. jvm
172
+ implementation libs . commons. fileupload
173
+ implementation libs . guava
163
174
164
175
def isGifEnabled = (findProperty(' expo.gif.enabled' ) ?: " " ) == " true" ;
165
176
def isWebpEnabled = (findProperty(' expo.webp.enabled' ) ?: " " ) == " true" ;
166
177
def isWebpAnimatedEnabled = (findProperty(' expo.webp.animated' ) ?: " " ) == " true" ;
167
- def frescoVersion = rootProject. ext. frescoVersion
168
-
169
- // If your app supports Android versions before Ice Cream Sandwich (API level 14)
170
- if (isGifEnabled || isWebpEnabled) {
171
- implementation(" com.facebook.fresco:fresco:${ frescoVersion} " )
172
- implementation(" com.facebook.fresco:imagepipeline-okhttp3:${ frescoVersion} " )
173
- }
174
178
175
179
if (isGifEnabled) {
176
180
// For animated gif support
177
- implementation(" com.facebook.fresco:animated-gif:${ frescoVersion } " )
181
+ implementation(" com.facebook.fresco:animated-gif:${ reactAndroidLibs.versions.fresco.get() } " )
178
182
}
179
183
180
184
if (isWebpEnabled) {
181
185
// For webp support
182
- implementation(" com.facebook.fresco:webpsupport:${ frescoVersion } " )
186
+ implementation(" com.facebook.fresco:webpsupport:${ reactAndroidLibs.versions.fresco.get() } " )
183
187
if (isWebpAnimatedEnabled) {
184
188
// Animated webp support
185
- implementation(" com.facebook.fresco:animated-webp:${ frescoVersion } " )
189
+ implementation(" com.facebook.fresco:animated-webp:${ reactAndroidLibs.versions.fresco.get() } " )
186
190
}
187
191
}
188
192
@@ -201,9 +205,6 @@ dependencies {
201
205
}
202
206
}
203
207
204
- apply from : new File ([" node" , " --print" , " require.resolve('@react-native-community/cli-platform-android/package.json', { paths: [require.resolve('react-native/package.json')] })" ]. execute(null , rootDir). text. trim(), " ../native_modules.gradle" );
205
- applyNativeModulesAppBuildGradle(project)
206
-
207
208
static def parseScheme (String uri ) {
208
209
def index = uri. indexOf(' :/' )
209
210
if (index == -1 ) {
0 commit comments