Skip to content

Commit 4981c93

Browse files
authored
💎 Bump to version 8.5.0
1 parent bd7be11 commit 4981c93

File tree

93 files changed

+3147
-13028
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+3147
-13028
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## v8.5.0 (2019-07-11)
2+
3+
**⚠️ If you are using React Native 0.60, please follow our migration guide [here](https://github.com/Instabug/Instabug-React-Native/blob/master/README.md#updating-to-version-85)**
4+
5+
* Support for React Native 0.60
6+
* Updates native iOS and Android SDKs to version 8.5
7+
18
## v8.4.4 (2019-07-08)
29

310
* Fixes an issue that causes the sdk to crash when a network request has no headers.

InstabugSample/.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

InstabugSample/.flowconfig

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,37 @@
1111
; Ignore duplicate module providers
1212
; For RN Apps installed via npm, "Libraries" folder is inside
1313
; "node_modules/react-native" but in the source repo it is in the root
14-
.*/Libraries/react-native/React.js
14+
node_modules/react-native/Libraries/react-native/React.js
1515

1616
; Ignore polyfills
17-
.*/Libraries/polyfills/.*
17+
node_modules/react-native/Libraries/polyfills/.*
1818

19-
; Ignore metro
20-
.*/node_modules/metro/.*
19+
; These should not be required directly
20+
; require from fbjs/lib instead: require('fbjs/lib/warning')
21+
node_modules/warning/.*
22+
23+
; Flow doesn't support platforms
24+
.*/Libraries/Utilities/HMRLoadingView.js
25+
26+
[untyped]
27+
.*/node_modules/@react-native-community/cli/.*/.*
2128

2229
[include]
2330

2431
[libs]
2532
node_modules/react-native/Libraries/react-native/react-native-interface.js
2633
node_modules/react-native/flow/
27-
node_modules/react-native/flow-github/
2834

2935
[options]
3036
emoji=true
3137

3238
esproposal.optional_chaining=enable
3339
esproposal.nullish_coalescing=enable
3440

41+
module.file_ext=.js
42+
module.file_ext=.json
43+
module.file_ext=.ios.js
44+
3545
module.system=haste
3646
module.system.haste.use_name_reducers=true
3747
# get basename
@@ -44,27 +54,46 @@ module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
4454
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
4555
module.system.haste.paths.blacklist=.*/__tests__/.*
4656
module.system.haste.paths.blacklist=.*/__mocks__/.*
47-
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
4857
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
58+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
59+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
60+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
61+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
4962

5063
munge_underscores=true
5164

5265
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\)$' -> 'RelativeImageStub'
5366

54-
module.file_ext=.js
55-
module.file_ext=.jsx
56-
module.file_ext=.json
57-
module.file_ext=.native.js
58-
5967
suppress_type=$FlowIssue
6068
suppress_type=$FlowFixMe
6169
suppress_type=$FlowFixMeProps
6270
suppress_type=$FlowFixMeState
6371

64-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
65-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
66-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
72+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
73+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
6774
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
6875

76+
[lints]
77+
sketchy-null-number=warn
78+
sketchy-null-mixed=warn
79+
sketchy-number=warn
80+
untyped-type-import=warn
81+
nonstrict-import=warn
82+
deprecated-type=warn
83+
unsafe-getters-setters=warn
84+
inexact-spread=warn
85+
unnecessary-invariant=warn
86+
signature-verification-failure=warn
87+
deprecated-utility=error
88+
89+
[strict]
90+
deprecated-type
91+
nonstrict-import
92+
sketchy-null
93+
unclear-type
94+
unsafe-getters-setters
95+
untyped-import
96+
untyped-type-import
97+
6998
[version]
70-
^0.86.0
99+
^0.98.0

InstabugSample/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ buck-out/
5454

5555
# Bundle artifact
5656
*.jsbundle
57+
58+
# CocoaPods
59+
/ios/Pods/

InstabugSample/App.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
ScrollView
1717
} from 'react-native';
1818

19-
import Instabug, {BugReporting, FeatureRequests, Surveys, Chats, CrashReporting, Replies} from'instabug-reactnative';
19+
import Instabug, { BugReporting, FeatureRequests, Surveys, Chats, CrashReporting, Replies } from'instabug-reactnative';
2020

2121

