Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Fix version conflicts, verify publishability of packages in CI, Remov…
Browse files Browse the repository at this point in the history
…e Travis (#729)

This fixes a number of version resolution errors that would prevent these packages from building, and turn off Travis, since Cirrus now works.

I also fixed a number of errors that would have prevented these packages from being published without warnings, and establishes a CI script that will verify publishability for any changed packages in a PR.

For some examples, we were depending upon versions of other 1st-party plugins by using path: ../../<package>, which really isn't the right way to do things, so for those examples, they now depend on a published version.

I bumped the version number of any packages that were modified, and updated their CHANGELOGs since the dependencies have changed.

Also fixed a number of analyzer errors that somehow snuck in.
  • Loading branch information
gspencergoog committed Aug 20, 2018
1 parent 3608e6a commit 69af1b7
Show file tree
Hide file tree
Showing 58 changed files with 289 additions and 429 deletions.
6 changes: 6 additions & 0 deletions .cirrus.yml
@@ -1,11 +1,16 @@
task:
container:
image: cirrusci/flutter:latest
cpu: 4
memory: 8G
upgrade_script:
- flutter channel master
- flutter upgrade
- git fetch origin master
activate_script: pub global activate flutter_plugin_tools
matrix:
- name: publishable
script: ./script/check_publish.sh
- name: test+format
install_script:
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
Expand Down Expand Up @@ -41,6 +46,7 @@ task:
- brew install ios-deploy
- pod repo update
- git clone https://github.com/flutter/flutter.git
- git fetch origin master
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter doctor
- pub global activate flutter_plugin_tools
Expand Down
120 changes: 0 additions & 120 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions packages/android_alarm_manager/CHANGELOG.md
@@ -1,3 +1,8 @@
## 0.2.1
* Update dependencies for example to point to published versions of firebase_auth
and google_sign_in.
* Add missing dependency on firebase_auth.1

## 0.2.0

* **Breaking change**. A new isolate is always spawned for the background service
Expand Down
7 changes: 3 additions & 4 deletions packages/android_alarm_manager/example/pubspec.yaml
Expand Up @@ -6,10 +6,9 @@ dependencies:
sdk: flutter
android_alarm_manager:
path: ../
firebase_auth:
path: ../../firebase_auth
google_sign_in:
path: ../../google_sign_in
firebase_auth: ^0.5.18
google_sign_in: ^3.0.4

dev_dependencies:
flutter_test:
sdk: flutter
Expand Down
3 changes: 2 additions & 1 deletion packages/android_alarm_manager/pubspec.yaml
@@ -1,11 +1,12 @@
name: android_alarm_manager
description: Flutter plugin for accessing the Android AlarmManager service, and
running Dart code in the background when alarms fire.
version: 0.2.0
version: 0.2.1
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/android_alarm_manager

dependencies:
firebase_auth: ^0.5.18
flutter:
sdk: flutter

Expand Down
5 changes: 5 additions & 0 deletions packages/battery/CHANGELOG.md
@@ -1,3 +1,8 @@
## 0.2.3

* Updated mockito dependency to 3.0.0 to get Dart 2 support.
* Update test package dependency to 1.3.0, and fixed tests to match.

## 0.2.2

* Updated Gradle tooling to match Android Studio 3.1.2.
Expand Down
8 changes: 5 additions & 3 deletions packages/battery/pubspec.yaml
Expand Up @@ -3,7 +3,7 @@ description: Flutter plugin for accessing information about the battery state
(full, charging, discharging) on Android and iOS.
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/battery
version: 0.2.2
version: 0.2.3

flutter:
plugin:
Expand All @@ -14,10 +14,12 @@ flutter:
dependencies:
flutter:
sdk: flutter
meta: "^1.0.5"
meta: ^1.0.5

dev_dependencies:
mockito: "^2.0.2"
async: ^2.0.8
test: ^1.3.0
mockito: ^3.0.0
flutter_test:
sdk: flutter

Expand Down
5 changes: 3 additions & 2 deletions packages/battery/test/battery_test.dart
Expand Up @@ -23,7 +23,7 @@ void main() {

test('batteryLevel', () async {
when(methodChannel.invokeMethod('getBatteryLevel'))
.thenReturn(new Future<int>.value(42));
.thenAnswer((Invocation invoke) => new Future<int>.value(42));
expect(await battery.batteryLevel, 42);
});

Expand All @@ -32,7 +32,8 @@ void main() {

setUp(() {
controller = new StreamController<String>();
when(eventChannel.receiveBroadcastStream()).thenReturn(controller.stream);
when(eventChannel.receiveBroadcastStream())
.thenAnswer((Invocation invoke) => controller.stream);
});

tearDown(() {
Expand Down
5 changes: 5 additions & 0 deletions packages/camera/CHANGELOG.md
@@ -1,3 +1,8 @@
## 0.2.3

* Added path_provider and video_player as dev dependencies because the example uses them.
* Updated example path_provider version to get Dart 2 support.

## 0.2.2

* iOS image capture is done in high quality (full camera size)
Expand Down
9 changes: 5 additions & 4 deletions packages/camera/example/pubspec.yaml
@@ -1,13 +1,14 @@
name: camera_example
description: Demonstrates how to use the camera plugin.
author: Flutter Team <flutter-dev@googlegroups.com>

dependencies:
path_provider: 0.3.0
flutter:
sdk: flutter
camera:
path: ../
video_player: "0.5.2"
path_provider: ^0.4.1
flutter:
sdk: flutter
video_player: ^0.5.2

dev_dependencies:
flutter_test:
Expand Down
6 changes: 5 additions & 1 deletion packages/camera/pubspec.yaml
@@ -1,7 +1,7 @@
name: camera
description: A Flutter plugin for getting information about and controlling the
camera on Android and iOS. Supports previewing the camera feed and capturing images.
version: 0.2.2
version: 0.2.3
authors:
- Flutter Team <flutter-dev@googlegroups.com>
- Luigi Agosti <luigi@tengio.com>
Expand All @@ -15,6 +15,10 @@ dependencies:
flutter:
sdk: flutter

dev_dependencies:
path_provider: ^0.4.1
video_player: ^0.5.2

flutter:
plugin:
androidPackage: io.flutter.plugins.camera
Expand Down
4 changes: 4 additions & 0 deletions packages/cloud_functions/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.0.3

* Added missing dependency on meta package.

## 0.0.2

* Bump Android and Firebase dependency versions.
Expand Down
52 changes: 2 additions & 50 deletions packages/cloud_functions/example/pubspec.yaml
@@ -1,67 +1,19 @@
name: cloud_functions_example
description: Demonstrates how to use the cloud_functions plugin.

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.0+1
author: Flutter Team <flutter-dev@googlegroups.com>

dependencies:
flutter:
sdk: flutter

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2

dev_dependencies:
flutter_test:
sdk: flutter

cloud_functions:
path: ../

# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
path: ..

# The following section is specific to Flutter.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true

# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.io/assets-and-images/#resolution-aware.

# For details regarding adding assets from package dependencies, see
# https://flutter.io/assets-and-images/#from-packages

# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.io/custom-fonts/#from-packages
2 changes: 1 addition & 1 deletion packages/cloud_functions/example/test/widget_test.dart
Expand Up @@ -7,7 +7,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:cloud_functions_example/main.dart';
import '../lib/main.dart';

void main() {
testWidgets('Verify Response', (WidgetTester tester) async {
Expand Down
5 changes: 3 additions & 2 deletions packages/cloud_functions/pubspec.yaml
@@ -1,6 +1,6 @@
name: cloud_functions
description: Flutter plugin for Cloud Functions.
version: 0.0.2
version: 0.0.3
author: Flutter Team <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/plugins/tree/master/packages/cloud_functions

Expand All @@ -10,9 +10,10 @@ flutter:
pluginClass: CloudFunctionsPlugin

dependencies:
meta: ^1.1.6
flutter:
sdk: flutter
firebase_core: "^0.2.2"
firebase_core: ^0.2.2

dev_dependencies:
flutter_test:
Expand Down
4 changes: 4 additions & 0 deletions packages/firebase_admob/CHANGELOG.md
@@ -1,3 +1,7 @@
## 0.5.7

* Bumped mockito dependency to pick up Dart 2 support.

## 0.5.6

* Bump Android and Firebase dependency versions.
Expand Down

0 comments on commit 69af1b7

Please sign in to comment.