This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Not sure if this causes issues elsewhere, but `test-app`, `run-app`, and `package` seem fine. The `packageApp()` method is called again in `loadApp()` so this one seems redundant. | |
Shaves off about a second for me on a larger app as it removes a redundant call. YMMV, put it back if you see any issues: | |
diff --git a/scripts/_GrailsBootstrap.groovy b/scripts/_GrailsBootstrap.groovy | |
index 4c44aa3..218a41a 100644 | |
--- a/scripts/_GrailsBootstrap.groovy | |
+++ b/scripts/_GrailsBootstrap.groovy | |
@@ -126,7 +126,7 @@ target(monitorApp:"Monitors an application for changes using the PluginMana | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias ipadchrome='open /Applications/Google\ Chrome.app --args -user-agent="Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def findResult (collection, closure) { | |
for ( value in collection) { | |
def result = closure(value) | |
if (result != null) return result | |
} | |
} | |
assert "5foo" == findResult([1, 2, 3, 4, 5, 6, 7]) { | |
if (it >= 5) return "${it}foo" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>English</string> | |
<key>CFBundleExecutable</key> | |
<string>TerminalColours</string> | |
<key>CFBundleIdentifier</key> | |
<string>sh.ciaranwal.terminal-colours</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// do this in the plugins doWithDynamic methods on each domain class: | |
def domainClass = grailsApplication.getDomainClass("Foo") | |
def clazz = domainClass.clazz | |
// prime the pump to get the GORM methods actually decorated and available on the meta class | |
clazz.count() | |
def oldSave = clazz.metaClass.getMetaMethod("save", [java.util.Map] as Class[]) | |
clazz.metaClass.save = { java.util.Map args -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// do this in the plugins doWithDynamic methods on each domain class: | |
def domainClass = grailsApplication.getDomainClass("Foo") | |
def clazz = domainClass.clazz | |
// prime the pump to get the GORM methods actually decorated and available on the meta class | |
clazz.count() | |
clazz.metaClass.invokeMethod = { String name, args -> | |
if (name == "save" && args[0] instanceof Map) { |
NewerOlder