2222
const instructions = Platform.select({
@@ -35,9 +35,7 @@ export default class App extends Component<{}> {
3535
colorTheme: 'Light'
3636
};
3737

38-
Instabug.startWithToken("APP_TOKEN", [Instabug.invocationEvent.shake]);
39-
BugReporting.setReportTypes([BugReporting.reportType.bug, BugReporting.reportType.feedback]);
40-
Instabug.setLocale(Instabug.locale.english);
38+
Instabug.startWithToken("YOUR_TOKEN", [Instabug.invocationEvent.shake]);
4139
}
4240

4341
render() {
@@ -131,7 +129,7 @@ export default class App extends Component<{}> {
131129
}
132130

133131
setPrimaryColor(color) {
134-
Instabug.setPrimaryColor(processColor(color));
132+
Instabug.setPrimaryColor(color);
135133
}
136134

137135
showIntroMessage() {

InstabugSample/__tests__/instabugUtils.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ describe('Test global error handler', () => {
7777
});
7878

7979

80-
});
80+
});

InstabugSample/android/.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
33
<name>InstabugSample</name>
4-
<comment>Project android created by Buildship.</comment>
4+
<comment>Project android_ created by Buildship.</comment>
55
<projects>
66
</projects>
77
<buildSpec>

InstabugSample/android/app/build.gradle

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ import com.android.build.OutputFile
1818
* // the entry file for bundle generation
1919
* entryFile: "index.android.js",
2020
*
21+
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22+
* bundleCommand: "ram-bundle",
23+
*
2124
* // whether to bundle JS and assets in debug mode
2225
* bundleInDebug: false,
2326
*
@@ -93,9 +96,22 @@ def enableSeparateBuildPerCPUArchitecture = false
9396
*/
9497
def enableProguardInReleaseBuilds = false
9598

