Configurable Build scripts

Hi, I am wondering if it is possible to use variables to specify dependencies in build scripts. It seems to me that I can just refer to folder macros that can be relative but cannot use variables.
Is there any way to use some configuration value in the dependencies path?

0
4 comments
Avatar
Permanently deleted user

I should have used -D<folder macro>=<value>

0

What is the situation?

You have two projects and build script for each project. The second project depends on first one. You've built artifacts from the first project and now want to run second project's build script with artifacts already placed somewhere. Right?

Then you can use "artifact dependency" in build script instead of "normal' dependency. This means that you have to supply artifact location. And this location can be relative to the "folder" macros or relative to the current location. See the example (mpsJava build script). Here is dependncy on mpsBootstrapCore and on IDEA. The second uses only artifacts pointed.

 

{code}

build mpsJava generates mpsJava.xml

base directory: ../../../../

use plugins:
  java
  mps

macros:
  folder mps_home = .
  folder idea_home = <no defaultPath>

dependencies:
  mpsBootstrapCore
  IDEA (artifacts location $idea_home)

project structure:
  java options <project default>

......


{code}

0

Sorry, haven't seen your own anser. Yes, you can set folder macro with -D<var>=<value>. 

0
Avatar
Permanently deleted user

Thank you Michael!

0

Please sign in to leave a comment.