Hi I am using ant to build a scala android project. It seems my ${scala_home} does not expand and I have to hard code the scala location. I obviously dont want to do this.
Any thoughts on what I may be doing incorrectly. It looks like no env variables are expanded in the script. I have tested this with < echo message=”${PATH}” / > and ${PATH}
Environment variables are not automatically available to be referenced as properties within an Ant build.
Two options for passing an environment variable to Ant:
For the first you might use:
Which would make set the
scala_homeproperty for the build.For the second you might use:
to specify the prefix, then you can see the value in this way:
If you somehow have a complex build.xml that relies on an un-prefixed property –
${scala_home}– then you could copy the value over from the environment using(Note that you may need to adjust case in environment variable names.)