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 stageDir = buildDir.path + '/tmp/fatjar-stage/' | |
task fatjarStageClasses(type: Copy, dependsOn: classes){ | |
from sourceSets.main.output.classesDir | |
into stageDir | |
} | |
task fatjarStageResources(type: Copy, dependsOn: classes){ | |
from sourceSets.main.output.resourcesDir | |
into stageDir |
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
// GPars - Groovy Parallel Systems | |
// | |
// Copyright © 2008-11 The original author or authors | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// |
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 groovy.text.Template | |
import groovy.transform.CompileStatic | |
import org.codehaus.groovy.runtime.InvokerInvocationException | |
class GaelykTemplateServlet { | |
public static void main(String[] args) { | |
GaelykTemplateServlet servlet = new GaelykTemplateServlet() | |
servlet.init(true) |
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
package groovyx.gaelyk.datastore; | |
import java.util.ArrayList; | |
import java.util.List; | |
import com.google.appengine.api.datastore.DeleteContext; | |
import com.google.appengine.api.datastore.Entity; | |
import com.google.appengine.api.datastore.Key; | |
import com.google.appengine.api.datastore.PostDelete; | |
import com.google.appengine.api.datastore.PostPut; |
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
dependencies { | |
// eclipse compiler problem again :-( | |
String groovyVersion = '2.1.2' | |
if(project.hasProperty('groovy.2.1.eclipse.version')){ | |
groovyVersion = project.getProperty('groovy.2.1.eclipse.version') | |
} | |
groovy "org.codehaus.groovy:groovy-all:${groovyVersion}", { | |
force = true | |
} | |
} |
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
package test | |
import groovy.transform.CompileStatic | |
@CompileStatic | |
class GreclipseProblem { | |
List<Category> categories | |
int failToCompile(){ |
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
int width = null | |
int height = null | |
assert width.getClass() == org.codehaus.groovy.runtime.NullObject | |
assert height.getClass() == org.codehaus.groovy.runtime.NullObject | |
new File('image.png').image.transform { | |
resize width, height | |
} |
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 spock.lang.Shared | |
import spock.lang.Specification | |
import spock.lang.Unroll | |
import java.util.regex.Pattern | |
/** | |
* @author musketyr | |
*/ | |
class EmailValidatorSpec extends Specification { |
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
package com.example.com; | |
import java.io.File; | |
import java.io.IOException; | |
import java.net.URL; | |
import java.security.GeneralSecurityException; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; |
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
apply plugin: 'groovy' | |
apply plugin: 'war' | |
apply plugin: 'gaelyk' | |
apply plugin: 'idea' | |
appengine { | |
disableUpdateCheck = true | |
appcfg { | |
oauth2 = true | |
} |