diff --git a/src/_data/macos.json b/src/_data/macos.json new file mode 100644 index 0000000000..5b31eae978 --- /dev/null +++ b/src/_data/macos.json @@ -0,0 +1,107 @@ +[ + { + "cycle":"14", + "codename":"Sonoma", + "releaseDate":"2023-09-26", + "eol":false, + "latest":"14.2.1", + "latestReleaseDate":"2023-12-19", + "link":"https://support.apple.com/HT213895", + "lts":false + }, + { + "cycle":"13", + "codename":"Ventura", + "releaseDate":"2022-10-24", + "eol":false, + "latest":"13.6.3", + "latestReleaseDate":"2023-12-11", + "link":"https://support.apple.com/HT213268", + "lts":false + }, + { + "cycle":"12", + "codename":"Monterey", + "releaseDate":"2021-10-25", + "eol":false, + "latest":"12.7.2", + "latestReleaseDate":"2023-12-11", + "link":"https://support.apple.com/HT212585", + "lts":false + }, + { + "cycle":"11", + "codename":"Big Sur", + "releaseDate":"2020-11-12", + "eol":"2023-09-26", + "latest":"11.7.10", + "latestReleaseDate":"2023-09-11", + "link":"https://support.apple.com/HT211896", + "lts":false + }, + { + "cycle":"10.15", + "codename":"Catalina", + "releaseDate":"2019-10-07", + "eol":"2022-09-12", + "latest":"10.15.7", + "latestReleaseDate":"2020-09-24", + "link":"https://support.apple.com/HT210642", + "lts":false + }, + { + "cycle":"10.14", + "codename":"Mojave", + "releaseDate":"2018-09-24", + "eol":"2021-10-25", + "latest":"10.14.6", + "latestReleaseDate":"2019-07-22", + "lts":false + }, + { + "cycle":"10.13", + "codename":"High Sierra", + "releaseDate":"2017-09-25", + "eol":"2020-12-01", + "latest":"10.13.6", + "latestReleaseDate":"2018-07-09", + "lts":false + }, + { + "cycle":"10.12", + "codename":"Sierra", + "releaseDate":"2016-09-20", + "eol":"2019-10-01", + "latest":"10.12.6", + "latestReleaseDate":"2017-07-19", + "lts":false + }, + { + "cycle":"10.11", + "codename":"El Capitan", + "releaseLabel":"OS X __RELEASE_CYCLE__ (__CODENAME__)", + "releaseDate":"2015-09-30", + "eol":"2018-12-01", + "latest":"10.11.6", + "latestReleaseDate":"2016-07-18", + "lts":false + }, + { + "cycle":"10.10", + "releaseLabel":"OS X __RELEASE_CYCLE__ (__CODENAME__)", + "codename":"Yosemite", + "releaseDate":"2014-10-16", + "eol":"2017-08-01", + "latest":"10.10.5", + "latestReleaseDate":"2015-08-13", + "lts":false + }, + { + "cycle":"10.9", + "releaseLabel":"OS X __RELEASE_CYCLE__ (__CODENAME__)", + "codename":"Mavericks", + "releaseDate":"2013-10-22", + "eol":"2016-12-01", + "latest":"10.9.5", + "latestReleaseDate":"2014-09-17", + "lts":false}] \ No newline at end of file diff --git a/src/_sass/site.scss b/src/_sass/site.scss index 07eb178c3b..f0699670f8 100644 --- a/src/_sass/site.scss +++ b/src/_sass/site.scss @@ -553,7 +553,7 @@ li.card { border-radius: 0; color: $site-color-body; margin-top: 1rem; - padding: 30px 30px; + padding: 1.5rem; i.material-icons { font-size: 20px; @@ -569,7 +569,7 @@ li.card { background-color: #00000010; } - p:last-child { + p:last-child, li:last-child, ul:last-child, ol:last-child { margin-bottom: 0; } @@ -884,3 +884,16 @@ body.obsolete { } } } + +/* ----------------------------------------- + Headings in boxes + ----------------------------------------- */ + +div h1:first-child, +div h2:first-child, +div h3:first-child, +div h4:first-child, +div h5:first-child, +div h6:first-child { + margin-top: 0rem; +} \ No newline at end of file diff --git a/src/get-dart/_linux.md b/src/get-dart/_linux.md index 3e8e7ba3d9..71c1be3d46 100644 --- a/src/get-dart/_linux.md +++ b/src/get-dart/_linux.md @@ -1,29 +1,85 @@ -If you're using Debian/Ubuntu on AMD64 (64-bit Intel), you can choose one of the -following options, both of which can update the SDK automatically when new -versions are released. -* [Install using apt-get](#install-using-apt-get) -* [Install a Debian package](#install-a-debian-package) -#### Install using apt-get +### System requirements +{: .no_toc} -Perform the following **one-time setup**: +Dart supports the following hardware architectures and platform versions +to develop and run Dart code on Linux. -```terminal -$ sudo apt-get update -$ sudo apt-get install apt-transport-https -$ wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg -$ echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list -``` +#### Hardware architecture +{: .no_toc} + +Dart supports the following CPU architectures on Linux. + +| Platform | x86 | x64 | ARM | ARM64 | RISC-V | +|----------|-----|-----|-----|-----------|-----------| +| Linux | Yes | Yes | Yes | Yes | Dev, Beta | +{:.table .table-striped} + +#### Operating system flavor and version +{: .no_toc} + +Dart supports the [Debian stable][] and [Ubuntu LTS][] under standard +support. + +| Platform | OS Versions | +|----------|------------------------------------------| +| Linux | [Debian stable][], [Ubuntu LTS][] | +{:.table .table-striped} + +### Install using package manager +{: .no_toc} + +Choose to install either using [apt-get](#install-using-apt-get) +or downloading a [`.deb`](#install-a-debian-package) package. + +Both methods trigger an SDK update whenever Dart releases a new version. + +#### Install using `apt-get` +{: .no_toc} + +Perform the following steps for the first install only. -Then install the Dart SDK: +1. Update the package index files and install the secure HTTP package. + + ```terminal + $ sudo apt-get update && sudo apt-get install apt-transport-https + ``` + +1. Download and add the Google Linux GPG public key. + + ```terminal + $ wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo gpg --dearmor -o /usr/share/keyrings/dart.gpg + ``` + +1. Add the Dart package repository to your Linux system. + + ```terminal + $ echo 'deb [signed-by=/usr/share/keyrings/dart.gpg arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list + ``` + +Install the Dart SDK using [`sudo`][sudo]. ```terminal -$ sudo apt-get update -$ sudo apt-get install dart +$ sudo apt-get update && sudo apt-get install dart ``` #### Install a Debian package -Alternatively, download Dart SDK [as a Debian package](#){:.debian-link-stable} -in the `.deb` package format. +To install the Dart SDK as a Debian package (`*.deb`). + +1. Download the Dart SDK as a [Debian package](#){:.debian-link-stable}. + +1. Install the `*.deb` package using one of two methods: + + * From a GUI, double-click the `.deb` file. + + * From a terminal, run the following command: + + ```terminal + $ sudo dpkg -i dart_3.2.6-1_amd64.deb + ``` + +[sudo]: https://www.sudo.ws/ +[Debian stable]: https://www.debian.org/releases +[Ubuntu LTS]: https://wiki.ubuntu.com/Releases diff --git a/src/get-dart/_mac.md b/src/get-dart/_mac.md index 980f330ea9..85e3899e35 100644 --- a/src/get-dart/_mac.md +++ b/src/get-dart/_mac.md @@ -1,42 +1,88 @@ -[Install Homebrew,](https://brew.sh) -and then run the following commands: + +### System requirements +{: .no_toc} + +Dart supports the following hardware architectures and platform versions +to develop and run Dart code on macOS. + +#### Hardware architecture +{: .no_toc} + +Dart supports the following CPU architectures. + +| Platform | x86 | x64 | ARM | ARM64 | RISC-V | +|----------|-----|-----|-----|-------|--------| +| macOS | No | Yes | No | Yes | No | +{:.table .table-striped} + +#### Operating system +{: .no_toc} + +Dart supports the latest three major versions of macOS. + +| Platform | OS Versions | +|----------|------------------------------------------| +| macOS | {% for version in site.data.macos %}{% if version.eol != false %}{% break %}{%- else -%}{{version.cycle}} ({{version.codename}}){% endif %}, {% endfor %} | +{:.table .table-striped} + +### Install using Homebrew +{: .no_toc} + +To install the Dart SDK, use [Homebrew][]. + +Install Homebrew, then run the following commands. ```terminal $ brew tap dart-lang/dart $ brew install dart ``` -{{site.alert.important}} - Make sure the **Homebrew `bin` directory is in your `PATH`**. +### Verify PATH includes Homebrew +{: .no_toc} + + Verify that your `PATH` includes the **Homebrew `bin`. Setting up the path correctly makes it easier to use Dart SDK commands - such as `dart run` and `dart format`. - For help configuring your path, + such as `dart run` and `dart format`. + For help configuring your path, consult the [Homebrew FAQ.](https://docs.brew.sh/FAQ) {{site.alert.end}} +### Upgrade using Homebrew +{: .no_toc} + To upgrade when a new release of Dart is available: ```terminal $ brew upgrade dart ``` -To switch between locally installed Dart releases, -first install the version you want to switch to if you haven't. -For example, to install Dart 2.12: +### Switch Dart versions +{: .no_toc} -```terminal -$ brew install dart@2.12 -``` +To switch between locally installed Dart releases: -Then to switch between versions, -unlink the current version and link the desired version. +1. Install the version to which you want to switch. -```terminal -$ brew unlink dart@ && brew unlink dart@ && brew link dart@ -``` + For example, to install Dart 3.1: + + ```terminal + $ brew install dart@3.1 + ``` + +1. To switch between versions, + unlink the current version and link the desired version. + + ```terminal + $ brew unlink dart@ && brew unlink dart@ && brew link dart@ + ``` + +### List installed Dart versions +{: .no_toc} To see which versions of Dart you've installed: ```terminal $ brew info dart ``` + +[Homebrew]: https://brew.sh diff --git a/src/get-dart/_windows.md b/src/get-dart/_windows.md index 2d6a1e8de6..dd8883664e 100644 --- a/src/get-dart/_windows.md +++ b/src/get-dart/_windows.md @@ -1,33 +1,60 @@ -You can install the Dart SDK using [Chocolatey.][Chocolatey] -{{site.alert.important}} - These commands require administrator rights. - Here's one way to open a Command Prompt window - that has admin rights: +### System requirements +{: .no_toc} - 1. Press Windows+R to open the **Run** window. - 2. Type `cmd` into the box. - 3. Press Ctrl+Shift+Enter. -{{site.alert.end}} +Dart supports the following hardware architectures and platform versions +to develop and run Dart code on Windows. -To install the Dart SDK: +#### Hardware architecture +{: .no_toc} + +Dart supports the following CPU architectures on Windows. + +| Platform | x86 | x64 | ARM | ARM64 | RISC-V | +|----------|-----|-----|-----|-----------|-----------| +| Windows | Yes | Yes | No | Dev, Beta | No | +{:.table .table-striped} + +#### Operating system +{: .no_toc} + +Dart supports 32-bit and 64-bit Windows 10 and Windows 11. + +| Platform | OS Versions | +|----------|-------------| +| Windows | 10, 11 | +{:.table .table-striped} + +### Install using Chocolatey +{: .no_toc} + +To install the Dart SDK, use [Chocolatey][Chocolatey]. +Chocolatey requires [elevated permissions]. + +Install Chocolatey, then run a [command prompt] with elevated permissions. ```terminal C:\> choco install dart-sdk ``` -To upgrade the Dart SDK: +### Change default install path +{: .no_toc} + +By default, Chocolatey installs the SDK at `C:\tools\dart-sdk`. +To change that location, set the [`ChocolateyToolsLocation`][] +environment variable to your desired installation directory. + +### Verify your PATH includes Dart +{: .no_toc} + +Verify you can run Dart. ```terminal -C:\> choco upgrade dart-sdk +C:\> dart --version +Dart SDK version: 3.2.4 (stable) (Thu Dec 21 19:13:53 2023 +0000) on "win_x64" ``` -By default, the SDK is installed at `C:\tools\dart-sdk`. -You can change that location by setting -the [`ChocolateyToolsLocation`][] environment variable -to your chosen installation directory. - -If you can't use the Dart SDK executables, +If your development machine doesn't return a Dart version, add the SDK location to your PATH: 1. In the Windows search box, type `env`. @@ -38,5 +65,16 @@ add the SDK location to your PATH: 6. In each window that you just opened, click **Apply** or **OK** to dismiss it and apply the path change. +### Upgrade using Chocolatey +{: .no_toc} + +To upgrade the Dart SDK: + +```terminal +C:\> choco upgrade dart-sdk +``` + +[elevated permissions]: https://www.thewindowsclub.com/elevated-privileges-windows +[command prompt]: https://www.thewindowsclub.com/how-to-run-command-prompt-as-an-administrator [Chocolatey]: https://chocolatey.org [`ChocolateyToolsLocation`]: https://stackoverflow.com/questions/19752533/how-do-i-set-chocolatey-to-install-applications-onto-another-drive/68314437#68314437 diff --git a/src/get-dart/archive/_sdk-terms.md b/src/get-dart/archive/_sdk-terms.md index b944b13ec8..3ceb4fe85e 100644 --- a/src/get-dart/archive/_sdk-terms.md +++ b/src/get-dart/archive/_sdk-terms.md @@ -1,11 +1,11 @@ -Dart tools may send usage metrics and crash reports to Google. -By downloading the Dart SDK, you agree to the +Dart tools might send usage metrics and crash reports to Google. +If you download the Dart SDK, you agree to the [Google Terms of Service.](https://policies.google.com/terms) -Note: The [Google Privacy Policy](https://policies.google.com/privacy) -describes how data is handled in this service. +To learn how Dart handles this data, +consult the [Google Privacy Policy](https://policies.google.com/privacy). -To control the submission of metrics, use the following options on the +To toggle data collection, use the following options on the [`dart` tool](/tools/dart-tool): -* `--enable-analytics`: Enables anonymous analytics. -* `--disable-analytics`: Disables anonymous analytics. \ No newline at end of file +* To enable anonymous analytics, run `dart --enable-analytics`. +* To disable anonymous analytics, run `dart --disable-analytics`. diff --git a/src/get-dart/index.md b/src/get-dart/index.md index 93d9a30d27..ed4f2c9a5c 100644 --- a/src/get-dart/index.md +++ b/src/get-dart/index.md @@ -1,39 +1,40 @@ --- title: Get the Dart SDK description: Get the libraries and command-line tools that you need to develop Dart web, command-line, and server apps. +channel-list: [Stable, Beta, Dev] js: - url: /assets/js/get-dart/install.js defer: true --- This page describes how to download the Dart SDK. -The Dart SDK has the libraries and command-line tools that you need to develop -Dart command-line, server, and non-Flutter web apps. -For details, see the [Dart SDK overview](/tools/sdk). - -## Installing the Dart SDK {#install} - -As the following instructions show, -you can use a package manager -to easily install and update a stable channel Dart SDK. -Alternatively, you can -[build the SDK from source][], -grab a [Dart Docker image][], or -install from [any release channel](#release-channels) by -[downloading the SDK as a zip file][]. +The Dart SDK includes the libraries and command-line tools that you need to develop Dart command-line, server, and non-Flutter web apps. + +To learn more about the Dart SDK, see the [Dart SDK overview](/tools/sdk). + +## Choose an install option + +To install and update the Dart SDK from the stable channel, +choose one of the following options: + +1. [Use a package manager](#install) (Recommended). +1. [Build the SDK from source][build-source] +1. Use a [Dart Docker image][dart-docker] + {% comment %} NOTE to editors: Keep the zip file link as the last thing in the paragraph, so it's easy to find (but not more tempting than package managers). {% endcomment %} -*Note*: The Flutter SDK includes the full Dart SDK, -and has Dart's [`dart`](/tools/dart-tool) command-line interface -in its `bin` folder. - {{site.alert.warn}} - {% include_relative archive/_sdk-terms.md %} +{% include_relative archive/_sdk-terms.md %} {{site.alert.end}} +## Install the Dart SDK {#install} + +The Flutter SDK includes the full Dart SDK including the +[`dart`](/tools/dart-tool) CLI tool in Flutter's `bin` folder. +
    @@ -49,76 +50,59 @@ in its `bin` folder. {% include_relative _mac.md %} -## System requirements +## About release channels and version strings {#release-channels} -The Dart SDK is supported on Windows, Linux, and macOS. +{% for channel in page.channel-list %} +{% assign chnl = channel | downcase -%} -### Windows +{% assign current="`[calculating]`{:.build-rev-" | append: chnl | append: "}" %} +{% case chnl %} +{% when 'stable' %} +{% assign verstring = "`x.y.z`" %} +{% assign examples = "`1.24.3` and `2.1.0`" %} +{% when 'beta' %} +{% assign verstring = "`x.y.z-a.b.beta`" %} +{% assign examples = "`2.8.0-20.11.beta` and `3.3.0-205.1.beta`" %} +{% assign verdesc = "pre-release" %} +{% when 'dev' %} +{% assign verstring = "`x.y.z-a.b.dev`" %} +{% assign examples = "`2.8.0-20.11.dev` and `3.2.12-15.33.dev`" %} +{% assign verdesc = "development" %} +{% endcase %} -* **Supported versions:** Windows 10 and 11. -* **Supported architectures:** x64, IA32, ARM64.
    - Support for ARM64 is in preview, and is available only in the dev and beta channels. +### {{channel}} channel -### Linux +Dart publishes a new release to the *{{chnl}}* channel about every three months. +The current {{chnl}} version is {{current}}. -* **Supported versions:** [Debian stable][] and [Ubuntu LTS][] under standard support. -* **Supported architectures:** x64, IA32, ARM64, ARM, RISC-V (RV64GC).
    - Support for RISC-V is in preview, and is available only in the dev and beta channels. +Use **stable channel releases** for **production** environments. -### macOS +**{{channel}}** channel release version strings follow a {{verstring}} format: -* **Supported versions:** Latest three major versions. -Dart supports the following macOS versions as of November 2023: - - macOS 12 (Monterey) - - macOS 13 (Ventura) - - macOS 14 (Sonoma) -* **Supported architectures:** x64, ARM64. +* `x` : major version +* `y` : minor version +* `z` : patch version +{%- if chnl != 'stable' %} +* `a` : {{verdesc}} version +* `b` : {{verdesc}} patch version +{% endif %} -## About release channels and version strings {#release-channels} +Examples of {{chnl}} channel version strings include {{examples}}. + +To install a {{chnl}} channel release, +{% if chnl != 'stable' %} +download the [SDK as a zip file][dl-sdk]. +{% else %} +follow the [instructions on this page](#install) +{% endif %} -The Dart SDK has three release channels: - -* **Stable** channel: **stable releases**, updated roughly every three months; - currently `[calculating]`{:.build-rev-stable}. - - Stable releases are suitable for production use. - -* **Beta** channel: **preview releases**, usually updated every month; - currently `[calculating]`{:.build-rev-beta}. - - Beta channel builds are preview builds for the stable channel. We recommend - testing, but not releasing, your apps against beta to preview new features or - test compatibility with future releases. - -* **Dev** channel: **prereleases**, usually updated twice a week; - currently `[calculating]`{:.build-rev-dev}. - - Dev channel releases are the most current with latest changes, may be broken, - are unsupported, and may contain unvetted breaking changes. - -**Stable** channel releases of the Dart SDK have `x.y.z` version strings like -`1.24.3` and `2.1.0`. They consist of dot-separated integers, with no hyphens or -letters, where `x` is the major version, `y` is the minor version, and `z` is -the patch version. - -**Beta** and **dev** channel releases of the Dart SDK (non-stable releases) have -`x.y.z-a.b.` versions like `2.8.0-20.11.beta`. The part before the -hyphen follows the stable version scheme, `a` and `b` after the hyphen are the -prerelease and prerelease patch versions, and `beta` or `dev` is the channel. - -You can get stable channel releases using -the [instructions above](#install), or you can -get stable, beta, or dev channel releases -using [a package manager][] or [Dart Docker image][], or -by [downloading the SDK as a zip file][]. +{% endfor -%} [SDK constraints]: /tools/pub/pubspec#sdk-constraints -[build the SDK from source]: https://github.com/dart-lang/sdk/wiki/Building +[build-source]: https://github.com/dart-lang/sdk/wiki/Building [Dart libraries]: /libraries -[Dart Docker image]: https://hub.docker.com/_/dart -[downloading the SDK as a zip file]: /get-dart/archive -[Debian stable]: https://www.debian.org/releases -[Ubuntu LTS]: https://wiki.ubuntu.com/Releases +[dart-docker]: https://hub.docker.com/_/dart +[dl-sdk]: /get-dart/archive [flutter]: https://flutter.dev/docs/get-started/install [site SDK version]: {{site.dart-api}}/{{site.data.pkg-vers.SDK.channel}}/{{site.data.pkg-vers.SDK.vers}}/index.html [a package manager]: https://github.com/dart-lang/sdk/wiki/Installing-beta-and-dev-releases-with-brew,-choco,-and-apt-get