Skip to content

Commit ce1f1c8

Browse files
authored
Merge pull request #1 from gspencergoog/setup_ci
Setup packages repo for CI, update analysis options, add CONTRIBUTING.md
2 parents 2894fd8 + 542149a commit ce1f1c8

File tree

7 files changed

+361
-55
lines changed

7 files changed

+361
-55
lines changed

.travis.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
matrix:
2+
include:
3+
# Job 1) Run analyzer
4+
- os: linux
5+
env:
6+
- SHARD=Analyze
7+
sudo: false
8+
addons:
9+
apt:
10+
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
11+
sources:
12+
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
13+
packages:
14+
- libstdc++6
15+
- fonts-droid
16+
before_script:
17+
- git clone https://github.com/flutter/flutter.git
18+
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
19+
- flutter doctor
20+
- pub global activate flutter_plugin_tools
21+
script:
22+
- ./script/plugin_tools.sh analyze
23+
# Job 2) Check format and run tests
24+
- os: linux
25+
env:
26+
- SHARD=Format+Test
27+
jdk: oraclejdk8
28+
sudo: false
29+
addons:
30+
apt:
31+
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
32+
sources:
33+
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
34+
- llvm-toolchain-precise # for clang-format-5.0
35+
packages:
36+
- libstdc++6
37+
- fonts-droid
38+
before_script:
39+
- git clone https://github.com/flutter/flutter.git
40+
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
41+
- flutter doctor
42+
- pub global activate flutter_plugin_tools
43+
script:
44+
- flutter format `pwd`/packages
45+
- ./script/plugin_tools.sh test
46+
# Job 3) Build example APKs and run Java tests
47+
- os: linux
48+
env:
49+
- SHARD=Build-example-APKs+Java-Tests
50+
jdk: oraclejdk8
51+
sudo: false
52+
addons:
53+
apt:
54+
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
55+
sources:
56+
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
57+
packages:
58+
- lib32stdc++6 # https://github.com/flutter/flutter/issues/6207
59+
- libstdc++6
60+
- fonts-droid
61+
before_script:
62+
- wget https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
63+
- mkdir android-sdk
64+
- unzip -qq sdk-tools-linux-3859397.zip -d android-sdk
65+
- export ANDROID_HOME=`pwd`/android-sdk
66+
- export PATH=`pwd`/android-sdk/tools/bin:$PATH
67+
- mkdir -p /home/travis/.android # silence sdkmanager warning
68+
- echo 'count=0' > /home/travis/.android/repositories.cfg # silence sdkmanager warning
69+
# suppressing output of sdkmanager to keep log under 4MB (travis limit)
70+
- echo y | sdkmanager "tools" >/dev/null
71+
- echo y | sdkmanager "platform-tools" >/dev/null
72+
- echo y | sdkmanager "build-tools;26.0.3" >/dev/null
73+
- echo y | sdkmanager "platforms;android-26" >/dev/null
74+
- echo y | sdkmanager "extras;android;m2repository" >/dev/null
75+
- echo y | sdkmanager "extras;google;m2repository" >/dev/null
76+
- echo y | sdkmanager "patcher;v4" >/dev/null
77+
- sdkmanager --list
78+
- wget http://services.gradle.org/distributions/gradle-4.1-bin.zip
79+
- unzip -qq gradle-4.1-bin.zip
80+
- export GRADLE_HOME=$PWD/gradle-4.1
81+
- export PATH=$GRADLE_HOME/bin:$PATH
82+
- gradle -v
83+
- git clone https://github.com/flutter/flutter.git
84+
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
85+
- flutter doctor
86+
- pub global activate flutter_plugin_tools
87+
script:
88+
- ./script/plugin_tools.sh build-examples --apk
89+
- ./script/plugin_tools.sh java-test # must come after apk build
90+
# Job 4) Build example IPAs
91+
- os: osx
92+
env:
93+
- SHARD=Build-example-IPAs
94+
language: generic
95+
osx_image: xcode9.3
96+
before_script:
97+
- brew update
98+
- brew install libimobiledevice
99+
- brew install ideviceinstaller
100+
- brew install ios-deploy
101+
- pod repo update
102+
- gem update cocoapods
103+
- git clone https://github.com/flutter/flutter.git
104+
- export PATH=`pwd`/flutter/bin:`pwd`/flutter/bin/cache/dart-sdk/bin:$PATH
105+
- flutter doctor
106+
- pub global activate flutter_plugin_tools
107+
script:
108+
- ./script/plugin_tools.sh build-examples --ipa
109+
110+
cache:
111+
directories:
112+
- $HOME/.pub-cache

