jeudi 17 août 2017

Gradle - environment specific dependency configuration

We have a Spring Boot based application that's set to run against MySQL. However we want to deploy a version of the application that runs against HSQLDB for end-to-end tests against.

I know how to toggle the database configurations using Spring profiles.

My problem is configuring the Gradle build to include the HSQLDB jars for the 'test' stack, but not include those jars for the default build. My research seems to be point to either custom dependency configurations or projects, but I haven't found a definitive answer at this point. Is there are way to toggle/configure the compile dependencies for the build target in Gradle?

Aucun commentaire:

Enregistrer un commentaire