Skip to content

Commit

Permalink
Merge pull request #479 from bugsnag/release/v7.3.1
Browse files Browse the repository at this point in the history
Release v7.3.1
  • Loading branch information
lemnik authored Oct 5, 2022
2 parents 2ab4297 + f62810f commit 3055331
Show file tree
Hide file tree
Showing 84 changed files with 9,826 additions and 335 deletions.
12 changes: 12 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,15 @@ steps:
- GRADLE_WRAPPER_VERSION=7.3.3
- RN_FIXTURE_DIR=features/fixtures/rn065/android
command: ['bundle', 'exec', 'maze-runner', '-c', '--verbose', '--fail-fast']

- label: ':android: AGP 7.2.1 R/N 0.70 E2E tests'
depends_on: 'agp-ci'
timeout_in_minutes: 60
plugins:
- docker-compose#v3.7.0:
run: android-gradle-plugin-ci
env:
- AGP_VERSION=7.2.1
- GRADLE_WRAPPER_VERSION=7.3.3
- RN_FIXTURE_DIR=features/fixtures/rn70/android
command: ['bundle', 'exec', 'maze-runner', '-c', '--verbose', '--fail-fast']
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 7.3.1 (2022-10-05)

* Fixed a bug where using ndkBuild generated empty some mapping files which could not be uploaded
[#478](https://github.com/bugsnag/bugsnag-android-gradle-plugin/pull/478)
* Support ReactNative projects using Hermes
[#477](https://github.com/bugsnag/bugsnag-android-gradle-plugin/pull/477)

## 7.3.0 (2022-07-27)

* Emit an error if the ReactNative bundle task cannot be found instead of silently failing
Expand Down
2 changes: 1 addition & 1 deletion detekt-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<CurrentIssues>
<ID>ComplexCondition:AndroidManifestParser.kt$AndroidManifestParser$apiKey == null || "" == apiKey || versionCode == null || buildUuid == null || versionName == null || applicationId == null</ID>
<ID>ComplexCondition:BugsnagPlugin.kt$BugsnagPlugin$!jvmMinificationEnabled &amp;&amp; !ndkEnabled &amp;&amp; !unityEnabled &amp;&amp; !reactNativeEnabled</ID>
<ID>LargeClass:BugsnagPlugin.kt$BugsnagPlugin : Plugin</ID>
<ID>LongParameterList:BugsnagGenerateNdkSoMappingTask.kt$BugsnagGenerateNdkSoMappingTask.Companion$( project: Project, variant: BaseVariant, output: ApkVariantOutput, objdumpPaths: Provider&lt;Map&lt;String, String>>, searchPaths: List&lt;File>, soMappingOutputPath: String )</ID>
<ID>MagicNumber:BugsnagPluginExtension.kt$BugsnagPluginExtension$60000</ID>
<ID>MagicNumber:BugsnagReleasesTask.kt$BugsnagReleasesTask$200</ID>
<ID>MagicNumber:MappingFileProvider.kt$9</ID>
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.android-ci
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ RUN gem install bundler
RUN gem update --system 3.0.6

# Install node, npm and yarn
RUN curl -fsSL https://deb.nodesource.com/setup_12.x | bash -
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs
RUN npm install --global yarn

Expand Down
14 changes: 10 additions & 4 deletions features/fixtures/ndkapp/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'com.android.application'
apply plugin: 'com.bugsnag.android.gradle'

ext.abiCodes = ['arm64-v8a':2, 'armeabi-v7a':3, 'x86':4, 'x86_64':5]
ext.abiCodes = ['arm64-v8a': 2, 'armeabi-v7a': 3, 'x86': 4, 'x86_64': 5]

android {
compileSdkVersion 29
Expand Down Expand Up @@ -29,8 +29,14 @@ android {
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
if (System.getenv("USE_NDK_BUILD") == "true") {
ndkBuild {
path "src/main/cpp/Android.mk"
}
} else {
cmake {
path "CMakeLists.txt"
}
}
}
lintOptions {
Expand Down Expand Up @@ -78,7 +84,7 @@ bugsnag {

if (objdumpLocation != null) {
objdumpPaths = [
"x86": objdumpLocation,
"x86" : objdumpLocation,
"arm64-v8a": objdumpLocation
]
}
Expand Down
17 changes: 17 additions & 0 deletions features/fixtures/ndkapp/app/src/main/cpp/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
LOCAL_PATH := $(call my-dir)
BUGSNAG_LIBS := $(LOCAL_PATH)/../../../build/intermediates/bugsnag-libs

include $(CLEAR_VARS)
LOCAL_MODULE := bugsnag-ndk
LOCAL_SRC_FILES := $(BUGSNAG_LIBS)/jni/$(TARGET_ARCH_ABI)/libbugsnag-ndk.so
LOCAL_EXPORT_C_INCLUDES := $(BUGSNAG_LIBS)/assets/include
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := native-lib
LOCAL_SRC_FILES := native-lib.cpp

LOCAL_LDLIBS := -llog -landroid
LOCAL_SHARED_LIBRARIES := bugsnag-ndk

include $(BUILD_SHARED_LIBRARY)
3 changes: 3 additions & 0 deletions features/fixtures/ndkapp/app/src/main/cpp/Application.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
APP_PLATFORM := android-14
APP_ABI := arm64-v8a armeabi-v7a x86 x86_64
APP_STL := stlport_static
2 changes: 1 addition & 1 deletion features/fixtures/rn065/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ import com.android.build.OutputFile
* ]
*/
project.ext.react = [
enableHermes: System.env.RN_ENABLE_HERMES == true // clean and rebuild if changing
enableHermes: !!System.env.RN_ENABLE_HERMES // clean and rebuild if changing
]

apply from: "../../node_modules/react-native/react.gradle"
Expand Down
6 changes: 6 additions & 0 deletions features/fixtures/rn70/.buckconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

[android]
target = Google Inc.:Google APIs:23

[maven_repositories]
central = https://repo1.maven.org/maven2
4 changes: 4 additions & 0 deletions features/fixtures/rn70/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: '@react-native-community',
};
66 changes: 66 additions & 0 deletions features/fixtures/rn70/.flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*

; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js

.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$

[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]

[libs]
node_modules/react-native/interface.js
node_modules/react-native/flow/

[options]
emoji=true

exact_by_default=true

format.bracket_spacing=false

module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js

munge_underscores=true

module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
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'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
sketchy-number=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
unnecessary-invariant=warn

[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.182.0
64 changes: 64 additions & 0 deletions features/fixtures/rn70/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/
1 change: 1 addition & 0 deletions features/fixtures/rn70/.node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
7 changes: 7 additions & 0 deletions features/fixtures/rn70/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: false,
singleQuote: true,
trailingComma: 'all',
};
1 change: 1 addition & 0 deletions features/fixtures/rn70/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.5
1 change: 1 addition & 0 deletions features/fixtures/rn70/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
117 changes: 117 additions & 0 deletions features/fixtures/rn70/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/

import React from 'react';
import type {Node} from 'react';
import {
SafeAreaView,
ScrollView,
StatusBar,
StyleSheet,
Text,
useColorScheme,
View,
} from 'react-native';

import {
Colors,
DebugInstructions,
Header,
LearnMoreLinks,
ReloadInstructions,
} from 'react-native/Libraries/NewAppScreen';

/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
* LTI update could not be added via codemod */
const Section = ({children, title}): Node => {
const isDarkMode = useColorScheme() === 'dark';
return (
<View style={styles.sectionContainer}>
<Text
style={[
styles.sectionTitle,
{
color: isDarkMode ? Colors.white : Colors.black,
},
]}>
{title}
</Text>
<Text
style={[
styles.sectionDescription,
{
color: isDarkMode ? Colors.light : Colors.dark,
},
]}>
{children}
</Text>
</View>
);
};

const App: () => Node = () => {
const isDarkMode = useColorScheme() === 'dark';

const backgroundStyle = {
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
};

return (
<SafeAreaView style={backgroundStyle}>
<StatusBar
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
backgroundColor={backgroundStyle.backgroundColor}
/>
<ScrollView
contentInsetAdjustmentBehavior="automatic"
style={backgroundStyle}>
<Header />
<View
style={{
backgroundColor: isDarkMode ? Colors.black : Colors.white,
}}>
<Section title="Step One">
Edit <Text style={styles.highlight}>App.js</Text> to change this
screen and then come back to see your edits.
</Section>
<Section title="See Your Changes">
<ReloadInstructions />
</Section>
<Section title="Debug">
<DebugInstructions />
</Section>
<Section title="Learn More">
Read the docs to discover what to do next:
</Section>
<LearnMoreLinks />
</View>
</ScrollView>
</SafeAreaView>
);
};

const styles = StyleSheet.create({
sectionContainer: {
marginTop: 32,
paddingHorizontal: 24,
},
sectionTitle: {
fontSize: 24,
fontWeight: '600',
},
sectionDescription: {
marginTop: 8,
fontSize: 18,
fontWeight: '400',
},
highlight: {
fontWeight: '700',
},
});

export default App;
6 changes: 6 additions & 0 deletions features/fixtures/rn70/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.5'

gem 'cocoapods', '~> 1.11', '>= 1.11.2'
Empty file.
Loading

0 comments on commit 3055331

Please sign in to comment.