@@ -9,7 +9,7 @@ import com.android.build.OutputFile
9
9
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10
10
* bundle directly from the development server. Below you can see all the possible configurations
11
11
* and their defaults. If you decide to add a configuration block, make sure to add it before the
12
- * `apply from: "../../../ node_modules/react-native/react.gradle"` line.
12
+ * `apply from: "../../node_modules/react-native/react.gradle"` line.
13
13
*
14
14
* project.ext.react = [
15
15
* // the name of the generated asset file containing your JS bundle
@@ -18,7 +18,7 @@ import com.android.build.OutputFile
18
18
* // the entry file for bundle generation
19
19
* entryFile: "index.android.js",
20
20
*
21
- * // https://reactnative.dev /docs/performance#enable-the-ram-format
21
+ * // https://facebook.github.io/react-native /docs/performance#enable-the-ram-format
22
22
* bundleCommand: "ram-bundle",
23
23
*
24
24
* // whether to bundle JS and assets in debug mode
@@ -37,7 +37,7 @@ import com.android.build.OutputFile
37
37
* // bundleInBeta: true,
38
38
*
39
39
* // whether to disable dev mode in custom build variants (by default only disabled in release)
40
- * // for example : to disable dev mode in the staging build type (if configured)
40
+ * // for ViewpagerExample : to disable dev mode in the staging build type (if configured)
41
41
* devDisabledInStaging: true,
42
42
* // The configuration property can be in the following formats
43
43
* // 'devDisabledIn${productFlavor}${buildType}'
@@ -64,7 +64,7 @@ import com.android.build.OutputFile
64
64
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
65
65
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
66
66
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
67
- * // for example , you might want to remove it from here.
67
+ * // for ViewpagerExample , you might want to remove it from here.
68
68
* inputExcludes: ["android/**", "ios/**"],
69
69
*
70
70
* // override which node gets called and with what additional arguments
@@ -76,10 +76,10 @@ import com.android.build.OutputFile
76
76
*/
77
77
78
78
project. ext. react = [
79
- enableHermes : true , // clean and rebuild if changing
79
+ enableHermes : false , // clean and rebuild if changing
80
80
]
81
81
82
- apply from : " ../../../ node_modules/react-native/react.gradle"
82
+ apply from : " ../../node_modules/react-native/react.gradle"
83
83
84
84
/**
85
85
* Set this to true to create two separate APKs instead of one:
@@ -99,7 +99,7 @@ def enableProguardInReleaseBuilds = false
99
99
/**
100
100
* The preferred build flavor of JavaScriptCore.
101
101
*
102
- * For example , to use the international variant, you can use:
102
+ * For ViewpagerExample , to use the international variant, you can use:
103
103
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
104
104
*
105
105
* The international variant includes ICU i18n library and necessary data
@@ -127,7 +127,7 @@ android {
127
127
}
128
128
129
129
defaultConfig {
130
- applicationId " com.reactnativecommunity.viewpager. example"
130
+ applicationId " com.example.reactnativeviewpager "
131
131
minSdkVersion rootProject. ext. minSdkVersion
132
132
targetSdkVersion rootProject. ext. targetSdkVersion
133
133
versionCode 1
@@ -161,13 +161,6 @@ android {
161
161
proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
162
162
}
163
163
}
164
- packagingOptions {
165
- pickFirst " lib/armeabi-v7a/libc++_shared.so"
166
- pickFirst " lib/arm64-v8a/libc++_shared.so"
167
- pickFirst " lib/x86/libc++_shared.so"
168
- pickFirst " lib/x86_64/libc++_shared.so"
169
- }
170
-
171
164
// applicationVariants are e.g. debug, release
172
165
applicationVariants. all { variant ->
173
166
variant. outputs. each { output ->
@@ -182,35 +175,43 @@ android {
182
175
183
176
}
184
177
}
178
+
179
+ packagingOptions {
180
+ pickFirst " lib/armeabi-v7a/libc++_shared.so"
181
+ pickFirst " lib/arm64-v8a/libc++_shared.so"
182
+ pickFirst " lib/x86/libc++_shared.so"
183
+ pickFirst " lib/x86_64/libc++_shared.so"
184
+ }
185
185
}
186
186
187
187
dependencies {
188
188
implementation fileTree(dir : " libs" , include : [" *.jar" ])
189
- implementation " androidx.appcompat:appcompat:${ rootProject.ext.appCompatVersion} "
190
189
// noinspection GradleDynamicVersion
191
190
implementation " com.facebook.react:react-native:+" // From node_modules
192
- implementation project(' :react-native-viewpager' )
193
- implementation " androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
194
191
192
+
193
+ implementation " androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
195
194
debugImplementation(" com.facebook.flipper:flipper:${ FLIPPER_VERSION} " ) {
196
- exclude group : ' com.facebook.fbjni'
195
+ exclude group :' com.facebook.fbjni'
197
196
}
198
197
debugImplementation(" com.facebook.flipper:flipper-network-plugin:${ FLIPPER_VERSION} " ) {
199
- exclude group : ' com.facebook.flipper'
200
- exclude group : ' com.squareup.okhttp3' , module : ' okhttp'
198
+ exclude group :' com.facebook.flipper'
201
199
}
202
200
debugImplementation(" com.facebook.flipper:flipper-fresco-plugin:${ FLIPPER_VERSION} " ) {
203
- exclude group : ' com.facebook.flipper'
201
+ exclude group :' com.facebook.flipper'
204
202
}
205
203
206
204
if (enableHermes) {
207
- def hermesPath = " ../../../ node_modules/hermes-engine/android/" ;
205
+ def hermesPath = " ../../node_modules/hermes-engine/android/" ;
208
206
debugImplementation files(hermesPath + " hermes-debug.aar" )
209
207
releaseImplementation files(hermesPath + " hermes-release.aar" )
210
208
} else {
211
209
implementation jscFlavor
212
210
}
211
+
212
+ implementation project(' :reactnativeviewpager' )
213
213
}
214
+
214
215
task downloadDependencies () {
215
216
description ' Download all dependencies to the Gradle cache'
216
217
doLast {
@@ -224,12 +225,12 @@ task downloadDependencies() {
224
225
}
225
226
}
226
227
228
+
227
229
// Run this once to be able to run the application with BUCK
228
230
// puts all compile dependencies into folder libs for BUCK to use
229
231
task copyDownloadableDepsToLibs (type : Copy ) {
230
232
from configurations. compile
231
233
into ' libs'
232
234
}
233
235
234
-
235
- apply from : file(" ../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle" ); applyNativeModulesAppBuildGradle(project)
236
+ apply from : file(" ../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle" ); applyNativeModulesAppBuildGradle(project)
0 commit comments