xref: /MusicFree/android/app/build.gradle (revision bf6e62f27bf21a011995d7561e0093fae1a2d72e)
1*bf6e62f2S猫头猫apply plugin: "com.android.application"
2*bf6e62f2S猫头猫
3*bf6e62f2S猫头猫import com.android.build.OutputFile
4*bf6e62f2S猫头猫
5*bf6e62f2S猫头猫/**
6*bf6e62f2S猫头猫 * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7*bf6e62f2S猫头猫 * and bundleReleaseJsAndAssets).
8*bf6e62f2S猫头猫 * These basically call `react-native bundle` with the correct arguments during the Android build
9*bf6e62f2S猫头猫 * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10*bf6e62f2S猫头猫 * bundle directly from the development server. Below you can see all the possible configurations
11*bf6e62f2S猫头猫 * and their defaults. If you decide to add a configuration block, make sure to add it before the
12*bf6e62f2S猫头猫 * `apply from: "../../node_modules/react-native/react.gradle"` line.
13*bf6e62f2S猫头猫 *
14*bf6e62f2S猫头猫 * project.ext.react = [
15*bf6e62f2S猫头猫 *   // the name of the generated asset file containing your JS bundle
16*bf6e62f2S猫头猫 *   bundleAssetName: "index.android.bundle",
17*bf6e62f2S猫头猫 *
18*bf6e62f2S猫头猫 *   // the entry file for bundle generation. If none specified and
19*bf6e62f2S猫头猫 *   // "index.android.js" exists, it will be used. Otherwise "index.js" is
20*bf6e62f2S猫头猫 *   // default. Can be overridden with ENTRY_FILE environment variable.
21*bf6e62f2S猫头猫 *   entryFile: "index.android.js",
22*bf6e62f2S猫头猫 *
23*bf6e62f2S猫头猫 *   // https://reactnative.dev/docs/performance#enable-the-ram-format
24*bf6e62f2S猫头猫 *   bundleCommand: "ram-bundle",
25*bf6e62f2S猫头猫 *
26*bf6e62f2S猫头猫 *   // whether to bundle JS and assets in debug mode
27*bf6e62f2S猫头猫 *   bundleInDebug: false,
28*bf6e62f2S猫头猫 *
29*bf6e62f2S猫头猫 *   // whether to bundle JS and assets in release mode
30*bf6e62f2S猫头猫 *   bundleInRelease: true,
31*bf6e62f2S猫头猫 *
32*bf6e62f2S猫头猫 *   // whether to bundle JS and assets in another build variant (if configured).
33*bf6e62f2S猫头猫 *   // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
34*bf6e62f2S猫头猫 *   // The configuration property can be in the following formats
35*bf6e62f2S猫头猫 *   //         'bundleIn${productFlavor}${buildType}'
36*bf6e62f2S猫头猫 *   //         'bundleIn${buildType}'
37*bf6e62f2S猫头猫 *   // bundleInFreeDebug: true,
38*bf6e62f2S猫头猫 *   // bundleInPaidRelease: true,
39*bf6e62f2S猫头猫 *   // bundleInBeta: true,
40*bf6e62f2S猫头猫 *
41*bf6e62f2S猫头猫 *   // whether to disable dev mode in custom build variants (by default only disabled in release)
42*bf6e62f2S猫头猫 *   // for example: to disable dev mode in the staging build type (if configured)
43*bf6e62f2S猫头猫 *   devDisabledInStaging: true,
44*bf6e62f2S猫头猫 *   // The configuration property can be in the following formats
45*bf6e62f2S猫头猫 *   //         'devDisabledIn${productFlavor}${buildType}'
46*bf6e62f2S猫头猫 *   //         'devDisabledIn${buildType}'
47*bf6e62f2S猫头猫 *
48*bf6e62f2S猫头猫 *   // the root of your project, i.e. where "package.json" lives
49*bf6e62f2S猫头猫 *   root: "../../",
50*bf6e62f2S猫头猫 *
51*bf6e62f2S猫头猫 *   // where to put the JS bundle asset in debug mode
52*bf6e62f2S猫头猫 *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
53*bf6e62f2S猫头猫 *
54*bf6e62f2S猫头猫 *   // where to put the JS bundle asset in release mode
55*bf6e62f2S猫头猫 *   jsBundleDirRelease: "$buildDir/intermediates/assets/release",
56*bf6e62f2S猫头猫 *
57*bf6e62f2S猫头猫 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
58*bf6e62f2S猫头猫 *   // require('./image.png')), in debug mode
59*bf6e62f2S猫头猫 *   resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
60*bf6e62f2S猫头猫 *
61*bf6e62f2S猫头猫 *   // where to put drawable resources / React Native assets, e.g. the ones you use via
62*bf6e62f2S猫头猫 *   // require('./image.png')), in release mode
63*bf6e62f2S猫头猫 *   resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
64*bf6e62f2S猫头猫 *
65*bf6e62f2S猫头猫 *   // by default the gradle tasks are skipped if none of the JS files or assets change; this means
66*bf6e62f2S猫头猫 *   // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
67*bf6e62f2S猫头猫 *   // date; if you have any other folders that you want to ignore for performance reasons (gradle
68*bf6e62f2S猫头猫 *   // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
69*bf6e62f2S猫头猫 *   // for example, you might want to remove it from here.
70*bf6e62f2S猫头猫 *   inputExcludes: ["android/**", "ios/**"],
71*bf6e62f2S猫头猫 *
72*bf6e62f2S猫头猫 *   // override which node gets called and with what additional arguments
73*bf6e62f2S猫头猫 *   nodeExecutableAndArgs: ["node"],
74*bf6e62f2S猫头猫 *
75*bf6e62f2S猫头猫 *   // supply additional arguments to the packager
76*bf6e62f2S猫头猫 *   extraPackagerArgs: []
77*bf6e62f2S猫头猫 * ]
78*bf6e62f2S猫头猫 */
79*bf6e62f2S猫头猫
80*bf6e62f2S猫头猫project.ext.react = [
81*bf6e62f2S猫头猫    entryFile: "index.js",
82*bf6e62f2S猫头猫    enableHermes: true,  // clean and rebuild if changing
83*bf6e62f2S猫头猫    hermesCommand: '../../node_modules/react-native/sdks/hermesc/%OS-BIN%/hermesc'
84*bf6e62f2S猫头猫]
85*bf6e62f2S猫头猫
86*bf6e62f2S猫头猫apply from: "../../node_modules/react-native/react.gradle"
87*bf6e62f2S猫头猫
88*bf6e62f2S猫头猫/**
89*bf6e62f2S猫头猫 * Set this to true to create two separate APKs instead of one:
90*bf6e62f2S猫头猫 *   - An APK that only works on ARM devices
91*bf6e62f2S猫头猫 *   - An APK that only works on x86 devices
92*bf6e62f2S猫头猫 * The advantage is the size of the APK is reduced by about 4MB.
93*bf6e62f2S猫头猫 * Upload all the APKs to the Play Store and people will download
94*bf6e62f2S猫头猫 * the correct one based on the CPU architecture of their device.
95*bf6e62f2S猫头猫 */
96*bf6e62f2S猫头猫def enableSeparateBuildPerCPUArchitecture = false
97*bf6e62f2S猫头猫
98*bf6e62f2S猫头猫/**
99*bf6e62f2S猫头猫 * Run Proguard to shrink the Java bytecode in release builds.
100*bf6e62f2S猫头猫 */
101*bf6e62f2S猫头猫def enableProguardInReleaseBuilds = false
102*bf6e62f2S猫头猫
103*bf6e62f2S猫头猫/**
104*bf6e62f2S猫头猫 * The preferred build flavor of JavaScriptCore.
105*bf6e62f2S猫头猫 *
106*bf6e62f2S猫头猫 * For example, to use the international variant, you can use:
107*bf6e62f2S猫头猫 * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
108*bf6e62f2S猫头猫 *
109*bf6e62f2S猫头猫 * The international variant includes ICU i18n library and necessary data
110*bf6e62f2S猫头猫 * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
111*bf6e62f2S猫头猫 * give correct results when using with locales other than en-US.  Note that
112*bf6e62f2S猫头猫 * this variant is about 6MiB larger per architecture than default.
113*bf6e62f2S猫头猫 */
114*bf6e62f2S猫头猫def jscFlavor = 'org.webkit:android-jsc:+'
115*bf6e62f2S猫头猫
116*bf6e62f2S猫头猫/**
117*bf6e62f2S猫头猫 * Whether to enable the Hermes VM.
118*bf6e62f2S猫头猫 *
119*bf6e62f2S猫头猫 * This should be set on project.ext.react and that value will be read here. If it is not set
120*bf6e62f2S猫头猫 * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
121*bf6e62f2S猫头猫 * and the benefits of using Hermes will therefore be sharply reduced.
122*bf6e62f2S猫头猫 */
123*bf6e62f2S猫头猫def enableHermes = project.ext.react.get("enableHermes", false);
124*bf6e62f2S猫头猫
125*bf6e62f2S猫头猫/**
126*bf6e62f2S猫头猫 * Architectures to build native code for.
127*bf6e62f2S猫头猫 */
128*bf6e62f2S猫头猫def reactNativeArchitectures() {
129*bf6e62f2S猫头猫    def value = project.getProperties().get("reactNativeArchitectures")
130*bf6e62f2S猫头猫    return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
131*bf6e62f2S猫头猫}
132*bf6e62f2S猫头猫
133*bf6e62f2S猫头猫def keystoreProperties = new Properties()
134*bf6e62f2S猫头猫def keystorePropertiesFile = rootProject.file('keystore.properties')
135*bf6e62f2S猫头猫if (keystorePropertiesFile.exists()) {
136*bf6e62f2S猫头猫    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
137*bf6e62f2S猫头猫}
138*bf6e62f2S猫头猫
139*bf6e62f2S猫头猫
140*bf6e62f2S猫头猫android {
141*bf6e62f2S猫头猫    ndkVersion rootProject.ext.ndkVersion
142*bf6e62f2S猫头猫
143*bf6e62f2S猫头猫    compileSdkVersion rootProject.ext.compileSdkVersion
144*bf6e62f2S猫头猫
145*bf6e62f2S猫头猫    defaultConfig {
146*bf6e62f2S猫头猫        applicationId "fun.upup.musicfree"
147*bf6e62f2S猫头猫        minSdkVersion rootProject.ext.minSdkVersion
148*bf6e62f2S猫头猫        targetSdkVersion rootProject.ext.targetSdkVersion
149*bf6e62f2S猫头猫        versionCode 1
150*bf6e62f2S猫头猫        versionName "1.0"
151*bf6e62f2S猫头猫        buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()
152*bf6e62f2S猫头猫
153*bf6e62f2S猫头猫        if (isNewArchitectureEnabled()) {
154*bf6e62f2S猫头猫            // We configure the NDK build only if you decide to opt-in for the New Architecture.
155*bf6e62f2S猫头猫            externalNativeBuild {
156*bf6e62f2S猫头猫                ndkBuild {
157*bf6e62f2S猫头猫                    arguments "APP_PLATFORM=android-21",
158*bf6e62f2S猫头猫                        "APP_STL=c++_shared",
159*bf6e62f2S猫头猫                        "NDK_TOOLCHAIN_VERSION=clang",
160*bf6e62f2S猫头猫                        "GENERATED_SRC_DIR=$buildDir/generated/source",
161*bf6e62f2S猫头猫                        "PROJECT_BUILD_DIR=$buildDir",
162*bf6e62f2S猫头猫                        "REACT_ANDROID_DIR=$rootDir/../node_modules/react-native/ReactAndroid",
163*bf6e62f2S猫头猫                        "REACT_ANDROID_BUILD_DIR=$rootDir/../node_modules/react-native/ReactAndroid/build",
164*bf6e62f2S猫头猫                        "NODE_MODULES_DIR=$rootDir/../node_modules"
165*bf6e62f2S猫头猫                    cFlags "-Wall", "-Werror", "-fexceptions", "-frtti", "-DWITH_INSPECTOR=1"
166*bf6e62f2S猫头猫                    cppFlags "-std=c++17"
167*bf6e62f2S猫头猫                    // Make sure this target name is the same you specify inside the
168*bf6e62f2S猫头猫                    // src/main/jni/Android.mk file for the `LOCAL_MODULE` variable.
169*bf6e62f2S猫头猫                    targets "musicfree_appmodules"
170*bf6e62f2S猫头猫                }
171*bf6e62f2S猫头猫            }
172*bf6e62f2S猫头猫            if (!enableSeparateBuildPerCPUArchitecture) {
173*bf6e62f2S猫头猫                ndk {
174*bf6e62f2S猫头猫                    abiFilters (*reactNativeArchitectures())
175*bf6e62f2S猫头猫                }
176*bf6e62f2S猫头猫            }
177*bf6e62f2S猫头猫        }
178*bf6e62f2S猫头猫    }
179*bf6e62f2S猫头猫
180*bf6e62f2S猫头猫    if (isNewArchitectureEnabled()) {
181*bf6e62f2S猫头猫        // We configure the NDK build only if you decide to opt-in for the New Architecture.
182*bf6e62f2S猫头猫        externalNativeBuild {
183*bf6e62f2S猫头猫            ndkBuild {
184*bf6e62f2S猫头猫                path "$projectDir/src/main/jni/Android.mk"
185*bf6e62f2S猫头猫            }
186*bf6e62f2S猫头猫        }
187*bf6e62f2S猫头猫        def reactAndroidProjectDir = project(':ReactAndroid').projectDir
188*bf6e62f2S猫头猫        def packageReactNdkDebugLibs = tasks.register("packageReactNdkDebugLibs", Copy) {
189*bf6e62f2S猫头猫            dependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck")
190*bf6e62f2S猫头猫            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
191*bf6e62f2S猫头猫            into("$buildDir/react-ndk/exported")
192*bf6e62f2S猫头猫        }
193*bf6e62f2S猫头猫        def packageReactNdkReleaseLibs = tasks.register("packageReactNdkReleaseLibs", Copy) {
194*bf6e62f2S猫头猫            dependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck")
195*bf6e62f2S猫头猫            from("$reactAndroidProjectDir/src/main/jni/prebuilt/lib")
196*bf6e62f2S猫头猫            into("$buildDir/react-ndk/exported")
197*bf6e62f2S猫头猫        }
198*bf6e62f2S猫头猫        afterEvaluate {
199*bf6e62f2S猫头猫            // If you wish to add a custom TurboModule or component locally,
200*bf6e62f2S猫头猫            // you should uncomment this line.
201*bf6e62f2S猫头猫            // preBuild.dependsOn("generateCodegenArtifactsFromSchema")
202*bf6e62f2S猫头猫            preDebugBuild.dependsOn(packageReactNdkDebugLibs)
203*bf6e62f2S猫头猫            preReleaseBuild.dependsOn(packageReactNdkReleaseLibs)
204*bf6e62f2S猫头猫
205*bf6e62f2S猫头猫            // Due to a bug inside AGP, we have to explicitly set a dependency
206*bf6e62f2S猫头猫            // between configureNdkBuild* tasks and the preBuild tasks.
207*bf6e62f2S猫头猫            // This can be removed once this is solved: https://issuetracker.google.com/issues/207403732
208*bf6e62f2S猫头猫            configureNdkBuildRelease.dependsOn(preReleaseBuild)
209*bf6e62f2S猫头猫            configureNdkBuildDebug.dependsOn(preDebugBuild)
210*bf6e62f2S猫头猫            reactNativeArchitectures().each { architecture ->
211*bf6e62f2S猫头猫                tasks.findByName("configureNdkBuildDebug[${architecture}]")?.configure {
212*bf6e62f2S猫头猫                    dependsOn("preDebugBuild")
213*bf6e62f2S猫头猫                }
214*bf6e62f2S猫头猫                tasks.findByName("configureNdkBuildRelease[${architecture}]")?.configure {
215*bf6e62f2S猫头猫                    dependsOn("preReleaseBuild")
216*bf6e62f2S猫头猫                }
217*bf6e62f2S猫头猫            }
218*bf6e62f2S猫头猫        }
219*bf6e62f2S猫头猫    }
220*bf6e62f2S猫头猫
221*bf6e62f2S猫头猫    splits {
222*bf6e62f2S猫头猫        abi {
223*bf6e62f2S猫头猫            reset()
224*bf6e62f2S猫头猫            enable enableSeparateBuildPerCPUArchitecture
225*bf6e62f2S猫头猫            universalApk false  // If true, also generate a universal APK
226*bf6e62f2S猫头猫            include (*reactNativeArchitectures())
227*bf6e62f2S猫头猫        }
228*bf6e62f2S猫头猫    }
229*bf6e62f2S猫头猫    signingConfigs {
230*bf6e62f2S猫头猫        debug {
231*bf6e62f2S猫头猫            storeFile file('debug.keystore')
232*bf6e62f2S猫头猫            storePassword 'android'
233*bf6e62f2S猫头猫            keyAlias 'androiddebugkey'
234*bf6e62f2S猫头猫            keyPassword 'android'
235*bf6e62f2S猫头猫        }
236*bf6e62f2S猫头猫        release {
237*bf6e62f2S猫头猫                storeFile file(keystoreProperties['RELEASE_STORE_FILE'])
238*bf6e62f2S猫头猫                storePassword keystoreProperties['RELEASE_STORE_PASSWORD']
239*bf6e62f2S猫头猫                keyAlias keystoreProperties['RELEASE_KEY_ALIAS']
240*bf6e62f2S猫头猫                keyPassword keystoreProperties['RELEASE_KEY_PASSWORD']
241*bf6e62f2S猫头猫
242*bf6e62f2S猫头猫        }
243*bf6e62f2S猫头猫    }
244*bf6e62f2S猫头猫    buildTypes {
245*bf6e62f2S猫头猫        debug {
246*bf6e62f2S猫头猫            signingConfig signingConfigs.debug
247*bf6e62f2S猫头猫        }
248*bf6e62f2S猫头猫        release {
249*bf6e62f2S猫头猫            // Caution! In production, you need to generate your own keystore file.
250*bf6e62f2S猫头猫            // see https://reactnative.dev/docs/signed-apk-android.
251*bf6e62f2S猫头猫            signingConfig signingConfigs.release
252*bf6e62f2S猫头猫            minifyEnabled enableProguardInReleaseBuilds
253*bf6e62f2S猫头猫            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
254*bf6e62f2S猫头猫        }
255*bf6e62f2S猫头猫    }
256*bf6e62f2S猫头猫
257*bf6e62f2S猫头猫    // applicationVariants are e.g. debug, release
258*bf6e62f2S猫头猫    applicationVariants.all { variant ->
259*bf6e62f2S猫头猫        variant.outputs.each { output ->
260*bf6e62f2S猫头猫            // For each separate APK per architecture, set a unique version code as described here:
261*bf6e62f2S猫头猫            // https://developer.android.com/studio/build/configure-apk-splits.html
262*bf6e62f2S猫头猫            // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
263*bf6e62f2S猫头猫            def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
264*bf6e62f2S猫头猫            def abi = output.getFilter(OutputFile.ABI)
265*bf6e62f2S猫头猫            if (abi != null) {  // null for the universal-debug, universal-release variants
266*bf6e62f2S猫头猫                output.versionCodeOverride =
267*bf6e62f2S猫头猫                        defaultConfig.versionCode * 1000 + versionCodes.get(abi)
268*bf6e62f2S猫头猫            }
269*bf6e62f2S猫头猫
270*bf6e62f2S猫头猫        }
271*bf6e62f2S猫头猫    }
272*bf6e62f2S猫头猫}
273*bf6e62f2S猫头猫
274*bf6e62f2S猫头猫dependencies {
275*bf6e62f2S猫头猫    implementation fileTree(dir: "libs", include: ["*.jar"])
276*bf6e62f2S猫头猫
277*bf6e62f2S猫头猫    //noinspection GradleDynamicVersion
278*bf6e62f2S猫头猫    implementation "com.facebook.react:react-native:+"  // From node_modules
279*bf6e62f2S猫头猫
280*bf6e62f2S猫头猫    implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
281*bf6e62f2S猫头猫
282*bf6e62f2S猫头猫    debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
283*bf6e62f2S猫头猫        exclude group:'com.facebook.fbjni'
284*bf6e62f2S猫头猫    }
285*bf6e62f2S猫头猫
286*bf6e62f2S猫头猫    debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
287*bf6e62f2S猫头猫        exclude group:'com.facebook.flipper'
288*bf6e62f2S猫头猫        exclude group:'com.squareup.okhttp3', module:'okhttp'
289*bf6e62f2S猫头猫    }
290*bf6e62f2S猫头猫
291*bf6e62f2S猫头猫    debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
292*bf6e62f2S猫头猫        exclude group:'com.facebook.flipper'
293*bf6e62f2S猫头猫    }
294*bf6e62f2S猫头猫
295*bf6e62f2S猫头猫    if (enableHermes) {
296*bf6e62f2S猫头猫        //noinspection GradleDynamicVersion
297*bf6e62f2S猫头猫        implementation("com.facebook.react:hermes-engine:+") { // From node_modules
298*bf6e62f2S猫头猫            exclude group:'com.facebook.fbjni'
299*bf6e62f2S猫头猫        }
300*bf6e62f2S猫头猫    } else {
301*bf6e62f2S猫头猫        implementation jscFlavor
302*bf6e62f2S猫头猫    }
303*bf6e62f2S猫头猫
304*bf6e62f2S猫头猫    implementation project(':react-native-fs')
305*bf6e62f2S猫头猫}
306*bf6e62f2S猫头猫
307*bf6e62f2S猫头猫if (isNewArchitectureEnabled()) {
308*bf6e62f2S猫头猫    // If new architecture is enabled, we let you build RN from source
309*bf6e62f2S猫头猫    // Otherwise we fallback to a prebuilt .aar bundled in the NPM package.
310*bf6e62f2S猫头猫    // This will be applied to all the imported transtitive dependency.
311*bf6e62f2S猫头猫    configurations.all {
312*bf6e62f2S猫头猫        resolutionStrategy.dependencySubstitution {
313*bf6e62f2S猫头猫            substitute(module("com.facebook.react:react-native"))
314*bf6e62f2S猫头猫                    .using(project(":ReactAndroid"))
315*bf6e62f2S猫头猫                    .because("On New Architecture we're building React Native from source")
316*bf6e62f2S猫头猫            substitute(module("com.facebook.react:hermes-engine"))
317*bf6e62f2S猫头猫                    .using(project(":ReactAndroid:hermes-engine"))
318*bf6e62f2S猫头猫                    .because("On New Architecture we're building Hermes from source")
319*bf6e62f2S猫头猫        }
320*bf6e62f2S猫头猫    }
321*bf6e62f2S猫头猫}
322*bf6e62f2S猫头猫
323*bf6e62f2S猫头猫// Run this once to be able to run the application with BUCK
324*bf6e62f2S猫头猫// puts all compile dependencies into folder libs for BUCK to use
325*bf6e62f2S猫头猫task copyDownloadableDepsToLibs(type: Copy) {
326*bf6e62f2S猫头猫    from configurations.implementation
327*bf6e62f2S猫头猫    into 'libs'
328*bf6e62f2S猫头猫}
329*bf6e62f2S猫头猫
330*bf6e62f2S猫头猫apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
331*bf6e62f2S猫头猫
332*bf6e62f2S猫头猫apply from: file("../../node_modules/react-native-vector-icons/fonts.gradle");
333*bf6e62f2S猫头猫
334*bf6e62f2S猫头猫def isNewArchitectureEnabled() {
335*bf6e62f2S猫头猫    // To opt-in for the New Architecture, you can either:
336*bf6e62f2S猫头猫    // - Set `newArchEnabled` to true inside the `gradle.properties` file
337*bf6e62f2S猫头猫    // - Invoke gradle with `-newArchEnabled=true`
338*bf6e62f2S猫头猫    // - Set an environment variable `ORG_GRADLE_PROJECT_newArchEnabled=true`
339*bf6e62f2S猫头猫    return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
340*bf6e62f2S猫头猫}
341*bf6e62f2S猫头猫
342