0

I am trying to change the name and the version setting when running the publish command? Here is my workflow.

I have written a custom input task. It is called with a three arguments name, buildNumber and exportLocation. We work with game and name is the name of a specific game. buildNumber is the changelist id of the game build in Perforce. exportLocation is a file path that contains a bunch of XML files that the Perforce build has output. My task parses the XML files, creates an in-memory object tree and serializes the tree into resourceManaged. In other words it will generate a bunch of resources.

My ultimate goal is to bundle those resources inside a jar-file that uses name and buildNumber in it's name and publish the artifact to our internal repository.

reikje
  • 2,850
  • 2
  • 24
  • 44
  • Can you give more detail about what effect you're trying to achieve. Perhaps show what you've tried, what it returned and what you expected. – Dale Wijnand Apr 17 '15 at 15:59
  • @DaleWijnand: I have updated my description to make a bit more clear. – reikje Apr 20 '15 at 08:57

1 Answers1

3

tl;dr It's not possible to change the value of Settings from Tasks since settings are immutable.

You cannot re-set settings since they are immutable unless you reload a project with the new values set. That's where commands can help as they operate on State in which Settings live.

See How to change setting inside SBT command? for an example of this.

Community
  • 1
  • 1
Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420