jcore-react-native 2.0.2 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/android/libs/arm64-v8a/{libjcore322.so → libjcore332.so} +0 -0
  2. package/android/libs/armeabi/{libjcore322.so → libjcore332.so} +0 -0
  3. package/android/libs/armeabi-v7a/{libjcore322.so → libjcore332.so} +0 -0
  4. package/android/libs/{jcore-android-3.2.2.jar → jcore-android-3.3.2.jar} +0 -0
  5. package/android/libs/mips/{libjcore322.so → libjcore332.so} +0 -0
  6. package/android/libs/mips64/{libjcore322.so → libjcore332.so} +0 -0
  7. package/android/libs/x86/{libjcore322.so → libjcore332.so} +0 -0
  8. package/android/libs/x86_64/{libjcore322.so → libjcore332.so} +0 -0
  9. package/android/src/main/java/cn/jiguang/plugins/core/JConstants.java +7 -0
  10. package/android/src/main/java/cn/jiguang/plugins/core/JCoreModule.java +14 -2
  11. package/index.js +5 -0
  12. package/package.json +1 -1
  13. package/.vscode/settings.json +0 -3
  14. package/android/.gradle/7.1.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  15. package/android/.gradle/7.1.1/dependencies-accessors/gc.properties +0 -0
  16. package/android/.gradle/7.1.1/fileChanges/last-build.bin +0 -0
  17. package/android/.gradle/7.1.1/fileHashes/fileHashes.lock +0 -0
  18. package/android/.gradle/7.1.1/gc.properties +0 -0
  19. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  20. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  21. package/android/.gradle/checksums/checksums.lock +0 -0
  22. package/android/.gradle/vcs-1/gc.properties +0 -0
  23. package/example/.buckconfig +0 -6
  24. package/example/.bundle/config +0 -2
  25. package/example/.eslintrc.js +0 -4
  26. package/example/.flowconfig +0 -65
  27. package/example/.prettierrc.js +0 -7
  28. package/example/.ruby-version +0 -1
  29. package/example/.watchmanconfig +0 -1
  30. package/example/App.js +0 -112
  31. package/example/Gemfile +0 -6
  32. package/example/__tests__/App-test.js +0 -14
  33. package/example/android/app/BUCK +0 -55
  34. package/example/android/app/build.gradle +0 -227
  35. package/example/android/app/build_defs.bzl +0 -19
  36. package/example/android/app/debug.keystore +0 -0
  37. package/example/android/app/proguard-rules.pro +0 -10
  38. package/example/android/app/src/debug/AndroidManifest.xml +0 -13
  39. package/example/android/app/src/debug/java/com/example/ReactNativeFlipper.java +0 -72
  40. package/example/android/app/src/main/AndroidManifest.xml +0 -25
  41. package/example/android/app/src/main/java/com/example/MainActivity.java +0 -15
  42. package/example/android/app/src/main/java/com/example/MainApplication.java +0 -80
  43. package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -36
  44. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  45. package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  46. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  47. package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  48. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  49. package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  50. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  51. package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  52. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  53. package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  54. package/example/android/app/src/main/res/values/strings.xml +0 -3
  55. package/example/android/app/src/main/res/values/styles.xml +0 -9
  56. package/example/android/build.gradle +0 -42
  57. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  58. package/example/android/gradle/wrapper/gradle-wrapper.properties +0 -5
  59. package/example/android/gradlew +0 -185
  60. package/example/android/gradlew.bat +0 -89
  61. package/example/android/settings.gradle +0 -3
  62. package/example/app.json +0 -4
  63. package/example/babel.config.js +0 -3
  64. package/example/index.js +0 -9
  65. package/example/ios/Podfile +0 -30
  66. package/example/ios/Podfile.lock +0 -533
  67. package/example/ios/example/AppDelegate.h +0 -8
  68. package/example/ios/example/AppDelegate.m +0 -62
  69. package/example/ios/example/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
  70. package/example/ios/example/Images.xcassets/Contents.json +0 -6
  71. package/example/ios/example/Info.plist +0 -55
  72. package/example/ios/example/LaunchScreen.storyboard +0 -47
  73. package/example/ios/example/main.m +0 -9
  74. package/example/ios/example.xcodeproj/project.pbxproj +0 -689
  75. package/example/ios/example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  76. package/example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme +0 -88
  77. package/example/ios/example.xcworkspace/contents.xcworkspacedata +0 -10
  78. package/example/ios/example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  79. package/example/ios/exampleTests/Info.plist +0 -24
  80. package/example/ios/exampleTests/exampleTests.m +0 -65
  81. package/example/metro.config.js +0 -17
  82. package/example/package-lock.json +0 -21830
  83. package/example/package.json +0 -30
  84. package/ios/RCTJCoreModule.xcodeproj/project.xcworkspace/xcuserdata/douban.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  85. package/ios/RCTJCoreModule.xcodeproj/xcuserdata/douban.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
