Skip to content

Instantly share code, notes, and snippets.

Avatar

Rene Groeschke breskeby

View GitHub Profile
@breskeby
breskeby / build.gradle
Created Aug 8, 2019
non input system properties for test tasks
View build.gradle
tasks.withType(Test).configureEach { Test testTask ->
def nonInputs = new InconsequentialSystemProperty()
testTask.jvmArgumentProviders.add(nonInputs)
def nonInputSystemProperty = { String key, value ->
nonInputs.props.put(key, value)
}
testTask.extensions.extraProperties.set("nonInputSystemProperty", nonInputSystemProperty)
@breskeby
breskeby / multiproject-with-deprecations.gradle
Last active Feb 6, 2019
Example gradle multiproject with deprecated usage
View multiproject-with-deprecations.gradle
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.gradle:build-scan-plugin:2.1'
}
}
apply plugin: 'com.gradle.build-scan'
@breskeby
breskeby / build.gradle
Created Feb 14, 2018
multiple failures in composites
View build.gradle
apply plugin: 'java'
group "org.sample"
version "1.0"
dependencies {
compile "org.sample:included-Sub1:1.0"
compile "org.sample:included-Sub2:1.0"
}
gradle.buildFinished {
@breskeby
breskeby / build.gradle
Created Feb 10, 2018
accessing java targetCompatibility
View build.gradle
import org.gradle.api.JavaVersion;
import org.gradle.api.Plugin;
import org.gradle.api.Project;
import org.gradle.api.plugins.JavaPlugin;
import org.gradle.api.plugins.JavaPluginConvention;
import org.gradle.api.provider.Property;
import java.util.concurrent.Callable;
public class AcmePlugin implements Plugin<Project> {
@breskeby
breskeby / gist:b6b6d4cdd03cf5c79e222a3e7d8ea5b9
Last active Apr 20, 2017
slow gradle distribution debugging
View gist:b6b6d4cdd03cf5c79e222a3e7d8ea5b9
please provide output of
- Running “time curl -svo /dev/null https://downloads.gradle.org/distributions/gradle-3.5-all.zip”
- Running “time curl -svo /dev/null https://d2ueg53gsd9z3m.cloudfront.net/distributions/gradle-3.5-all.zip”
- Running “mtr --report https://downloads.gradle.org/distributions/”
- http://gradle.org/cdn-cgi/trace
@breskeby
breskeby / get-help.groovy
Last active Nov 9, 2016
buildscan recipe gist for creating topic on gradle forum
View get-help.groovy
buildScan.buildFinished { result ->
if(result.failure){
if(result.failure instanceof org.gradle.internal.exceptions.LocationAwareException){
if(result.failure.reportableCauses.size() >= 1) {
def reportMessage = result.failure.reportableCauses[0].message
buildScan.link("Create Gradle Forum Topic", createForumLink(reportMessage))
}
}
}
}
@breskeby
breskeby / gradle_releases.html
Created Jan 10, 2016
gradle release history
View gradle_releases.html
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart);
@breskeby
breskeby / java
Created Nov 29, 2015
java class letting fregedoc fail
View java
package org.frege.java;
public class StaticHello {
public static String helloJava() {
return "hello from java";
}
}
@breskeby
breskeby / gist:8828472a3096f81b3195
Created Nov 5, 2015
disable refresh of dynamicversions in gradle
View gist:8828472a3096f81b3195
configurations.all { resolutionStrategy.cacheDynamicVersionsFor Integer.MAX_VALUE, 'days' }
You can’t perform that action at this time.