Skip to content

Instantly share code, notes, and snippets.

Avatar

Andres Almiray aalmiray

View GitHub Profile
View gist:d6f7581bbb5b706f46b9
// install GVM
curl -s get.gvmtool.net | bash
// create an Afterburner.fx project
lazybones create afterburnerfx sample
cd sample
// run it with gradle
./gradlew clean run
@aalmiray
aalmiray / gist:350e8886ae0b73078e6b
Created Jun 26, 2014
Resolving griffon plugins from BOM files
View gist:350e8886ae0b73078e6b
dependencies {
griffonPlugin 'org.codehaus.griffon.plugins:griffon-datasource-plugin:1.0.0.BETA'
compile "org.codehaus.griffon:griffon-swing:$griffonVersion"
compile "org.codehaus.griffon:griffon-guice:$griffonVersion"
runtime('log4j:log4j:1.2.17') {
exclude group: 'ant', module: 'ant-nodeps'
exclude group: 'ant', module: 'ant-junit'
exclude group: 'ant-contrib', module: 'ant-contrib'
View ApplicationEventHandler.groovy
package org.example
import griffon.core.GriffonApplication
import griffon.core.event.EventHandler
import javax.annotation.Nonnull
class ApplicationEventHandler implements EventHandler {
void onBootstrapStart(@Nonnull GriffonApplication application) {
if (application.startupArgs.length > 0) {
View gist:324fc564516456e733a8
testCompile - Compile classpath for source set 'test'.
+--- junit:junit:4.11
| \--- org.hamcrest:hamcrest-core:1.3
+--- com.google.guiceberry:guiceberry:3.3.1
| \--- com.google.guava:guava-testlib:14.0.1
| +--- com.google.guava:guava:14.0.1
| +--- junit:junit:4.8.2 -> 4.11 (*)
| \--- org.truth0:truth:0.10
| +--- com.google.guava:guava:13.0 -> 14.0.1
| \--- junit:junit:4.8.2 -> 4.11 (*)
View dolphin-compile-static-error
$ gradle clean test
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy UP-TO-DATE
:buildSrc:processResources UP-TO-DATE
:buildSrc:classes UP-TO-DATE
:buildSrc:jar UP-TO-DATE
:buildSrc:assemble UP-TO-DATE
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy UP-TO-DATE
:buildSrc:processTestResources UP-TO-DATE
View gist:f39cfe6d4053d5aeb86a
$ gradle stats
:stats
+----------------------+-------+-------+
| Name | Files | LOC |
+----------------------+-------+-------+
| Groovy Sources | 4 | 28 |
| Java Sources | 1 | 2 |
| Groovy Test Sources | 1 | 16 |
| Models | 1 | 8 |
@aalmiray
aalmiray / build.gradle
Last active Aug 29, 2015
Gradle Glam: versions
View build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.ben-manes:gradle-versions-plugin:0.4'
}
}
@aalmiray
aalmiray / IsBlank.java
Last active Aug 29, 2015
Testing Services/Controllers in a Griffon JavaFX application
View IsBlank.java
package org.example;
import griffon.util.GriffonNameUtils;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import static org.hamcrest.core.IsNot.not;
public class IsBlank extends BaseMatcher<String> {
@aalmiray
aalmiray / ExampleExtensionRegistry.groovy
Last active Aug 29, 2015
Trivial Asciidoctor extension that demonstrates how one can write extensions inside a Gradle build
View ExampleExtensionRegistry.groovy
package org.asciidoctor.extension
import org.asciidoctor.Asciidoctor
import org.asciidoctor.extension.spi.ExtensionRegistry
class ExampleExtensionRegistry implements ExtensionRegistry {
void register(Asciidoctor asciidoctor) {
asciidoctor.javaExtensionRegistry().block 'pig-latin', PigLatinBlock
}
}
@aalmiray
aalmiray / build.gradle
Last active Aug 29, 2015
gradle + jbake 2.3.2 + asciidoctorj 1.5.1
View build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'me.champeau.gradle:jbake-gradle-plugin:0.2'
classpath 'org.jbake:jbake-core:2.3.2'
classpath 'org.asciidoctor:asciidoctorj:1.5.1'
}