-
Notifications
You must be signed in to change notification settings - Fork 0
Gradle script usage
The script provide few ways to change its behavior through project parameters. The table below describe the parameters available.
| Argument | Description | Example |
|---|---|---|
| mpsDir | Directory of your MPS installation, if specified MPS will not be downloaded again. | -PmpsDir="./build/mps" |
| mpsVersion | Version of MPS used in the project (used to set the version number and determine which version of MPS to download if mpsDir is not set). | -PmpsVersion="2020.2" |
| jdk | Path the the Java 11 jdk. | -Pjdk="/home/me/mps/jbr" |
Here are the most common tasks you can use with the build script. Since some of them might depends on task you might already have done, do not hesitate to skip them later on (./gradlew buildDistribution -x buildLanguages).
| Task name | Description |
|---|---|
| resolveArtifacts | Resolve all artifacts Physics depends on. Include subtasks resolveOpensource, resolveMavenGenjs or buildGenjs and buildEcmascript (depending if found in maven) |
| buildLanguages | Create an IDEA plugin from the project. Includes resolveArtifacts. |
| buildDistribution | Create a standalone IDE from the project and its dependencies. Includes buildLanguages. |
| generateLibrariesXml | Create a libraries.xml file in the .mps directory, so that MPS can see the dependencies when opening the project. |
Plugin icon issues (related to MPS-25087)
In order to have the icons seen by MPS as a plugin. Replace in build.xml before running buildLanguages the two occurences of the following line :
<fileset dir="${basedir}/languages/jetbrains.mps.samples.Physics" includes="icons/**" />By the line below :
<zipfileset dir="${basedir}/languages/jetbrains.mps.samples.Physics/icons" includes="*.png" prefix="jetbrains/mps/samples/Physics/structure" />Note : running buildLanguages task will overwrite the build.xml file, so the replacement only work once. If you want to use a task that requires buildLanguages after the plugin is generated (for building the ide through buildDistribution for example), you need either to replace the content again or skip the task with -x buildLanguages.
Wiki todo : once MPS-25087 is fixed and things work, remove this section