Skip to content

Setup packages repo for CI, update analysis options #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2018
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
112 changes: 112 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
matrix:
include:
# Job 1) Run analyzer
- os: linux
env:
- SHARD=Analyze
sudo: false
addons:
apt:
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
sources:
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
packages:
- libstdc++6
- fonts-droid
before_script:
- git clone https://github.com/flutter/flutter.git
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter doctor
- pub global activate flutter_plugin_tools
script:
- ./script/plugin_tools.sh analyze
# Job 2) Check format and run tests
- os: linux
env:
- SHARD=Format+Test
jdk: oraclejdk8
sudo: false
addons:
apt:
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
sources:
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
- llvm-toolchain-precise # for clang-format-5.0
packages:
- libstdc++6
- fonts-droid
before_script:
- git clone https://github.com/flutter/flutter.git
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter doctor
- pub global activate flutter_plugin_tools
script:
- flutter format `pwd`/packages
- ./script/plugin_tools.sh test
# Job 3) Build example APKs and run Java tests
- os: linux
env:
- SHARD=Build-example-APKs+Java-Tests
jdk: oraclejdk8
sudo: false
addons:
apt:
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
sources:
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
packages:
- lib32stdc++6 # https://github.com/flutter/flutter/issues/6207
- libstdc++6
- fonts-droid
before_script:
- wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
- mkdir android-sdk
- unzip -qq sdk-tools-linux-3859397.zip -d android-sdk
- export ANDROID_HOME=`pwd`/android-sdk
- export PATH=`pwd`/android-sdk/tools/bin:$PATH
- mkdir -p /home/travis/.android # silence sdkmanager warning
- echo 'count=0' > /home/travis/.android/repositories.cfg # silence sdkmanager warning
# suppressing output of sdkmanager to keep log under 4MB (travis limit)
- echo y | sdkmanager "tools" >/dev/null
- echo y | sdkmanager "platform-tools" >/dev/null
- echo y | sdkmanager "build-tools;26.0.3" >/dev/null
- echo y | sdkmanager "platforms;android-26" >/dev/null
- echo y | sdkmanager "extras;android;m2repository" >/dev/null
- echo y | sdkmanager "extras;google;m2repository" >/dev/null
- echo y | sdkmanager "patcher;v4" >/dev/null
- sdkmanager --list
- wget http://services.gradle.org/distributions/gradle-4.1-bin.zip
- unzip -qq gradle-4.1-bin.zip
- export GRADLE_HOME=$PWD/gradle-4.1
- export PATH=$GRADLE_HOME/bin:$PATH
- gradle -v
- git clone https://github.com/flutter/flutter.git
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter doctor
- pub global activate flutter_plugin_tools
script:
- ./script/plugin_tools.sh build-examples --apk
- ./script/plugin_tools.sh java-test # must come after apk build
# Job 4) Build example IPAs
- os: osx
env:
- SHARD=Build-example-IPAs
language: generic
osx_image: xcode9.3
before_script:
- brew update
- brew install libimobiledevice
- brew install ideviceinstaller
- brew install ios-deploy
- pod repo update
- gem update cocoapods
- git clone https://github.com/flutter/flutter.git
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
- flutter doctor
- pub global activate flutter_plugin_tools
script:
- ./script/plugin_tools.sh build-examples --ipa

cache:
directories:
- $HOME/.pub-cache
92 changes: 92 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
Contributing to Flutter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than duplicating this, I suggest we link to it, similar to what we do over in flutter/plugins: https://github.com/flutter/plugins#contributing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. There is some specific stuff here for the packages repo, but I'll just factor that out.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the link you gave is to README.md in the plugins dir. The CONTRIBUTING.md there is basically the same as here (I did start from that one to make this one). This one is customized for the packages repo.

I'll update the README.md to be like the one in plugins.

=======================

