How to exclude a plugin from development environment in Grails 3?

300 views Asked by At

I would like to disable a specific plugin while running in development mode. Is there a generic way to achieve this in Grails 3.x?

I found the following solutions for Grails 2.x, but they won't work for Grails 3 since it uses Gradle instead of BuildConfig.groovy:

Specifically, I am looking for a way to disable the LDAP sub-plugin for the Spring Security plugin, when running in local development mode.

UPDATE: I found that org.grails.plugins.DefaultGrailsPlugin has an isEnabled method, that returns a boolean based on whether the plugin's profiles list matches the set of active profiles (e.g. "development").

But the private method that initalizes the profiles list (evaluateProfiles) appears not to be called anywhere (it should probably be called in initialisePlugin, along with other evaluate* methods).

0

There are 0 answers