Skip to content

Latest commit

 

History

History
71 lines (59 loc) · 4.17 KB

android-studio.asciidoc

File metadata and controls

71 lines (59 loc) · 4.17 KB
Table of Contents

android-studio

The android-studio commandlet allows to install, configure, and launch Android Studio. To launch Android Studio for your current workspace and devonfw-ide installation, simply run: devon android-studio

You may also supply additional arguments as devon android-studio «args». These are explained by the following table:

Table 1. Usage of devon android-studio
Argument(s) Meaning

--all

if provided as first arg then to command will be invoked for each workspace

setup

setup Android Studio (install or update)

add-plugin «id»

install an additional plugin

run

launch Android Studio (default if no argument is given)

start

same as run

ws-up[date]

update workspace

ws-re[verse]

reverse merge changes from workspace into settings

ws-reverse-add

reverse merge adding new properties

create-script

create launch script for this IDE, your current workspace and your OS

There are variables that can be used for Android Studio. These are explained by the following table:

Table 2. Variables of devonfw-ide for Android Studio
Variable Meaning

ANDROID_STUDIO_VERSION

The version of the tool Android Studio to install and use.

EXTRA_JAVA_VERSION

You can set this to a different (newer) version of Java used to launch your IDE (other than JAVA_VERSION that is used to build your project)

ANDROID_STUDIO_DISABLE_OPEN_WORKSPACE

true will disable that your workspace folder will be opened automatically (legacy behavior), false will enable to open your workspace folder. See #1358 for details.

plugins

To be productive with Android Studio you need plugins. Of course devonfw-ide can automate this for you: In your settings git repository create a folder android-studio/plugins (click this link to see more examples and see which plugins come by default). Here you can create a properties file for each plugin. This is an example scala.properties:

plugin_id=org.asciidoctor.intellij.asciidoc
plugin_active=false

The variables are defined as following:

  • plugin_id defines the unique ID of the plugin to install. If you want to customize devonfw-ide with new plugins use the search on https://plugins.jetbrains.com/androidstudio to find the plugin of your choice. Select the tab Versions and click on a version in the list. The plugin ID is displayed in the upper right corner. Copy & paste the ID from here to make up your own custom config.

  • plugin_active is an optional parameter. If it is true (default) the plugin will be installed automatically during the project setup for all developers in your team. Otherwise, developers can still install the plugin manually via devon android-studio add-plugin «plugin_id».

In general, you should try to stick with the configuration pre-defined by your project. But some plugins may be considered as personal flavor and are typically not predefined by the project config. Such plugins should be shipped with your settings as described above with plugin_active=false allowing you to easily install it manually. Surely, you can easily add plugins via the UI of Android Studio. However, be aware that some plugins may collect sensitive data or could introduce other vulnerabilities. So consider the governance of your project and talk to your technical lead before installing additional plugins that are not pre-defined in your settings.

As maintainer of the settings for your project you should avoid to ship too many plugins that may waste resources but are not used by every developer. By configuring additional plugins with plugin_active=false you can give your developers the freedom to install some additional plugins easily.