CONTRIBUTING.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
Contributing to Flutter
2+
=======================
3+
4+
[![Build Status](https://travis-ci.org/flutter/packages.svg)](https://travis-ci.org/flutter/packages)
5+
6+
_See also: [Flutter's code of conduct](https://flutter.io/design-principles/#code-of-conduct)_
7+
8+
Things you will need
9+
--------------------
10+
11+
* Linux, Mac OS X, or Windows.
12+
* git (used for source version control).
13+
* An ssh client (used to authenticate with GitHub).
14+
15+
Getting the code and configuring your environment
16+
-------------------------------------------------
17+
18+
* Ensure all the dependencies described in the previous section are installed.
19+
* Fork `https://github.com/flutter/packages` into your own GitHub account. If
20+
you already have a fork, and are now installing a development environment on
21+
a new machine, make sure you've updated your fork so that you don't use stale
22+
configuration options from long ago.
23+
* If you haven't configured your machine with an SSH key that's known to github, then
24+
follow [GitHub's directions](https://help.github.com/articles/generating-ssh-keys/)
25+
to generate an SSH key.
26+
* `git clone [email protected]:<your_name_here>/packages.git`
27+
* `cd packages`
28+
* `git remote add upstream [email protected]:flutter/packages.git` (So that you
29+
fetch from the master repository, not your clone, when running `git fetch`
30+
et al.)
31+
32+
Running the examples
33+
--------------------
34+
35+
To run an example with a prebuilt binary from the cloud, switch to that
36+
example's directory, run `flutter packages get` to make sure its dependencies have been
37+
downloaded, and use `flutter run`. Make sure you have a device connected over
38+
USB and debugging enabled on that device. For example:
39+
40+
* `cd packages/palette_generator/example/image_colors`
41+
* `flutter packages get`
42+
* `flutter run`
43+
44+
Contributing code
45+
-----------------
46+
47+
We gladly accept contributions via GitHub pull requests.
48+
49+
Please peruse our
50+
[style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo) and
51+
[design principles](https://flutter.io/design-principles/) before
52+
working on anything non-trivial. These guidelines are intended to
53+
keep the code consistent and avoid common pitfalls.
54+
55+
To start working on a patch:
56+
57+
* `git fetch upstream`
58+
* `git checkout upstream/master -b <name_of_your_branch>`
59+
* Hack away.
60+
* Verify changes with [flutter_plugin_tools](https://pub.dartlang.org/packages/flutter_plugin_tools)
61+
```
62+
pub global activate flutter_plugin_tools
63+
pub global run flutter_plugin_tools format --plugins package_name
64+
pub global run flutter_plugin_tools analyze --plugins package_name
65+
pub global run flutter_plugin_tools test --plugins package_name
66+
```
67+
* `git commit -a -m "<your informative commit message>"`
68+
* `git push origin <name_of_your_branch>`
69+
70+
To send us a pull request:
71+
72+
* `git pull-request` (if you are using [Hub](http://github.com/github/hub/)) or
73+
go to `https://github.com/flutter/packages` and click the
74+
"Compare & pull request" button
75+
76+
Please make sure all your checkins have detailed commit messages explaining the patch.
77+
78+
Once you've gotten an LGTM from a project maintainer and once your PR has received
79+
the green light from all our automated testing (Travis, AppVeyor, etc), submit your
80+
changes to the `master` branch using one of the following methods:
81+
82+
* Wait for one of the project maintainers to submit it for you.
83+
* Click the green "Merge pull request" button on the GitHub UI of your pull
84+
request (requires commit access).
85+
86+
You must complete the [Contributor License Agreement](https://cla.developers.google.com/clas).
87+
You can do this online, and it only takes a minute.
88+
If you've never submitted code before, you must add your (or your
89+
organization's) name and contact info to the [AUTHORS](AUTHORS) file.
90+
91+
We grant commit access to people who have gained our trust and demonstrated
92+
a commitment to Flutter.

LICENSE

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Copyright 2017, the Flutter project authors. All rights reserved.
1+
Copyright 2014 The Chromium Authors. All rights reserved.
2+
23
Redistribution and use in source and binary forms, with or without
34
modification, are permitted provided that the following conditions are
45
met:
@@ -23,4 +24,4 @@ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2324
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2425
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2526
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
1-
# Helpful packages for Flutter
1+
# Flutter Packages
2+
3+
[![Build Status](https://travis-ci.org/flutter/packages.svg?branch=master)](https://travis-ci.org/flutter/packages)
4+
[![Build Status](https://api.cirrus-ci.com/github/flutter/packages.svg)](https://cirrus-ci.com/github/flutter/packages)
5+
6+
This repo is a companion repo to the main [flutter repo](
7+
https://github.com/flutter/flutter). It contains the source code for Flutter's
8+
first-party packages (i.e., packages developed by the core Flutter team).
9+
Check the [`packages`](./packages) directory to see all packages.
10+
11+
These packages are also available on [pub](https://pub.dartlang.org/flutter/packages).
12+
13+
## Issues
14+
15+
Please file any issues, bugs, or feature requests in the [main flutter
16+
repo](https://github.com/flutter/flutter/issues/new).
17+
18+
## Contributing
19+
20+
If you wish to contribute a new package to the Flutter ecosystem, please
21+
see the documentation for [developing packages](https://flutter.io/developing-packages/). You can store
22+
your package source code in any GitHub repository (the present repo is only
23+
intended for packages developed by the core Flutter team). Once your package
24+
is ready you can [publish](https://flutter.io/developing-packages/#publish)
25+
to the [pub repository](https://pub.dartlang.org/).
26+
27+
If you wish to contribute a change to any of the existing packages in this repo,
28+
please review our [contribution guide](https://github.com/flutter/packages/blob/master/CONTRIBUTING.md),
29+
and send a [pull request](https://github.com/flutter/packages/pulls).
30+
31+
## Plugins
32+
These are the available packages in this repository.
33+
34+
| Plugin | Pub |
35+
|--------|-----|
36+
| [palette_generator](./packages/palette_generator/) | [![pub package](https://img.shields.io/pub/v/palette_generator.svg)](https://pub.dartlang.org/packages/palette_generator) |
237

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

0 commit comments

Comments
 (0)