Skip to main content

Getting Started

This documentation covers the installation of the DCM Teams version. If you're not familiar with the tool capabilities, see the Core Concepts documentation.

Installation

The installation process is similar to the Dart SDK.

First, download the executable for your platform:

You can install the DCM executable using Chocolatey.

To install the executable:

C:/> choco install dcm

To upgrade the executable:

C:/> choco upgrade dcm

If you can't use the executables, add it to your PATH:

  1. In the Windows search box, type env.
  2. Click Edit the system environment variables.
  3. Click Environment Variables….
  4. In the user variable section, select Path and click Edit….
  5. Click New, and enter the path to the executable.
  6. In each window that you just opened, click Apply or OK to dismiss it and apply the path change.

You can also download the .zip archive with executable from our GitHub.


And then install the VS Code extension or IntelliJ / Android Studio plugin (depending on what IDE you use).

System requirements:

  • 64-bit Windows OS, Linux OS or macOS system
  • Installed Dart / Flutter SDK

Activating the license

In order to use DCM for Teams, after the installation of the executable and the IDE extension it's required to activate the tool. This is a one time operation.

To activate the license use dcm activate --license-key=YOUR_KEY CLI command or IDEs extension command DCM: Activate license key.

note

Licenses activation is calculated per device, so attempts to activate a license multiple times on the same device won't subtract the activations count.

Running executable on CI/CD

In order to run commands on CI, instead of using dcm activate it is expected that each command will be called with --ci-key and --email arguments. For example, dcm analyze --ci-key=YOUR_CI_KEY --email=LICENSE_EMAIL.

Migrating from Individuals version

If you're migrating from the Individuals version, follow these steps:

  1. Remove DCM as your package dependency.
  2. Remove DCM from the plugins section of the analysis_options.yaml. All other configuration can be left unchanged.
  3. Instead of calling dart pub run dart_code_metrics:metrics analyze lib simply call dcm analyze lib.
  4. Update CI/CD to also call dcm executable.

If you any feedback about the migration process or the tool, please fill this form or send us a message.

Next Steps