Skip to content
Attila Kelemen edited this page Feb 14, 2017 · 3 revisions

General Description

You can find the properties of the project by bringing up the context menu of the project node (e.g.: right clicking on the project node) and selecting "Project Properties". These properties will affect every project in the same multi-project build of the project whose project properties were requested. As of plugin version 1.2.1 there are more pages you can set properties on. The configuration pages provided by this plugin will allow you to select a profile to which your configuration applies to. Configuration pages provided by other plugins or the core part of NetBeans will be saved to the default profile.

Profiles

There can be multiple profiles/configurations set for a Gradle project. Amongst the profiles there is always a default one ("<Default Profile>") and others can be freely added. Notice in the the "Inherit" checkbox next to each property in the project properties dialog. When you are editing a profile different to the default one and leave the "Inherit" box checked, it will inherit the value from the same property of the default profile (which might also inherit the "factory default"). The default profile property inheritance rule is different from property to property I will describe it in the description of the property.

Activating a profile

Note: Whatever you had last selected in the project properties dialog has no effect on the currently active profile. Also, active profile is shared across the projects of the same multi-project build.

  • You can select the profile in the combo box on the toolbar.
  • You can select the profile in the Run menu: Set project configuration

Global defaults

You can select the profile named "". Eventually, all profiles will inherit from this profile and this profile is shared across different projects. Selecting "inherit" for properties in this profile usually means that a default logic will be used to find a value for that property. For example, for target platform and source level, the default logic is to get the value from the build script of the project, so you should always select "inherit" for these properties in the global profile.

Storage of profiles

The properties of the default profile are stored in the ".nb-gradle-properties" file located in the directory where the "settings.gradle" is located (if there is none, then in the directory of the project).

The properties of additional profiles are stored in the ".nb-gradle/profiles" directory within the directory containing ".nb-gradle-properties". Each .profile file here is a profile where the name of the file is the name of the profile (note that this implies, that you can only give a name for the profile which is also a valid filename).