Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Code that you can add to your app's BuildConfig to enable you to specify in-place plugins outside of source controlled files

View ExternalInPlacePlugin_BuildConfig.groovy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
def buildConfigFile = new File("${userHome}/.grails/${appName}-buildConfig.groovy")
if (buildConfigFile.exists()) {
println "Processing external build config at $buildConfigFile"
def slurpedBuildConfig = new ConfigSlurper().parse(buildConfigFile.toURL())
slurpedBuildConfig.grails.plugin.location.each { k, v ->
if (!new File(v).exists()) {
println "WARNING: Cannot load in-place plugin from ${v} as that directory does not exist."
} else {
println "Loading in-place plugin $k from $v"
grails.plugin.location."$k" = v
}
if (grailsSettings.projectPluginsDir?.exists()) {
grailsSettings.projectPluginsDir.eachDirMatch(~/${k}.*/) {dir ->
println "WARNING: Found a plugin directory at $dir that is a possible conflict and may prevent grails from using the in-place $k plugin."
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.