Skip to content

Instantly share code, notes, and snippets.

@xconnecting
xconnecting / myapp.jsmooth
Created July 3, 2013 05:33
JSmooth Setting Sample
<?xml version="1.0" encoding="ISO-8859-1"?>
<jsmoothproject>
<JVMSearchPath>registry</JVMSearchPath>
<JVMSearchPath>javahome</JVMSearchPath>
<JVMSearchPath>jrepath</JVMSearchPath>
<JVMSearchPath>jdkpath</JVMSearchPath>
<JVMSearchPath>exepath</JVMSearchPath>
<JVMSearchPath>jview</JVMSearchPath>
<classPath>lib\groovy-all-1.8.6.jar</classPath>
<embeddedJar>true</embeddedJar>
@xconnecting
xconnecting / build.gradle
Created July 3, 2013 05:32
[Gradle] JSmooth Sample
apply plugin: 'groovy'
apply plugin: 'eclipse'
archivesBaseName = 'myapp'
ext.jsmoothHome = 'C:/program Files/JSmooth 0.9.9-7'
configurations { jsmooth }
repositories{
@xconnecting
xconnecting / build.gradle
Last active April 5, 2017 03:52
[Gradle] Install Eclipse and Plugins
project.ext.tempDir = 'tmp'
project.ext.targetEclipseDir = 'd:/eclipse'
ant.condition(property: "os", value: "windows") { os(family: "windows") }
ant.condition(property: "os", value: "unix" ) { os(family: "unix") }
task clean << { delete 'tmp' }
task installEclipse << {
new File(tempDir).mkdirs()
@xconnecting
xconnecting / logback.xml
Created July 1, 2013 06:10
[Logback] logback.xml sample
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder
by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
%msg%n</pattern>
</encoder>
</appender>
@xconnecting
xconnecting / build.gradle
Last active December 18, 2015 18:49
[Gradle] Gradle Flyway Plugin sample
apply plugin: 'groovy'
apply plugin: 'flyway'
repositories { mavenCentral() }
dependencies {
compile localGroovy()
compile 'com.googlecode.flyway:flyway-core:2.1.1'
}
@xconnecting
xconnecting / build.gradle
Created June 20, 2013 08:02
[Gradle] Gradle Wrapper
task hello << {
println 'hello'
}
task wrapper(type: Wrapper) {
gradleVersion = '1.6'
}
@xconnecting
xconnecting / HelloSteps.groovy
Created June 10, 2013 06:36
[Groovy] cucumber-jvm-groovy sample (step definition - pending)
import cucumber.runtime.PendingException
this.metaClass.mixin(cucumber.runtime.groovy.Hooks)
this.metaClass.mixin(cucumber.runtime.groovy.EN)
Given(~'^I have a hello app with "([^"]*)"$') { String arg1 ->
// Express the Regexp above with the code you wish you had
throw new PendingException()
}
@xconnecting
xconnecting / build.gradle
Last active December 18, 2015 07:29
[Groovy] cucumber-jvm-groovy sample (gradle)
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'eclipse'
//build stuff
sourceCompatibility = 1.6
targetCompatibility = 1.6
configurations {
cucumberRuntime {
@xconnecting
xconnecting / Hello.groovy
Last active December 18, 2015 07:29
[Groovy] cucumber-jvm-groovy sample (implementation)
public class Hello {
String greeting;
public Hello(String greeting){
this.greeting = greeting
}
public String sayHi() {
return greeting + " World";
}
@xconnecting
xconnecting / HelloSteps.groovy
Last active December 18, 2015 07:29
[Groovy] cucumber-jvm-groovy sample (step definition)
this.metaClass.mixin(cucumber.runtime.groovy.Hooks)
this.metaClass.mixin(cucumber.runtime.groovy.EN)
Given(~'^I have a hello app with "([^"]*)"$') { String arg1 ->
hello = new Hello(arg1)
}
When(~'^I ask it to say hi$') { ->
hi = hello.sayHi();
}