Skip to content

Commit

Permalink
update platform howto guide
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuster23 committed May 14, 2024
1 parent 3d7f753 commit 2f3fb9f
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions docs/global/modules/platform/pages/howto/usage-platform.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@

The modelix platform provides component versions.
To enforce these versions in your project's build you can add the platform as an enforcedPlatform.
We make the following assumptions:

* the string variable `mps_version` contains the mps version that is used in your project, e.g. `2021-1`
* the string variable `modelix_platform_version` contains the version of the modelix platform you want to use, e. g. `23.1.0`
We assume the string variable `modelix_platform_version` contains the version of the modelix platform you want to use, e. g. `24.1.0`

To enforce the versions provided by the platform in your Gradle build, you can use `enforcedPlatform` inside of a `dependencies` block like this:

[source, kotlin]
--
dependencies {
implementation(enforcedPlatform("org.modelix:platform-mps-$mps_version:$modelix_platform_version"))
implementation(enforcedPlatform("org.modelix:platform:$modelix_platform_version"))
}
--

Expand All @@ -25,14 +22,11 @@ For example:
[source, kotlin]
--
dependencies {
implementation(enforcedPlatform("org.modelix:platform-mps-$mps_version:$modelix_platform_version"))
implementation(enforcedPlatform("org.modelix:platform:$modelix_platform_version"))
implementation("org.modelix:model-client")
}
--

NOTE: If you want to handle dependencies to MPS version-specific modelix components yourself, you can use `org.modelix:platform` instead, which does not contain these dependencies.
However, sometimes it might be necessary to pick a specific version of a single component, e.g. when one wants to test new features.

== Overriding versions

IMPORTANT: Overriding versions may lead to *incompatibilities* between individual modelix components.
Expand All @@ -42,7 +36,7 @@ In order to override versions inside the platform during dependency resolution,
[source, kotlin]
--
dependencies {
implementation(platform("org.modelix:platform-mps-$mps_version:$modelix_platform_version"))
implementation(platform("org.modelix:platform:$modelix_platform_version"))
implementation("org.modelix:model-client:2.4.0")
}
--
Expand Down

0 comments on commit 2f3fb9f

Please sign in to comment.