Skip to content

Instantly share code, notes, and snippets.

Eric Wendelin eriwen

View GitHub Profile
View quarantine-tests.gradle.kts
var flakyTests = emptyList<String>()
if (project.file("flaky-tests.txt").exists()) {
flakyTests = project.file("flaky-tests.txt").readLines(Charset.defaultCharset())
}
tasks.test {
filter {
flakyTests.forEach(::excludeTestsMatching)
}
}
@eriwen
eriwen / multi-language-sample-adoc-macros.adoc
Last active May 13, 2020
Multi-language examples for asciidoctor, including all the intermediate transforms, CSS, and HTML, and asciidoc source
@eriwen
eriwen / multi-language-sample.html
Last active Oct 2, 2018
Multi-language code samples on the web
View multi-language-sample.html
<div class="exampleblock testable-sample multi-language-sample">
<div class="title">build.gradle</div>
<div class="content">
<pre class="prettyprint highlight"><code class="language-groovy" data-lang="groovy">logging.captureStandardOutput LogLevel.INFO
println 'A message which is logged at INFO level'</code></pre>
</div>
</div>
<div class="exampleblock testable-sample multi-language-sample">
<div class="title">build.gradle.kts</div>
@eriwen
eriwen / init.gradle
Created May 3, 2018
Fix stderr in plain console in Gradle 4.7
View init.gradle
rootProject {
def errorFile = file("${rootProject.buildDir}/errors.log")
def errorListener = new ErrorCapture(errorFile)
allprojects {
logging.addStandardErrorListener(errorListener)
tasks.all {
logging.addStandardErrorListener(errorListener)
}
}
}
@eriwen
eriwen / kotlin-hl.xml
Created Apr 13, 2018
Kotlin syntax highlighting config for xslthl
View kotlin-hl.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Syntax highlighting definition for Kotlin
xslthl - XSLT Syntax Highlighting
http://sourceforge.net/projects/xslthl/
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
This software is provided 'as-is', without any express or implied
@eriwen
eriwen / groovy-hl.xml
Created Apr 13, 2018
Groovy syntax highlighting config for xslthl
View groovy-hl.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Syntax highlighting definition for Groovy
xslthl - XSLT Syntax Highlighting
http://sourceforge.net/projects/xslthl/
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
This software is provided 'as-is', without any express or implied
@eriwen
eriwen / autofix_kotlin_dsl.zsh
Created Oct 30, 2017
Automatically fix Kotlin version declared in build.gradle.kts
View autofix_kotlin_dsl.zsh
#!/usr/bin/env zsh
OAUTH_HEADER="Authorization: token ${GITHUB_OAUTH_TOKEN}"
GITHUB_API_URL="https://api.github.com"
# List Repos that have a .kts file containing 'kotlin("jvm")'
AFFECTED_REPOS=$(curl -H "${OAUTH_HEADER}" "${GITHUB_API_URL}/search/code?q=kotlin%28jvm%29+extension%3Akts" | jq '.items[].repository.full_name' | sed -e 's/"//g' | sort | uniq)
typeset -A version_hash
version_hash=(4.3 1.1.51 4.2.1 1.1.4-3 4.2 1.1.4-3 4.1 1.1.3-2 4.0 1.1.0 3.5 1.1.0)
@eriwen
eriwen / gradle-internal-api-usage.sql
Last active Sep 1, 2017
Get most frequent usage of Gradle Internal APIs from BigQuery GitHub Data
View gradle-internal-api-usage.sql
SELECT
class,
COUNT(*) count
FROM (
SELECT
REGEXP_REPLACE(line, r'import |;', '') AS class,
c.id
FROM (
SELECT
SPLIT(c.content, '\n') line,
@eriwen
eriwen / github-labels-config.json
Created May 7, 2017
Configuration for github-labels node tool
View github-labels-config.json
[{
"name": "a:bug",
"color": "d93f0b"
}, {
"name": "a:chore",
"color": "1d76db"
}, {
"name": "a:feature",
"color": "0e8a16"
}, {
@eriwen
eriwen / Gradle Public API
Created Apr 17, 2017
Definition of Gradle Public API for versioning/regression testing purposes
View Gradle Public API
include 'org/gradle/*'
include 'org/gradle/api/**'
include 'org/gradle/authentication/**'
include 'org/gradle/buildinit/**'
include 'org/gradle/caching/**'
include 'org/gradle/external/javadoc/**'
include 'org/gradle/ide/**'
include 'org/gradle/ivy/**'
include 'org/gradle/jvm/**'
include 'org/gradle/language/**'
You can’t perform that action at this time.