Skip to content

Instantly share code, notes, and snippets.

@breskeby
breskeby / gist:b8b420d1016e2b173202
Last active August 29, 2015 14:02
react on failed builds
// this needs some more logic to track "build failures". (e.g. via taskListener)
task pushWhenSuccess << {
// react on build successful
}
task resetOnFail << {
// react on build failed
}
@breskeby
breskeby / build.gradle
Last active August 29, 2015 14:05
Extending objects in NamedDomainObjectContainers (GRADLE)
import org.gradle.internal.reflect.Instantiator
class Host {
String name
Host(String name){
this.name = name
}
}
@breskeby
breskeby / gist:eb0a43caa0722b3ec8a7
Last active August 29, 2015 14:06
sample test spec for testing with gradle toolingapi and task options (tested with 2.1)
package org.acme
import org.gradle.tooling.BuildLauncher
import org.gradle.tooling.GradleConnector
import org.gradle.tooling.ProjectConnection
import org.junit.Rule
import org.junit.rules.TemporaryFolder
import spock.lang.Specification
/**
* Created by Rene on 11/09/14.
@breskeby
breskeby / build.gradle
Created September 23, 2014 19:29
whitelisted dependencies
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.1.1.RELEASE'
}
}
apply plugin: 'spring-boot'
@breskeby
breskeby / build.gradle
Created October 8, 2014 08:13
simple jaxb source generation with gradle
apply plugin:'idea'
apply plugin:'groovy'
repositories{
jcenter()
}
configurations{
jaxb
}
@breskeby
breskeby / build.gradle
Created October 8, 2014 08:14
overwrite idea gradle import defaults
apply plugin:'idea'
idea {
module {
outputDir = file('out')
testOutputDir = file('testout')
excludeDirs -= file('build')
excludeDirs += file('build/classes')
excludeDirs += file('build/libs')
excludeDirs += file('build/tmp')
}
@breskeby
breskeby / build.gralde
Created October 8, 2014 08:15
set language level explicitly
// root projects build.gradle file
apply plugin: 'idea'
idea {
project {
languageLevel = '1.6'
}
}
@breskeby
breskeby / windows1
Last active August 29, 2015 14:07
windows1 vs windows2
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\g++.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=mingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto --enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gmp-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)
COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.8.1/..

Keybase proof

I hereby claim:

  • I am breskeby on github.
  • I am breskeby (https://keybase.io/breskeby) on keybase.
  • I have a public key whose fingerprint is 6084 0C7C A23E 60CA 0C36 5FF9 74F9 F315 13E6 6B3F

To claim this, I am signing this object:

base:
'roles:build-vm-linux':
- match: pillar
- salt-minion
- common.limits
- common.base
- common.git
- common.network.hosts
- common.packages.base
- common.packages.java