Skip to content

Instantly share code, notes, and snippets.

Gabe Hamilton gabehamilton

  • Denver, CO
View GitHub Profile
View external_configuration_in_grails_3.md

External configuration in Grails 3


Working on Grails 3 I realized that I no longer can specify external configuration using the standard grails.config.locations property in Config.groovy file.

Reason is obvious! There is no Config.groovy now in Grails 3. Instead we now use application.yml to configure the properties. However, you can't specify the external configuration using this file too!

What the hack?

Now Grails 3 uses Spring's property source concept. To enable external config file to work we need to do something extra now.

View dojo-mobile-base-with-views
<!DOCTYPE html>
<html>
<head>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Your Application Name</title>
<!-- Optionally hard code theme and remove deviceTheme below
<link href="//ajax.googleapis.com/ajax/libs/dojo/1.9.0/dojox/mobile/themes/iphone/iphone.css"
View dojo-mobile-min
<!DOCTYPE html>
<html>
<head>
<meta name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Your Application Name</title>
<!-- Optionally hard code theme and remove deviceTheme below
<link href="//ajax.googleapis.com/ajax/libs/dojo/1.9.0/dojox/mobile/themes/iphone/iphone.css"
@gabehamilton
gabehamilton / wrapGroovyScriptInGradle.sh
Last active Dec 16, 2015
Full gradle setup to wrap a groovy script.
View wrapGroovyScriptInGradle.sh
# 1. Install gvm
curl -s get.gvmtool.net | bash
source "~/.gvm/bin/gvm-init.sh" # will vary depending on your Operating System, read the output of gvm for the exact command
# 2. Install gradle
gvm install gradle
# 3. Grab a gradle project template
echo "apply from: 'http://www.tellurianring.com/projects/gradle-plugins/gradle-templates/apply.groovy'" > build.gradle
You can’t perform that action at this time.