This file contains hidden or 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
// code sample: | |
// | |
// multiply by 2 the row identifier | |
// output_row.id = input_row.id * 2; | |
// | |
// lowercase the name | |
// output_row.name = input_row.name.toLowerCase(); | |
java.util.Calendar cal = java.util.Calendar.getInstance(); | |
cal.setTime(input_row.ordered_at); |
This file contains hidden or 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('test-script', dependsOn: 'compileGroovy') << { | |
description = 'Runs a script in the context of the project' | |
ant.java(classname: 'com.augusttechgroup.somecode.script') { | |
classpath { | |
pathelement(path: sourceSets.main.classesDir) | |
sourceSets.main.runtimeClasspath.each { jarPath -> | |
pathelement(location: jarPath) | |
} | |
} | |
} |
This file contains hidden or 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
package com.augusttechgroup.somecode | |
println "This will run from Gradle, | |
and will have all the project's runtime | |
JARs and classes ripe for the picking""" |
This file contains hidden or 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
<createTable tableName="contact"> | |
<column name="id" type="bigint"> | |
<constraints primaryKey="true" | |
nullable="false" | |
autoIncrement="true"/> | |
</column> | |
<column name="first_name" type="varchar(50)" /> | |
<column name="middle_initial" type="varchar(5)" /> | |
<column name="last_name" type="varchar(50)" /> | |
<column name="gender" type="varchar(50)" /> |
This file contains hidden or 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
<createTable tableName="contact"> | |
<column name="id" type="bigint" autoIncrement="true"> | |
<constraints primaryKey="true" | |
nullable="false" /> | |
</column> | |
<column name="first_name" type="varchar(50)" /> | |
<column name="middle_initial" type="varchar(5)" /> | |
<column name="last_name" type="varchar(50)" /> | |
<column name="gender" type="varchar(50)" /> | |
<column name="email_address" type="varchar(100)" /> |
This file contains hidden or 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
<createTable tableName="contact"> | |
<column name="id" type="bigint" autoIncrement="true"> | |
<constraints primaryKey="true" | |
nullable="false" /> | |
</column> | |
<column name="first_name" type="varchar(50)" /> | |
<column name="middle_initial" type="varchar(5)" /> | |
<column name="last_name" type="varchar(50)" /> | |
<column name="gender" type="varchar(50)" /> | |
<column name="email_address" type="varchar(100)" /> |
This file contains hidden or 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
#!/usr/bin/env groovy | |
def objectDirs = [] | |
new File('.git/objects').eachDir { dir -> | |
if(dir.name.split('/')[-1] ==~ /[0-9a-f]{2}/) { | |
objectDirs << dir.absolutePath | |
} | |
} | |
def hashes = [] |
This file contains hidden or 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
#!/usr/bin/env ruby | |
class GitObject | |
attr_reader :git_type, :hash, :size | |
def initialize(hash, git_type, size) | |
@hash = hash | |
@git_type = git_type | |
@size = size | |
end |
This file contains hidden or 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 monkey(type: DefaultTask) | |
monkey.configure { | |
emotion = 'angry' | |
} | |
monkey.doLast { | |
println "The monkey is ${emotion}" | |
} |
This file contains hidden or 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
apply plugin: 'groovy' | |
import org.gradle.examples.liquibase.LiquibaseTask | |
import org.gradle.examples.liquibase.ChangeLogConverter | |
buildscript { | |
repositories { | |
mavenCentral() | |
} |
OlderNewer