Move cassowary into package:flutter (#3591)

Cassowary doesn't have any additional dependencies and this simplifies things.

Fixes #2442
This commit is contained in:
Adam Barth 2016-04-27 17:32:06 -07:00
parent d8f2d018ad
commit 4aa3756835
21 changed files with 42 additions and 66 deletions

View file

@ -5,7 +5,7 @@
// This example shows how to use the Cassowary autolayout system directly in the
// underlying render tree.
import 'package:cassowary/cassowary.dart' as al;
import 'package:flutter/cassowary.dart' as al;
import 'package:flutter/rendering.dart';
class _MyAutoLayoutDelegate extends AutoLayoutDelegate {

View file

@ -4,7 +4,7 @@
// This example shows how to use the Cassowary autolayout system with widgets.
import 'package:cassowary/cassowary.dart' as al;
import 'package:flutter/cassowary.dart' as al;
import 'package:flutter/widgets.dart';
class _MyAutoLayoutDelegate extends AutoLayoutDelegate {

View file

@ -1,28 +0,0 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// An implementation of the Cassowary constraint solving algorithm in Dart.
///
/// This library is not meant to be imported by developers.
/// It will soon be integrated into another Flutter library.
///
/// This is used by the [RenderAutoLayout] render object in the rendering
/// library and by the [AutoLayout] widget in the widget library.
///
/// See also:
///
/// * <https://en.wikipedia.org/wiki/Cassowary_(software)>
/// * <https://constraints.cs.washington.edu/solvers/cassowary-tochi.pdf>
library cassowary;
export 'src/constraint.dart';
export 'src/expression.dart';
export 'src/term.dart';
export 'src/equation_member.dart';
export 'src/constant_member.dart';
export 'src/solver.dart';
export 'src/result.dart';
export 'src/parser_exception.dart';
export 'src/param.dart';
export 'src/priority.dart';

View file

@ -1,10 +0,0 @@
name: cassowary
description: Cassowary Constraint Solving Toolkit
version: 0.1.7
author: Flutter Authors <flutter-dev@googlegroups.com>
homepage: https://github.com/flutter/flutter/tree/master/packages/cassowary
environment:
sdk: '>=1.0.0 <2.0.0'
dev_dependencies:
flutter_test:
path: ../flutter_test

View file

@ -1,9 +0,0 @@
// Copyright (c) 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'cassowary_test.dart' as cassowary_test;
void main() {
cassowary_test.main();
}

View file

@ -0,0 +1,27 @@
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// An implementation of the Cassowary constraint solving algorithm in Dart.
///
/// To use, import `package:flutter/cassowary.dart`.
///
/// This is used by the [RenderAutoLayout] render object in the rendering
/// library and by the [AutoLayout] widget in the widget library.
///
/// See also:
///
/// * <https://en.wikipedia.org/wiki/Cassowary_(software)>
/// * <https://constraints.cs.washington.edu/solvers/cassowary-tochi.pdf>
library cassowary;
export 'src/cassowary/constraint.dart';
export 'src/cassowary/expression.dart';
export 'src/cassowary/term.dart';
export 'src/cassowary/equation_member.dart';
export 'src/cassowary/constant_member.dart';
export 'src/cassowary/solver.dart';
export 'src/cassowary/result.dart';
export 'src/cassowary/parser_exception.dart';
export 'src/cassowary/param.dart';
export 'src/cassowary/priority.dart';

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

View file

@ -1,4 +1,4 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:cassowary/cassowary.dart' as al; // "auto layout"
import 'package:flutter/cassowary.dart' as al; // "auto layout"
import 'box.dart';
import 'object.dart';

View file

@ -19,9 +19,6 @@ dependencies:
sky_services:
path: ../../bin/cache/pkg/sky_services
cassowary:
path: ../cassowary
dev_dependencies:
flutter_test:
path: ../flutter_test

View file

@ -1,10 +1,10 @@
// Copyright (c) 2015 The Chromium Authors. All rights reserved.
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:test/test.dart';
import 'package:cassowary/cassowary.dart';
import 'package:flutter/cassowary.dart';
void main() {
test('variable', () {

View file

@ -10,7 +10,6 @@ flutter analyze --flutter-repo
# //chrome_infra/build/scripts/slave/recipes/flutter/flutter.py
# see https://github.com/flutter/flutter/blob/master/infra/README.md
(cd packages/cassowary; dart -c test/all.dart)
(cd packages/flutter; flutter test)
(cd packages/flutter_driver; dart -c test/all.dart)
(cd packages/flutter_sprites; flutter test)