Content :
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.json.JsonSlurper | |
import static java.nio.charset.Charset.defaultCharset | |
import static java.util.concurrent.TimeUnit.SECONDS | |
// Captures build and environment data and stores it in build scans via custom tags, links, | |
// and values, for one-off and trend analyses. | |
gradleEnterprise { | |
buildScan { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fingerprinter = services.get(org.gradle.internal.fingerprint.classpath.ClasspathFingerprinter) | |
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { task -> | |
doFirst { | |
ClassLoader classLoader = task.getClass().classLoader | |
while (classLoader instanceof URLClassLoader) { | |
def fingerprints = [] as Set | |
def allFiles = [] as Set | |
classLoader.getURLs().each { | |
fingerprints.add(["${task.path}:${file(it.file).name}", "${fingerprinter.fingerprint(files(it.file)).hash}"]) | |
allFiles.add(file(it.file)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project.properties.forEach { key, value -> | |
if (key.startsWith('android.injected')) { | |
println("$key:$value") | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
inner() { | |
local cmd="$@" | |
local REGEX="(^|log.showSignature=false )(add|rm|mv) " | |
if [[ $cmd =~ $REGEX ]]; then | |
echo 'Stopping IntelliJ from being a not well-behaved git client. See IDEA-194592, IDEA-63391, IDEA-176961, ...' >&2 | |
return 1 | |
fi | |
git "$@" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gson gson = new GsonBuilder() | |
.registerTypeAdapter(Date.class, new DateTypeAdapter()) | |
.setFieldNamingStrategy(new FieldNamingStrategy() { | |
@Override | |
public String translateName(Field f) { | |
if (f.getName().equals("stars")) { | |
return "stargazers_count"; | |
} else if (f.getName().equals("repositories")) { | |
return "items"; | |
} else { |