Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,32 @@ language: dart

dart:
- dev
- stable

env:
- PKG=example TASK=dartanalyzer
- PKG=example TASK=dartanalyzer_0
- PKG=example TASK=dartfmt
- PKG=example TASK=test
- PKG=json_annotation TASK=dartanalyzer
- PKG=json_annotation TASK=dartanalyzer_1
- PKG=json_annotation TASK=dartfmt
- PKG=json_serializable TASK=dartanalyzer
- PKG=json_serializable TASK=dartanalyzer_0
- PKG=json_serializable TASK=dartfmt
- PKG=json_serializable TASK=test

matrix:
exclude:
- dart: stable
env: PKG=example TASK=dartanalyzer
env: PKG=example TASK=dartanalyzer_0
- dart: stable
env: PKG=example TASK=dartfmt
- dart: stable
env: PKG=json_serializable TASK=dartanalyzer
env: PKG=example TASK=test
- dart: stable
env: PKG=json_serializable TASK=dartanalyzer_0
- dart: stable
env: PKG=json_serializable TASK=dartfmt
- dart: stable
env: PKG=json_serializable TASK=test

script: ./tool/travis.sh

Expand Down
11 changes: 2 additions & 9 deletions example/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
language: dart
dart:
- dev
- stable

dart_task:
# Run the tests -- include the default-skipped presubmit tests
- test: --run-skipped

matrix:
include:
- dart: dev
dart_task:
dartfmt: sdk
- dart: dev
dart_task: dartanalyzer
- dartfmt
- dartanalyzer: --fatal-infos --fatal-warnings .

# Only building master means that we don't run two builds for each pull request.
branches:
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: example
author: Dart Team <misc@dartlang.org>

environment:
sdk: '>=1.20.1 <2.0.0'
sdk: '>=2.0.0-dev <2.0.0'

dependencies:
json_annotation: ^0.2.2
Expand Down
1 change: 1 addition & 0 deletions json_annotation/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: dart

dart:
- dev
- stable
Expand Down
11 changes: 2 additions & 9 deletions json_serializable/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,12 @@ language: dart

dart:
- dev
- stable

dart_task:
# Run the tests -- include the default-skipped presubmit tests
- test: --run-skipped

matrix:
include:
- dart: dev
dart_task:
dartfmt: sdk
- dart: dev
dart_task: dartanalyzer
- dartfmt
- dartanalyzer: --fatal-infos --fatal-warnings .

# Only building master means that we don't run two builds for each pull request.
branches:
Expand Down
4 changes: 4 additions & 0 deletions json_serializable/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.1+2

* Support the latest version of the `analyzer` package.

## 0.3.1+1

* Expanded `package:build` support to allow version `0.12.0`.
Expand Down
3 changes: 3 additions & 0 deletions json_serializable/lib/src/json_part_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// https://github.com/dart-lang/sdk/issues/31761
// ignore_for_file: comment_references

import 'package:build/build.dart';
import 'package:source_gen/source_gen.dart';

Expand Down
4 changes: 2 additions & 2 deletions json_serializable/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: json_serializable
version: 0.3.1+1
version: 0.3.1+2
author: Dart Team <misc@dartlang.org>
description: Generates utilities to aid in serializing to/from JSON.
homepage: https://github.com/dart-lang/json_serializable
environment:
sdk: '>=2.0.0-dev <2.0.0'
dependencies:
analyzer: '>=0.29.10 <0.31.0'
analyzer: '>=0.29.10 <0.32.0'
build: '>=0.9.0 <0.13.0'
build_config: ^0.2.1
cli_util: ^0.1.0
Expand Down
22 changes: 15 additions & 7 deletions tool/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,38 @@
set -e

if [ -z "$PKG" ]; then
echo -e "PKG environment variable must be set!"
echo -e '\033[31mPKG environment variable must be set!\033[0m'
exit 1
elif [ -z "$TASK" ]; then
echo -e "TASK environment variable must be set!"
echo -e '\033[31mTASK environment variable must be set!\033[0m'
exit 1
fi

pushd $PKG
pub upgrade

case $TASK in
dartanalyzer) echo
echo -e "TASK: dartanalyzer"
dartanalyzer_0) echo
echo -e '\033[1mTASK: dartanalyzer_0\033[22m'
echo -e 'dartanalyzer --fatal-infos --fatal-warnings .'
dartanalyzer --fatal-infos --fatal-warnings .
;;
dartanalyzer_1) echo
echo -e '\033[1mTASK: dartanalyzer_1\033[22m'
echo -e 'dartanalyzer .'
dartanalyzer .
;;
dartfmt) echo
echo -e "TASK: dartfmt"
echo -e '\033[1mTASK: dartfmt\033[22m'
echo -e 'dartfmt -n --set-exit-if-changed .'
dartfmt -n --set-exit-if-changed .
;;
test) echo
echo -e "TASK: test"
echo -e '\033[1mTASK: test\033[22m'
echo -e 'pub run test --run-skipped'
pub run test --run-skipped
;;
*) echo -e "Not expecting TASK '${TASK}'. Error!"
*) echo -e "\033[31mNot expecting TASK '${TASK}'. Error!\033[0m"
exit 1
;;
esac