Skip to content

Commit da40958

Browse files
committed
Merge package:platform into the core monorepo
2 parents 279afbc + 5b429af commit da40958

File tree

20 files changed

+969
-0
lines changed

20 files changed

+969
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Platform Package
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
correctness:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
15+
- uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
16+
with:
17+
sdk: dev
18+
- name: Install dependencies
19+
run: dart pub upgrade
20+
- name: Verify formatting
21+
run: dart format --output=none --set-exit-if-changed .
22+
- name: Analyze project source
23+
run: dart analyze --fatal-infos
24+
test:
25+
runs-on: ${{ matrix.os }}
26+
strategy:
27+
matrix:
28+
os: [ubuntu-latest, macos-latest, windows-latest]
29+
sdk: [stable, beta, dev]
30+
steps:
31+
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
32+
- uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603
33+
with:
34+
sdk: ${{ matrix.sdk }}
35+
- name: Install dependencies
36+
run: dart pub upgrade
37+
- name: Run Tests
38+
run: dart test

pkgs/platform/.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### Dart template
2+
# Don’t commit the following directories created by pub.
3+
.buildlog
4+
.dart_tool/
5+
.pub/
6+
build/
7+
packages
8+
.packages
9+
10+
# Include when developing application packages.
11+
pubspec.lock
12+
13+
# IDE
14+
.project
15+
.settings
16+
.idea
17+
.c9

pkgs/platform/AUTHORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Below is a list of people and organizations that have contributed
2+
# to the Process project. Names should be added to the list like so:
3+
#
4+
# Name/Organization <email address>
5+
6+
Google Inc.

pkgs/platform/CHANGELOG.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
## 3.1.5
2+
3+
* Updates minimum supported SDK version to Flutter 3.16/Dart 3.2.
4+
* Transfers the package source from https://github.com/flutter/packages
5+
to https://github.com/dart-lang/platform.
6+
7+
## 3.1.4
8+
9+
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
10+
* Fixes new lint warnings.
11+
12+
## 3.1.3
13+
14+
* Adds example app.
15+
16+
## 3.1.2
17+
18+
* Adds pub topics to package metadata.
19+
* Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.
20+
21+
## 3.1.1
22+
23+
* Transfers the package source from https://github.com/google/platform.dart to
24+
https://github.com/flutter/packages.
25+
26+
## 3.1.0
27+
28+
* Removed `Platform.packageRoot`, which was already marked deprecated, and which
29+
didn't work in Dart 2.
30+
31+
## 3.0.2
32+
33+
* Added `FakePlatform.copyWith` function.
34+
35+
## 3.0.1
36+
37+
* Added string constants for each of the supported platforms for use in switch
38+
statements.
39+
40+
## 3.0.0
41+
42+
* First stable null safe release.
43+
44+
## 3.0.0-nullsafety.4
45+
46+
* Update supported SDK range.
47+
48+
## 3.0.0-nullsafety.3
49+
50+
* Update supported SDK range.
51+
52+
## 3.0.0-nullsafety.2
53+
54+
* Update supported SDK range.
55+
56+
## 3.0.0-nullsafety.1
57+
58+
* Migrate package to null-safe dart.
59+
60+
## 2.2.1
61+
62+
* Add `operatingSystemVersion`
63+
64+
## 2.2.0
65+
66+
* Declare compatibility with Dart 2 stable
67+
* Update dependency on `package:test` to 1.0
68+
69+
## 2.1.2
70+
71+
* Relax sdk upper bound constraint to '<2.0.0' to allow 'edge' dart sdk use.
72+
73+
## 2.1.1
74+
75+
* Bumped maximum Dart SDK version to 2.0.0-dev.infinity
76+
77+
## 2.1.0
78+
79+
* Added `localeName`
80+
* Bumped minimum Dart SDK version to 1.24.0-dev.0.0
81+
82+
## 2.0.0
83+
84+
* Added `stdinSupportsAnsi` and `stdinSupportsAnsi`
85+
* Removed `ansiSupported`
86+
87+
## 1.1.1
88+
89+
* Updated `LocalPlatform` to use new `dart.io` API for ansi color support queries
90+
* Bumped minimum Dart SDK version to 1.23.0-dev.10.0
91+
92+
## 1.1.0
93+
94+
* Added `ansiSupported`
95+
* Bumped minimum Dart SDK version to 1.23.0-dev.9.0
96+
97+
## 1.0.2
98+
99+
* Minor doc updates
100+
101+
## 1.0.1
102+
103+
* Added const constructors for `Platform` and `LocalPlatform`
104+
105+
## 1.0.0
106+
107+
* Initial version

pkgs/platform/CONTRIBUTING.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# How to contribute
2+
3+
We'd love to accept your patches and contributions to this project. There are
4+
just a few small guidelines you need to follow.
5+
6+
## Contributor License Agreement
7+
8+
Contributions to this project must be accompanied by a Contributor License
9+
Agreement. You (or your employer) retain the copyright to your contribution,
10+
this simply gives us permission to use and redistribute your contributions as
11+
part of the project. Head over to <https://cla.developers.google.com/> to see
12+
your current agreements on file or to sign a new one.
13+
14+
You generally only need to submit a CLA once, so if you've already submitted one
15+
(even if it was for a different project), you probably don't need to do it
16+
again.
17+
18+
## Code reviews
19+
20+
All submissions, including submissions by project members, require review. We
21+
use GitHub pull requests for this purpose. Consult [GitHub Help] for more
22+
information on using pull requests.
23+
24+
[GitHub Help]: https://help.github.com/articles/about-pull-requests/

pkgs/platform/LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Copyright 2017, the Dart project authors. All rights reserved.
2+
Redistribution and use in source and binary forms, with or without
3+
modification, are permitted provided that the following conditions are
4+
met:
5+
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above
9+
copyright notice, this list of conditions and the following
10+
disclaimer in the documentation and/or other materials provided
11+
with the distribution.
12+
* Neither the name of Google Inc. nor the names of its
13+
contributors may be used to endorse or promote products derived
14+
from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(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.

pkgs/platform/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[![Pub](https://img.shields.io/pub/v/platform.svg)](https://pub.dartlang.org/packages/platform)
2+
3+
A generic platform abstraction for Dart.
4+
5+
Like `dart:io`, `package:platform` supplies a rich, Dart-idiomatic API for
6+
accessing platform-specific information.
7+
8+
`package:platform` provides a lightweight wrapper around the static `Platform`
9+
properties that exist in `dart:io`. However, it uses instance properties rather
10+
than static properties, making it possible to mock out in tests.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include: package:dart_flutter_team_lints/analysis_options.yaml
2+
3+
analyzer:
4+
errors:
5+
# Allow having TODOs in the code
6+
todo: ignore

pkgs/platform/example/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://dart.dev/guides/libraries/private-files
2+
# Created by `dart pub`
3+
.dart_tool/

pkgs/platform/example/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
A small example application demonstrating how to use the platform information
2+
APIs in `package:platform`.

0 commit comments

Comments
 (0)