[![Build Status](https://travis-ci.org/flutter/packages.svg)](https://travis-ci.org/flutter/packages)

_See also: [Flutter's code of conduct](https://flutter.io/design-principles/#code-of-conduct)_

Things you will need
--------------------

* Linux, Mac OS X, or Windows.
* git (used for source version control).
* An ssh client (used to authenticate with GitHub).

Getting the code and configuring your environment
-------------------------------------------------

* Ensure all the dependencies described in the previous section are installed.
* Fork `https://github.com/flutter/packages` into your own GitHub account. If
you already have a fork, and are now installing a development environment on
a new machine, make sure you've updated your fork so that you don't use stale
configuration options from long ago.
* If you haven't configured your machine with an SSH key that's known to github, then
follow [GitHub's directions](https://help.github.com/articles/generating-ssh-keys/)
to generate an SSH key.
* `git clone [email protected]:<your_name_here>/packages.git`
* `cd packages`
* `git remote add upstream [email protected]:flutter/packages.git` (So that you
fetch from the master repository, not your clone, when running `git fetch`
et al.)

Running the examples
--------------------

To run an example with a prebuilt binary from the cloud, switch to that
example's directory, run `flutter packages get` to make sure its dependencies have been
downloaded, and use `flutter run`. Make sure you have a device connected over
USB and debugging enabled on that device. For example:

* `cd packages/palette_generator/example/image_colors`
* `flutter packages get`
* `flutter run`

Contributing code
-----------------

We gladly accept contributions via GitHub pull requests.

Please peruse our
[style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo) and
[design principles](https://flutter.io/design-principles/) before
working on anything non-trivial. These guidelines are intended to
keep the code consistent and avoid common pitfalls.

To start working on a patch:

* `git fetch upstream`
* `git checkout upstream/master -b <name_of_your_branch>`
* Hack away.
* Verify changes with [flutter_plugin_tools](https://pub.dartlang.org/packages/flutter_plugin_tools)
```
pub global activate flutter_plugin_tools
pub global run flutter_plugin_tools format --plugins package_name
pub global run flutter_plugin_tools analyze --plugins package_name
pub global run flutter_plugin_tools test --plugins package_name
```
* `git commit -a -m "<your informative commit message>"`
* `git push origin <name_of_your_branch>`

To send us a pull request:

* `git pull-request` (if you are using [Hub](http://github.com/github/hub/)) or
go to `https://github.com/flutter/packages` and click the
"Compare & pull request" button

Please make sure all your checkins have detailed commit messages explaining the patch.

Once you've gotten an LGTM from a project maintainer and once your PR has received
the green light from all our automated testing (Travis, AppVeyor, etc), submit your
changes to the `master` branch using one of the following methods:

* Wait for one of the project maintainers to submit it for you.
* Click the green "Merge pull request" button on the GitHub UI of your pull
request (requires commit access).

You must complete the [Contributor License Agreement](https://cla.developers.google.com/clas).
You can do this online, and it only takes a minute.
If you've never submitted code before, you must add your (or your
organization's) name and contact info to the [AUTHORS](AUTHORS) file.

We grant commit access to people who have gained our trust and demonstrated
a commitment to Flutter.
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright 2017, the Flutter project authors. All rights reserved.
Copyright 2014 The Chromium Authors. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
Expand All @@ -23,4 +24,4 @@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 changes: 36 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,37 @@
# Helpful packages for Flutter
# Flutter Packages

[![Build Status](https://travis-ci.org/flutter/packages.svg?branch=master)](https://travis-ci.org/flutter/packages)
[![Build Status](https://api.cirrus-ci.com/github/flutter/packages.svg)](https://cirrus-ci.com/github/flutter/packages)

This repo is a companion repo to the main [flutter repo](
https://github.com/flutter/flutter). It contains the source code for Flutter's
first-party packages (i.e., packages developed by the core Flutter team).
Check the [`packages`](./packages) directory to see all packages.

These packages are also available on [pub](https://pub.dartlang.org/flutter/packages).

## Issues

Please file any issues, bugs, or feature requests in the [main flutter
repo](https://github.com/flutter/flutter/issues/new).

## Contributing

If you wish to contribute a new package to the Flutter ecosystem, please
see the documentation for [developing packages](https://flutter.io/developing-packages/). You can store
your package source code in any GitHub repository (the present repo is only
intended for packages developed by the core Flutter team). Once your package
is ready you can [publish](https://flutter.io/developing-packages/#publish)
to the [pub repository](https://pub.dartlang.org/).

If you wish to contribute a change to any of the existing packages in this repo,
please review our [contribution guide](https://github.com/flutter/packages/blob/master/CONTRIBUTING.md),
and send a [pull request](https://github.com/flutter/packages/pulls).

## Plugins
These are the available packages in this repository.

| Plugin | Pub |
|--------|-----|
| [palette_generator](./packages/palette_generator/) | [![pub package](https://img.shields.io/pub/v/palette_generator.svg)](https://pub.dartlang.org/packages/palette_generator) |

This repository contains miscellaneous packages that help you build flutter
apps. It is maintained by the Flutter team.
Loading