-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
Contributing to Flutter | ||
======================= | ||
|
||
[](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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,37 @@ | ||
# Helpful packages for Flutter | ||
# Flutter Packages | ||
|
||
[](https://travis-ci.org/flutter/packages) | ||
[](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/) | [](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. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.