Skip to content

Instantly share code, notes, and snippets.

View melix's full-sized avatar

Cédric Champeau melix

View GitHub Profile
@melix
melix / dump.gradle
Created October 30, 2019 12:23
Dumping constraints
import javax.inject.Inject
plugins {
id 'java-library'
}
repositories {
mavenCentral()
}
configurations {
@melix
melix / maven-bridge.gradle
Created October 30, 2019 08:55
Bridging with a Maven build
plugins {
id 'java-library'
// Maven publish is just for tests, it would be replaced by the plugin plugin
id 'maven-publish'
}
group = "com.foo"
version = "1.0"
repositories {
@melix
melix / gist:60cb5b9eff9ee49652457ce7339e9e67
Created February 15, 2019 12:35
Do NOT use the Debian version of Gradle
# This is a "fresh" install of Gradle using the Debian package
gradle --version
------------------------------------------------------------
Gradle 3.2.1
------------------------------------------------------------
Build time: 2012-12-21 00:00:00 UTC
Revision: none
@melix
melix / gist:3886c646361fe5e7aeb5588cdc7959b1
Created October 25, 2018 07:24
build scan error with 5.0-milestone-1
A build scan cannot be produced as an error occurred gathering build data.
Please report this problem via https://e.grdev.net/help and include the following via copy/paste:
----------
Gradle version: 5.0-milestone-1
Plugin version: 2.0
java.lang.NoClassDefFoundError: org/gradle/api/internal/tasks/execution/ExecuteTaskBuildOperationType$Details
at com.gradle.scan.plugin.internal.f.a.b(SourceFile:55)
at com.gradle.scan.plugin.internal.f.a.a(SourceFile:30)
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/**
* An approximate port of https://github.com/s-macke/VoxelSpace
* using Kotlin and JavaFX.
*
* Run with : kotlinc -script voxel.kts
*
* Click on the panel to "fly".
*
* Twitter: @CedricChampeau
*/
/**
* An approximate port of https://github.com/s-macke/VoxelSpace
* using static Groovy and JavaFX.
*
* Click on the panel to "fly".
*
* Run with : groovy voxel.groovy
*
* Twitter: @CedricChampeau
*/
@melix
melix / gist:02f5b93ec4daabadaca2d5148ad7188e
Created September 29, 2017 08:23
JDK 9 final ships with empty trust store
/opt/jdk9  ll ../jdk9-b176/lib/security/
total 256K
-rw-r--r-- 1 cchampeau cchampeau 4.0K Jun 29 03:47 blacklist
-rw-r--r-- 1 cchampeau cchampeau 1.3K Jun 29 03:47 blacklisted.certs
-rw-r--r-- 1 cchampeau cchampeau 111K Jun 29 03:47 cacerts
-rw-r--r-- 1 cchampeau cchampeau 8.5K Jun 29 03:47 default.policy
-rw-r--r-- 1 cchampeau cchampeau 122K Jun 29 03:47 public_suffix_list.dat
-rw-r--r-- 1 cchampeau cchampeau 0 Jun 29 03:47 trusted.libraries
/opt/jdk9  ll lib/security/
total 16K
@melix
melix / bench-string-concat.groovy
Created June 9, 2017 16:42
String concat Groovy
@Grab(group='org.gperfutils', module='gbench', version='0.4.3-groovy-2.4')
String a = 'The quick brown fox'
String b = 'jumps over the lazy dog'
int x = 1
double y = 2
benchmark {
'simple concat' {
String concat = a + ' ' + b + ' ' + x + ' ' + y