99+
/**
100+
* Use international variant JavaScriptCore
101+
* International variant includes ICU i18n library and necessary data allowing to use
102+
* e.g. Date.toLocaleString and String.localeCompare that give correct results
103+
* when using with locales other than en-US.
104+
* Note that this variant is about 6MiB larger per architecture than default.
105+
*/
106+
def useIntlJsc = false
107+
96108
android {
97109
compileSdkVersion rootProject.ext.compileSdkVersion
98-
buildToolsVersion rootProject.ext.buildToolsVersion
110+
111+
compileOptions {
112+
sourceCompatibility JavaVersion.VERSION_1_8
113+
targetCompatibility JavaVersion.VERSION_1_8
114+
}
99115

100116
defaultConfig {
101117
applicationId "com.instabugsample"
@@ -109,11 +125,25 @@ android {
109125
reset()
110126
enable enableSeparateBuildPerCPUArchitecture
111127
universalApk false // If true, also generate a universal APK
112-
include "armeabi-v7a", "x86", "arm64-v8a"
128+
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
129+
}
130+
}
131+
signingConfigs {
132+
debug {
133+
storeFile file('debug.keystore')
134+
storePassword 'android'
135+
keyAlias 'androiddebugkey'
136+
keyPassword 'android'
113137
}
114138
}
115139
buildTypes {
140+
debug {
141+
signingConfig signingConfigs.debug
142+
}
116143
release {
144+
// Caution! In production, you need to generate your own keystore file.
145+
// see https://facebook.github.io/react-native/docs/signed-apk-android.
146+
signingConfig signingConfigs.debug
117147
minifyEnabled enableProguardInReleaseBuilds
118148
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
119149
}
@@ -122,8 +152,8 @@ android {
122152
applicationVariants.all { variant ->
123153
variant.outputs.each { output ->
124154
// For each separate APK per architecture, set a unique version code as described here:
125-
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
126-
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
155+
// https://developer.android.com/studio/build/configure-apk-splits.html
156+
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
127157
def abi = output.getFilter(OutputFile.ABI)
128158
if (abi != null) { // null for the universal-debug, universal-release variants
129159
output.versionCodeOverride =
@@ -134,10 +164,15 @@ android {
134164
}
135165

136166
dependencies {
137-
implementation project(':instabug-reactnative')
138167
implementation fileTree(dir: "libs", include: ["*.jar"])
139-
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
140168
implementation "com.facebook.react:react-native:+" // From node_modules
169+
170+
// JSC from node_modules
171+
if (useIntlJsc) {
172+
implementation 'org.webkit:android-jsc-intl:+'
173+
} else {
174+
implementation 'org.webkit:android-jsc:+'
175+
}
141176
}
142177

143178
// Run this once to be able to run the application with BUCK
@@ -146,3 +181,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
146181
from configurations.compile
147182
into 'libs'
148183
}
184+
185+
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

InstabugSample/android/app/proguard-rules.pro

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,3 @@
88
# http://developer.android.com/guide/developing/tools/proguard.html
99

1010
# Add any project specific keep options here:
11-
12-
# If your project uses WebView with JS, uncomment the following
13-
# and specify the fully qualified class name to the JavaScript interface
14-
# class:
15-
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16-
# public *;
17-
#}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6+
7+
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
8+
</manifest>

InstabugSample/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.instabugsample">
2+
package="com.instabugsample">
33

44
<uses-permission android:name="android.permission.INTERNET" />
5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
65

76
<application
87
android:name=".MainApplication"

InstabugSample/android/app/src/main/java/com/instabugsample/MainApplication.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
import android.app.Application;
44

5+
import com.facebook.react.PackageList;
56
import com.facebook.react.ReactApplication;
6-
import com.instabug.reactlibrary.RNInstabugReactnativePackage;
77
import com.facebook.react.ReactNativeHost;
88
import com.facebook.react.ReactPackage;
9-
import com.facebook.react.shell.MainReactPackage;
109
import com.facebook.soloader.SoLoader;
10+
import com.instabug.reactlibrary.RNInstabugReactnativePackage;
11+
1112

12-
import java.util.Arrays;
1313
import java.util.List;
1414

1515
public class MainApplication extends Application implements ReactApplication {
@@ -22,15 +22,14 @@ public boolean getUseDeveloperSupport() {
2222

2323
@Override
2424
protected List<ReactPackage> getPackages() {
25-
return Arrays.<ReactPackage>asList(
26-
new MainReactPackage(),
27-
new RNInstabugReactnativePackage.Builder("APP_TOKEN",MainApplication.this)
28-
.setInvocationEvent("shake")
29-
.setPrimaryColor("#1D82DC")
30-
.setFloatingEdge("right")
31-
.setFloatingButtonOffsetFromTop(250)
32-
.build()
33-
);
25+
@SuppressWarnings("UnnecessaryLocalVariable")
26+
List<ReactPackage> packages = new PackageList(this).getPackages();
27+
// Packages that cannot be autolinked yet can be added manually here, for example:
28+
// packages.add(new MyReactNativePackage());
29+
new RNInstabugReactnativePackage.Builder("YOUR_TOKEN",this.getApplication())
30+
.setInvocationEvent("shake")
31+
.build();
32+
return packages;
3433
}
3534

3635
@Override

InstabugSample/android/app/src/main/res/values/styles.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<!-- Base application theme. -->
44
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
55
<!-- Customize your theme here. -->
6+
<item name="android:textColor">#000000</item>
67
</style>
78

89
</resources>

InstabugSample/android/build.gradle

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ buildscript {
55
buildToolsVersion = "28.0.3"
66
minSdkVersion = 16
77
compileSdkVersion = 28
8-
targetSdkVersion = 27
8+
targetSdkVersion = 28
99
supportLibVersion = "28.0.0"
1010
}
1111
repositories {
1212
google()
1313
jcenter()
1414
}
1515
dependencies {
16-
classpath 'com.android.tools.build:gradle:3.2.1'
16+
classpath("com.android.tools.build:gradle:3.4.1")
1717

1818
// NOTE: Do not place your application dependencies here; they belong
1919
// in the individual module build.gradle files
@@ -23,20 +23,19 @@ buildscript {
2323
allprojects {
2424
repositories {
2525
mavenLocal()
26-
google()
27-
jcenter()
2826
maven {
2927
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
30-
url "$rootDir/../node_modules/react-native/android"
28+
url("$rootDir/../node_modules/react-native/android")
3129
}
3230
maven {
33-
url "https://sdks.instabug.com/nexus/repository/instabug-cp"
34-
}
35-
}
36-
}
37-
31+
// Android JSC is installed from npm
32+
url("$rootDir/../node_modules/jsc-android/dist")
33+
}
3834

39-
task wrapper(type: Wrapper) {
40-
gradleVersion = '4.7'
41-
distributionUrl = distributionUrl.replace("bin", "all")
35+
google()
36+
jcenter()
37+
maven {
38+
url "https://sdks.instabug.com/nexus/repository/instabug-cp"
39+
}
40+
}
4241
}

InstabugSample/android/gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
19+
20+
android.useAndroidX=true
21+
android.enableJetifier=true
Binary file not shown.

0 commit comments

Comments
 (0)