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
// since the missing task arguments, the plugins will be defined in gaelyk block | |
apply plugin: 'gaelyk' | |
gaelyk { | |
// during each build will be checked this plugins against installed and any missing | |
// will be installed automatically | |
apply git: 'https://github.com/bmuschko/gaelyk-datastore-viewer-plugin.git' | |
apply zip: 'path/to/zipped/plugin.zip' | |
// if I delete or comment some installed plugin, it will be uninstalled automatically |
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
task args | |
args.map = [:] | |
tasks.addRule("Pattern: <property>=<value>: Passes arguments to the scripts") { String taskName -> | |
def match = taskName =~ /(.*?)=(.*?$)/ | |
if(match){ | |
args.map[match[0][1]] = match[0][2] | |
task(taskName) << { | |
println "Used to pass value ${match[0][2]} to args.map.${match[0][1]}" | |
} |
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
import java.util.concurrent.Future; | |
// Things to discuss | |
// # are there any ways how to promote dsls to templates like gtpl? | |
// # are there any ways to check operators like left shift? | |
// # is there any way to handle generics like Key<Entity>? | |
// # how to handle closure parameters? | |
class EnvDescriptor { | |
String name |
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
import java.lang.reflect.Method; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Modifier; | |
import groovyx.gaelyk.GaelykCategory; | |
// scaffolds DSLD for category class to the system console | |
// setup |
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 shortcutFor = { type -> | |
currentType(type) & | |
enclosingScript(sourceFolderOfCurrentType('war/WEB-INF/groovy')) | |
} | |
shortcutFor('com.google.appengine.api.images.Image').accept { | |
provider = 'Gaelyk' | |
// contributions | |
} |
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
(sourceFolderOfCurrentType('war/WEB-INF/groovy') & enclosingScript()).accept { | |
provider = 'Gaelyk Groovlet' | |
property name: 'datastore', | |
type: 'com.google.appengine.api.datastore.DatastoreService' | |
// many more here | |
method name: 'forward', | |
type: 'void', | |
params: [path: 'java.lang.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
(enclosingCallName("transform") & | |
inClosure() & | |
enclosingCallDeclaringType('com.google.appengine.api.images.Image')).accept{ | |
provider = 'Gaelyk' | |
method name: 'feeling', | |
type: 'com.google.appengine.api.images.Image', | |
params: [lucky: boolean], | |
doc: 'Applies the "I\'m feeling lucky" transformation.' | |
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
class GSQL { | |
static SelectBuilder select(Object... what){ | |
SelectBuilder builder = [] | |
if(All.ALL in what){ | |
builder.all = true | |
} else { | |
builder.columns = what | |
} | |
builder | |
} |
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
@Canonical | |
class QueryBuilder { | |
String spreadsheet | |
String worksheet | |
String query | |
String order | |
String contains | |
boolean all |
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
@Canonical | |
class OrderBuilder{ | |
QueryBuilder queryBuilder | |
QueryBuilder column(int position){ | |
queryBuilder.order = '' + position | |
queryBuilder | |
} | |
OlderNewer