Skip to content

Instantly share code, notes, and snippets.

Avatar

Benjamin Muschko bmuschko

View GitHub Profile
@bmuschko
bmuschko / cross-compile.sh
Created Jan 6, 2019
Go binary cross-compilation script
View cross-compile.sh
#!/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"
View sync.gradle
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 Feb 26, 2016
JarJar for Gradle API
View fat-jar.gradle
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 Dec 4, 2015
Creating an offline Maven repository with Gradle
View OfflineMavenRepository.groovy
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