Skip to content

Instantly share code, notes, and snippets.

View bmuschko's full-sized avatar

Benjamin Muschko bmuschko

View GitHub Profile
@bmuschko
bmuschko / cross-compile.sh
Created January 6, 2019 22:36
Go binary cross-compilation script
#!/usr/bin/env bash
HASH="$(git rev-parse --short HEAD)"
NAME="link-verifier"
VERSION="0.4"
DATE=$(date +%d-%m-%Y" "%H:%M:%S)
BUILD_DIR="build"
BUILD_TMP_DIR="$BUILD_DIR/tmp/$NAME-$VERSION"
BUILD_BIN_DIR="$BUILD_DIR/binaries"
BUILD_NIX_BIN_FILE="$BUILD_TMP_DIR/$NAME"
@bmuschko
bmuschko / sync.gradle
Created April 7, 2016 12:47
Gradle 2.13-rc1
initscript {
repositories {
mavenCentral()
}
dependencies {
// needed for syncSnapshot and syncStaging
classpath 'org.apache.maven.wagon:wagon-webdav-jackrabbit:2.10'
classpath 'commons-codec:commons-codec:1.10'
}
}
@bmuschko
bmuschko / fat-jar.gradle
Created February 26, 2016 15:45
JarJar for Gradle API
dependencies {
runtime project(':core')
runtime project(':dependencyManagement')
runtime project(':pluginUse')
runtime project(':toolingApi')
}
task jarJarJar(type: org.gradle.build.JarJarJar) {
ext.shadedPackage = 'org.gradle.jarjar'
from sourceSets.main.output
@bmuschko
bmuschko / OfflineMavenRepository.groovy
Created December 4, 2015 04:58
Creating an offline Maven repository with Gradle
package org.gradle.training
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.TaskAction
import org.gradle.api.DefaultTask
import org.gradle.util.GFileUtils
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.component.ModuleComponentIdentifier
import org.gradle.maven.MavenModule