@@ -0,0 +1,7 @@
1
+ package cn.jiguang.plugins.core;
2
+
3
+ public class JConstants {
4
+
5
+ public static final String COUNTRY_CODE = "code";
6
+
7
+ }
@@ -20,9 +20,9 @@ import org.json.JSONObject;
20
20
 
21
21
  import java.util.HashSet;
22
22
  import java.util.Set;
23
-
23
+ import cn.jiguang.plugins.core.JConstants;
24
24
  import cn.jiguang.api.utils.JCollectionAuth;
25
-
25
+ import cn.jiguang.api.JCoreInterface;
26
26
 
27
27
  public class JCoreModule extends ReactContextBaseJavaModule {
28
28
 
@@ -43,6 +43,18 @@ public class JCoreModule extends ReactContextBaseJavaModule {
43
43
  public void setAuth(boolean bool){
44
44
  JCollectionAuth.setAuth(reactContext,bool);
45
45
  }
46
+ @ReactMethod
47
+ public void testCountryCode(String code){
48
+ if (readableMap == null) {
49
+ JLogger.w(JConstants.PARAMS_NULL);
50
+ return;
51
+ }
52
+ String code = readableMap.getString(JConstants.COUNTRY_CODE);
53
+ if (TextUtils.isEmpty(code)) {
54
+ } else {
55
+ JCoreInterface.testCountryCode(code);
56
+ }
57
+ }
46
58
 
47
59
 
48
60
  }
package/index.js CHANGED
@@ -12,5 +12,10 @@ export default class JCore {
12
12
  static setAuth(auth) {
13
13
  JCoreModule.setAuth(auth)
14
14
  }
15
+ static testCountryCode(params) {
16
+ if (Platform.OS == "android") {
17
+ JCoreModule.testCountryCode(params)
18
+ }
19
+ }
15
20
 
16
21
  }
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "author" : "wicked.tc130",
6
6
  "license" : "ISC",
7
7
  "main" : "index.js",
8
- "version" : "2.0.2",
8
+ "version" : "2.0.5",
9
9
  "repository" : {
10
10
  "type": "git",
11
11
  "url": "https://github.com/jpush/jcore-react-native"
@@ -1,3 +0,0 @@
1
- {
2
- "java.configuration.updateBuildConfiguration": "automatic"
3
- }
File without changes
@@ -1,2 +0,0 @@
1
- #Thu Mar 24 12:12:22 CST 2022
2
- gradle.version=7.1.1
File without changes
@@ -1,6 +0,0 @@
1
-
2
- [android]
3
- target = Google Inc.:Google APIs:23
4
-
5
- [maven_repositories]
6
- central = https://repo1.maven.org/maven2
@@ -1,2 +0,0 @@
1
- BUNDLE_PATH: "vendor/bundle"
2
- BUNDLE_FORCE_RUBY_PLATFORM: 1
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: '@react-native-community',
4
- };
@@ -1,65 +0,0 @@
1
- [ignore]
2
- ; We fork some components by platform
3
- .*/*[.]android.js
4
-
5
- ; Ignore "BUCK" generated dirs
6
- <PROJECT_ROOT>/\.buckd/
7
-
8
- ; Ignore polyfills
9
- node_modules/react-native/Libraries/polyfills/.*
10
-
11
- ; Flow doesn't support platforms
12
- .*/Libraries/Utilities/LoadingView.js
13
-
14
- [untyped]
15
- .*/node_modules/@react-native-community/cli/.*/.*
16
-
17
- [include]
18
-
19
- [libs]
20
- node_modules/react-native/interface.js
21
- node_modules/react-native/flow/
22
-
23
- [options]
24
- emoji=true
25
-
26
- exact_by_default=true
27
-
28
- format.bracket_spacing=false
29
-
30
- module.file_ext=.js
31
- module.file_ext=.json
32
- module.file_ext=.ios.js
33
-
34
- munge_underscores=true
35
-
36
- module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
37
- module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
38
-
39
- suppress_type=$FlowIssue
40
- suppress_type=$FlowFixMe
41
- suppress_type=$FlowFixMeProps
42
- suppress_type=$FlowFixMeState
43
-
44
- [lints]
45
- sketchy-null-number=warn
46
- sketchy-null-mixed=warn
47
- sketchy-number=warn
48
- untyped-type-import=warn
49
- nonstrict-import=warn
50
- deprecated-type=warn
51
- unsafe-getters-setters=warn
52
- unnecessary-invariant=warn
53
- signature-verification-failure=warn
54
-
55
- [strict]
56
- deprecated-type
57
- nonstrict-import
58
- sketchy-null
59
- unclear-type
60
- unsafe-getters-setters
61
- untyped-import
62
- untyped-type-import
63
-
64
- [version]
65
- ^0.162.0
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- bracketSpacing: false,
3
- jsxBracketSameLine: true,
4
- singleQuote: true,
5
- trailingComma: 'all',
6
- arrowParens: 'avoid',
7
- };
@@ -1 +0,0 @@
1
- 2.7.4
@@ -1 +0,0 @@
1
- {}
package/example/App.js DELETED
@@ -1,112 +0,0 @@
1
- /**
2
- * Sample React Native App
3
- * https://github.com/facebook/react-native
4
- *
5
- * @format
6
- * @flow strict-local
7
- */
8
-
9
- import React from 'react';
10
- import type {Node} from 'react';
11
- import {
12
- SafeAreaView,
13
- ScrollView,
14
- StatusBar,
15
- StyleSheet,
16
- Text,
17
- useColorScheme,
18
- View,
19
- } from 'react-native';
20
-
21
- import {
22
- Colors,
23
- DebugInstructions,
24
- Header,
25
- LearnMoreLinks,
26
- ReloadInstructions,
27
- } from 'react-native/Libraries/NewAppScreen';
28
-
29
- const Section = ({children, title}): Node => {
30
- const isDarkMode = useColorScheme() === 'dark';
31
- return (
32
- <View style={styles.sectionContainer}>
33
- <Text
34
- style={[
35
- styles.sectionTitle,
36
- {
37
- color: isDarkMode ? Colors.white : Colors.black,
38
- },
39
- ]}>
40
- {title}
41
- </Text>
42
- <Text
43
- style={[
44
- styles.sectionDescription,
45
- {
46
- color: isDarkMode ? Colors.light : Colors.dark,
47
- },
48
- ]}>
49
- {children}
50
- </Text>
51
- </View>
52
- );
53
- };
54
-
55
- const App: () => Node = () => {
56
- const isDarkMode = useColorScheme() === 'dark';
57
-
58
- const backgroundStyle = {
59
- backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
60
- };
61
-
62
- return (
63
- <SafeAreaView style={backgroundStyle}>
64
- <StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
65
- <ScrollView
66
- contentInsetAdjustmentBehavior="automatic"
67
- style={backgroundStyle}>
68
- <Header />
69
- <View
70
- style={{
71
- backgroundColor: isDarkMode ? Colors.black : Colors.white,
72
- }}>
73
- <Section title="Step One">
74
- Edit <Text style={styles.highlight}>App.js</Text> to change this
75
- screen and then come back to see your edits.
76
- </Section>
77
- <Section title="See Your Changes">
78
- <ReloadInstructions />
79
- </Section>
80
- <Section title="Debug">
81
- <DebugInstructions />
82
- </Section>
83
- <Section title="Learn More">
84
- Read the docs to discover what to do next:
85
- </Section>
86
- <LearnMoreLinks />
87
- </View>
88
- </ScrollView>
89
- </SafeAreaView>
90
- );
91
- };
92
-
93
- const styles = StyleSheet.create({
94
- sectionContainer: {
95
- marginTop: 32,
96
- paddingHorizontal: 24,
97
- },
98
- sectionTitle: {
99
- fontSize: 24,
100
- fontWeight: '600',
101
- },
102
- sectionDescription: {
103
- marginTop: 8,
104
- fontSize: 18,
105
- fontWeight: '400',
106
- },
107
- highlight: {
108
- fontWeight: '700',
109
- },
110
- });
111
-
112
- export default App;
package/example/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4
- ruby '2.7.4'
5
-
6
- gem 'cocoapods', '~> 1.11', '>= 1.11.2'
@@ -1,14 +0,0 @@
1
- /**
2
- * @format
3
- */
4
-
5
- import 'react-native';
6
- import React from 'react';
7
- import App from '../App';
8
-
9
- // Note: test renderer must be required after react-native.
10
- import renderer from 'react-test-renderer';
11
-
12
- it('renders correctly', () => {
13
- renderer.create(<App />);
14
- });
@@ -1,55 +0,0 @@
1
- # To learn about Buck see [Docs](https://buckbuild.com/).
2
- # To run your application with Buck:
3
- # - install Buck
4
- # - `npm start` - to start the packager
5
- # - `cd android`
6
- # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7
- # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8
- # - `buck install -r android/app` - compile, install and run application
9
- #
10
-
11
- load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12
-
13
- lib_deps = []
14
-
15
- create_aar_targets(glob(["libs/*.aar"]))
16
-
17
- create_jar_targets(glob(["libs/*.jar"]))
18
-
19
- android_library(
20
- name = "all-libs",
21
- exported_deps = lib_deps,
22
- )
23
-
24
- android_library(
25
- name = "app-code",
26
- srcs = glob([
27
- "src/main/java/**/*.java",
28
- ]),
29
- deps = [
30
- ":all-libs",
31
- ":build_config",
32
- ":res",
33
- ],
34
- )
35
-
36
- android_build_config(
37
- name = "build_config",
38
- package = "com.example",
39
- )
40
-
41
- android_resource(
42
- name = "res",
43
- package = "com.example",
44
- res = "src/main/res",
45
- )
46
-
47
- android_binary(
48
- name = "app",
49
- keystore = "//android/keystores:debug",
50
- manifest = "src/main/AndroidManifest.xml",
51
- package_type = "debug",
52
- deps = [
53
- ":app-code",
54
- ],
55
- )
@@ -1,227 +0,0 @@
1
- apply plugin: "com.android.application"
2
-
3
- import com.android.build.OutputFile
4
-
5
- /**
6
- * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7
- * and bundleReleaseJsAndAssets).
8
- * These basically call `react-native bundle` with the correct arguments during the Android build
9
- * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10
- * bundle directly from the development server. Below you can see all the possible configurations
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.
13
- *
14
- * project.ext.react = [
15
- * // the name of the generated asset file containing your JS bundle
16
- * bundleAssetName: "index.android.bundle",
17
- *
18
- * // the entry file for bundle generation. If none specified and
19
- * // "index.android.js" exists, it will be used. Otherwise "index.js" is
20
- * // default. Can be overridden with ENTRY_FILE environment variable.
21
- * entryFile: "index.android.js",
22
- *
23
- * // https://reactnative.dev/docs/performance#enable-the-ram-format
24
- * bundleCommand: "ram-bundle",
25
- *
26
- * // whether to bundle JS and assets in debug mode
27
- * bundleInDebug: false,
28
- *
29
- * // whether to bundle JS and assets in release mode
30
- * bundleInRelease: true,
31
- *
32
- * // whether to bundle JS and assets in another build variant (if configured).
33
- * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
34
- * // The configuration property can be in the following formats
35
- * // 'bundleIn${productFlavor}${buildType}'
36
- * // 'bundleIn${buildType}'
37
- * // bundleInFreeDebug: true,
38
- * // bundleInPaidRelease: true,
39
- * // bundleInBeta: true,
40
- *
41
- * // whether to disable dev mode in custom build variants (by default only disabled in release)
42
- * // for example: to disable dev mode in the staging build type (if configured)
43
- * devDisabledInStaging: true,
44
- * // The configuration property can be in the following formats
45
- * // 'devDisabledIn${productFlavor}${buildType}'
46
- * // 'devDisabledIn${buildType}'
47
- *
48
- * // the root of your project, i.e. where "package.json" lives
49
- * root: "../../",
50
- *
51
- * // where to put the JS bundle asset in debug mode
52
- * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
53
- *
54
- * // where to put the JS bundle asset in release mode
55
- * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
56
- *
57
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
58
- * // require('./image.png')), in debug mode
59
- * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
60
- *
61
- * // where to put drawable resources / React Native assets, e.g. the ones you use via
62
- * // require('./image.png')), in release mode
63
- * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
64
- *
65
- * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
66
- * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
67
- * // date; if you have any other folders that you want to ignore for performance reasons (gradle
68
- * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
69
- * // for example, you might want to remove it from here.
70
- * inputExcludes: ["android/**", "ios/**"],
71
- *
72
- * // override which node gets called and with what additional arguments
73
- * nodeExecutableAndArgs: ["node"],
74
- *
75
- * // supply additional arguments to the packager
76
- * extraPackagerArgs: []
77
- * ]
78
- */
79
-
80
- project.ext.react = [
81
- enableHermes: false, // clean and rebuild if changing
82
- ]
83
-
84
- apply from: "../../node_modules/react-native/react.gradle"
85
-
86
- /**
87
- * Set this to true to create two separate APKs instead of one:
88
- * - An APK that only works on ARM devices
89
- * - An APK that only works on x86 devices
90
- * The advantage is the size of the APK is reduced by about 4MB.
91
- * Upload all the APKs to the Play Store and people will download
92
- * the correct one based on the CPU architecture of their device.
93
- */
94
- def enableSeparateBuildPerCPUArchitecture = false
95
-
96
- /**
97
- * Run Proguard to shrink the Java bytecode in release builds.
98
- */
99
- def enableProguardInReleaseBuilds = false
100
-
101
- /**
102
- * The preferred build flavor of JavaScriptCore.
103
- *
104
- * For example, to use the international variant, you can use:
105
- * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
106
- *
107
- * The international variant includes ICU i18n library and necessary data
108
- * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
109
- * give correct results when using with locales other than en-US. Note that
110
- * this variant is about 6MiB larger per architecture than default.
111
- */
112
- def jscFlavor = 'org.webkit:android-jsc:+'
113
-
114
- /**
115
- * Whether to enable the Hermes VM.
116
- *
117
- * This should be set on project.ext.react and that value will be read here. If it is not set
118
- * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
119
- * and the benefits of using Hermes will therefore be sharply reduced.
120
- */
121
- def enableHermes = project.ext.react.get("enableHermes", false);
122
-
123
- /**
124
- * Architectures to build native code for in debug.
125
- */
126
- def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")
127
-
128
- android {
129
- ndkVersion rootProject.ext.ndkVersion
130
-
131
- compileSdkVersion rootProject.ext.compileSdkVersion
132
-
133
- defaultConfig {
134
- applicationId "com.example"
135
- minSdkVersion rootProject.ext.minSdkVersion
136
- targetSdkVersion rootProject.ext.targetSdkVersion
137
- versionCode 1
138
- versionName "1.0"
139
- }
140
- splits {
141
- abi {
142
- reset()
143
- enable enableSeparateBuildPerCPUArchitecture
144
- universalApk false // If true, also generate a universal APK
145
- include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
146
- }
147
- }
148
- signingConfigs {
149
- debug {
150
- storeFile file('debug.keystore')
151
- storePassword 'android'
152
- keyAlias 'androiddebugkey'
153
- keyPassword 'android'
154
- }
155
- }
156
- buildTypes {
157
- debug {
158
- signingConfig signingConfigs.debug
159
- if (nativeArchitectures) {
160
- ndk {
161
- abiFilters nativeArchitectures.split(',')
162
- }
163
- }
164
- }
165
- release {
166
- // Caution! In production, you need to generate your own keystore file.
167
- // see https://reactnative.dev/docs/signed-apk-android.
168
- signingConfig signingConfigs.debug
169
- minifyEnabled enableProguardInReleaseBuilds
170
- proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
171
- }
172
- }
173
-
174
- // applicationVariants are e.g. debug, release
175
- applicationVariants.all { variant ->
176
- variant.outputs.each { output ->
177
- // For each separate APK per architecture, set a unique version code as described here:
178
- // https://developer.android.com/studio/build/configure-apk-splits.html
179
- // Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
180
- def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
181
- def abi = output.getFilter(OutputFile.ABI)
182
- if (abi != null) { // null for the universal-debug, universal-release variants
183
- output.versionCodeOverride =
184
- defaultConfig.versionCode * 1000 + versionCodes.get(abi)
185
- }
186
-
187
- }
188
- }
189
- }
190
-
191
- dependencies {
192
- implementation fileTree(dir: "libs", include: ["*.jar"])
193
- //noinspection GradleDynamicVersion
194
- implementation "com.facebook.react:react-native:+" // From node_modules
195
-
196
- implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
197
-
198
- debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
199
- exclude group:'com.facebook.fbjni'
200
- }
201
-
202
- debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
203
- exclude group:'com.facebook.flipper'
204
- exclude group:'com.squareup.okhttp3', module:'okhttp'
205
- }
206
-
207
- debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
208
- exclude group:'com.facebook.flipper'
209
- }
210
-
211
- if (enableHermes) {
212
- def hermesPath = "../../node_modules/hermes-engine/android/";
213
- debugImplementation files(hermesPath + "hermes-debug.aar")
214
- releaseImplementation files(hermesPath + "hermes-release.aar")
215
- } else {
216
- implementation jscFlavor
217
- }
218
- }
219
-
220
- // Run this once to be able to run the application with BUCK
221
- // puts all compile dependencies into folder libs for BUCK to use
222
- task copyDownloadableDepsToLibs(type: Copy) {
223
- from configurations.implementation
224
- into 'libs'
225
- }
226
-
227
- apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
@@ -1,19 +0,0 @@
1
- """Helper definitions to glob .aar and .jar targets"""
2
-
3
- def create_aar_targets(aarfiles):
4
- for aarfile in aarfiles:
5
- name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6
- lib_deps.append(":" + name)
7
- android_prebuilt_aar(
8
- name = name,
9
- aar = aarfile,
10
- )
11
-
12
- def create_jar_targets(jarfiles):
13
- for jarfile in jarfiles:
14
- name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15
- lib_deps.append(":" + name)
16
- prebuilt_jar(
17
- name = name,
18
- binary_jar = jarfile,
19
- )
Binary file
@@ -1,10 +0,0 @@
1
- # Add project specific ProGuard rules here.
2
- # By default, the flags in this file are appended to flags specified
3
- # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
4
- # You can edit the include path and order by changing the proguardFiles
5
- # directive in build.gradle.
6
- #
7
- # For more details, see
8
- # http://developer.android.com/guide/developing/tools/proguard.html
9
-
10
- # Add any project specific keep options here: