0

I have a backend system that connects to a database. During development I'd like to provide an in-memory persistence implementation that doesn't require a running database. In Android projects we can use build variants to have different binaries for different environments. This would allow me to build a jar for development purposes and one release jar.

Is there something similar for non-android projects?

There have been similar questions before but none of them provide up-to-date solutions. Please note that I do not want my final jar to contain the development implementation so a runtime switch is not an option.

Selim
  • 1,064
  • 11
  • 23
  • 2
    [This](https://stackoverflow.com/questions/40659986/maven-profiles-equivalent-of-gradle) should help. – Andrew S Dec 20 '19 at 14:29
  • @AndrewS thanks! That should work indeed but maybe there are ways that are supported by the IDE (like build variants). Additionally it requires that I have modules that I can include or exclude, unlike build variants. – Selim Dec 20 '19 at 14:32

0 Answers0