Skip to content

Commit

Permalink
Rebuilt Flutter example and fixture with Flutter 3.10 (#252)
Browse files Browse the repository at this point in the history
* Rebuilt flutter example

* Rebuilt e2e tests fixture

* Small fixes for example project

* Replaced examples with a single example for pub.dev release

* Small fixes for the fixture

* Updated mazerunner gem to v9

* Updated mazerunner to v9 on CI

* Switched Android E2E tests to be run on Browserstack on CI

* Added browserstack username and access key to docker-compose.yaml

* adjust pipeline for browserstack

* adjust pipeline for browserstack

---------

Co-authored-by: Robert <robert.smartbear@gmail.com>
Co-authored-by: Josh Edney <josh.edney@smartbear.com>
  • Loading branch information
3 people authored Jul 25, 2024
1 parent 38ddbd8 commit a2dba70
Show file tree
Hide file tree
Showing 55 changed files with 225 additions and 124 deletions.
17 changes: 6 additions & 11 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ steps:
- label: ':bitbar: iOS 14 end-to-end tests 3.10.0'
depends_on: "ios-fixture-3-10-0"
timeout_in_minutes: 20
env:
FLUTTER_BIN: "/opt/flutter/3.10.0/bin/flutter"
agents:
queue: opensource
plugins:
Expand Down Expand Up @@ -93,11 +91,9 @@ steps:
from: "features/fixtures/app/build/app/outputs/flutter-apk/app-release.apk"
to: "features/fixtures/app/build/app/outputs/flutter-apk/app-release-3.10.0.apk"

- label: ':bitbar: Android 12 end-to-end tests 3.10.0'
- label: ':browserstack: Android 12 end-to-end tests 3.10.0'
depends_on: "android-fixture-3-10-0"
timeout_in_minutes: 20
env:
FLUTTER_BIN: "/opt/flutter/3.10.0/bin/flutter"
agents:
queue: opensource
plugins:
Expand All @@ -110,11 +106,10 @@ steps:
service-ports: true
command:
- "--app=/app/features/fixtures/app/build/app/outputs/flutter-apk/app-release-3.10.0.apk"
- "--farm=bb"
- "--device=ANDROID_10|ANDROID_11|ANDROID_12|ANDROID_13"
- "--no-tunnel"
- "--aws-public-ip"
- "--farm=bs"
- "--device=ANDROID_12"
- "--appium-version=1.22.0"
- "--fail-fast"
concurrency: 25
concurrency_group: 'bitbar'
concurrency: 5
concurrency_group: 'browserstack-app'
concurrency_method: eager
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source 'https://rubygems.org'

# A reference to Maze Runner is only needed for running tests locally and if committed it must be
# portable for CI, e.g. a specific release. However, leaving it commented out would mean quicker CI.
gem 'bugsnag-maze-runner', '~> 8.0'
gem 'bugsnag-maze-runner', '~> 9.0'
gem 'cocoapods'

# Use a specific branch
Expand Down
33 changes: 15 additions & 18 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ GEM
atomos (0.1.3)
base64 (0.2.0)
bigdecimal (3.1.7)
bugsnag (6.26.0)
bugsnag (6.27.1)
concurrent-ruby (~> 1.0)
bugsnag-maze-runner (8.2.0)
bugsnag-maze-runner (9.11.1)
appium_lib (~> 12.0.0)
appium_lib_core (~> 5.4.0)
bugsnag (~> 6.24)
Expand All @@ -49,7 +49,7 @@ GEM
selenium-webdriver (~> 4.0)
test-unit (~> 3.5.2)
webrick (~> 1.7.0)
builder (3.2.4)
builder (3.3.0)
childprocess (4.1.0)
claide (1.1.0)
cocoapods (1.15.2)
Expand Down Expand Up @@ -124,7 +124,7 @@ GEM
cucumber-core (~> 10.1, >= 10.1.0)
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
curb (0.9.11)
diff-lcs (1.5.0)
diff-lcs (1.5.1)
dogstatsd-ruby (5.5.0)
drb (2.2.1)
ecma-re-validator (0.4.0)
Expand All @@ -151,9 +151,9 @@ GEM
regexp_parser (~> 2.0)
simpleidn (~> 0.2)
uri_template (~> 0.7)
mime-types (3.4.1)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mime-types-data (3.2024.0702)
minitest (5.22.3)
molinillo (0.8.0)
multi_test (0.1.2)
Expand All @@ -162,18 +162,18 @@ GEM
nap (1.1.0)
netrc (0.11.0)
nkf (0.2.0)
nokogiri (1.15.6-arm64-darwin)
nokogiri (1.16.6-arm64-darwin)
racc (~> 1.4)
nokogiri (1.15.6-x86_64-darwin)
nokogiri (1.16.6-x86_64-darwin)
racc (~> 1.4)
optimist (3.0.1)
os (1.0.1)
power_assert (2.0.3)
public_suffix (4.0.7)
racc (1.7.3)
racc (1.8.0)
rack (2.2.9)
rake (12.3.3)
regexp_parser (2.8.1)
regexp_parser (2.9.2)
rexml (3.2.6)
ruby-macho (2.5.1)
rubyzip (2.3.2)
Expand All @@ -182,9 +182,8 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
simpleidn (0.2.1)
unf (~> 0.1.4)
sys-uname (1.2.3)
simpleidn (0.2.3)
sys-uname (1.3.0)
ffi (~> 1.1)
test-unit (3.5.9)
power_assert
Expand All @@ -193,12 +192,9 @@ GEM
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
uri_template (0.7.0)
webrick (1.7.0)
websocket (1.2.9)
websocket (1.2.11)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand All @@ -214,9 +210,10 @@ PLATFORMS
arm64-darwin-22
x86_64-darwin-20
x86_64-darwin-21
x86_64-darwin-23

DEPENDENCIES
bugsnag-maze-runner (~> 8.0)
bugsnag-maze-runner (~> 9.0)
cocoapods

BUNDLED WITH
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ staging/bugsnag_flutter:
mkdir -p staging/bugsnag_flutter
cd packages/bugsnag_flutter && cp -a . ../../staging/bugsnag_flutter
rm -f staging/bugsnag_flutter/pubspec.lock
cp -r examples staging/bugsnag_flutter/examples
cp -r examples/flutter staging/bugsnag_flutter/example
cp README.md staging/bugsnag_flutter/.
cp LICENSE staging/bugsnag_flutter/.
cp CHANGELOG.md staging/bugsnag_flutter/.
Expand Down Expand Up @@ -111,4 +111,4 @@ else ifeq ($(SUBMODULE), bugsnag-cocoa)
$(MAKE) update-bugsnag-cocoa
else
@$(error SUBMODULE must be one of bugsnag-android or bugsnag-cocoa)
endif
endif
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.6'
services:

maze-runner:
image: 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:latest-v8-cli
image: 855461928731.dkr.ecr.us-west-1.amazonaws.com/maze-runner-releases:latest-v9-cli
environment:
DEBUG:
BITBAR_USERNAME:
Expand All @@ -21,6 +21,8 @@ services:
BUILDKITE_RETRY_COUNT:
BUILDKITE_STEP_KEY:
MAZE_BUGSNAG_API_KEY:
BROWSER_STACK_USERNAME:
BROWSER_STACK_ACCESS_KEY:
ports:
- "9000-9499:9339"
volumes:
Expand Down
27 changes: 25 additions & 2 deletions examples/flutter/.metadata
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
# This file should be version controlled.

version:
revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b
revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
channel: stable

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
- platform: android
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
- platform: ios
create_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8
base_revision: 84a1e904f44f9b0e9c4510138010edcc653163f8

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
17 changes: 16 additions & 1 deletion examples/flutter/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,27 @@ if (flutterVersionName == null) {
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.hasProperty('compileSdkVersion') ? flutter.compileSdkVersion : 30
namespace "com.bugsnag.examples.flutter"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
applicationId "com.bugsnag.examples.flutter"
minSdkVersion flutter.hasProperty('minSdkVersion') ? flutter.minSdkVersion : 16
Expand All @@ -51,3 +62,7 @@ android {
flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
6 changes: 3 additions & 3 deletions examples/flutter/android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bugsnag.examples.flutter">
<!-- Flutter needs it to communicate with the running application
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
Expand Down
22 changes: 11 additions & 11 deletions examples/flutter/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bugsnag.examples.flutter">

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:icon="@mipmap/ic_launcher"
android:label="Bugsnag Flutter Example">
android:label="Bugsnag Flutter Example"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
Expand Down
6 changes: 3 additions & 3 deletions examples/flutter/android/app/src/profile/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bugsnag.examples.flutter">
<!-- Flutter needs it to communicate with the running application
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
Expand Down
7 changes: 4 additions & 3 deletions examples/flutter/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
mavenLocal()
google()
mavenCentral()
}
Expand All @@ -25,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
Loading

0 comments on commit a2dba70

Please sign in to comment.