This file contains 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/sh | |
readonly MAX_RETRY=10 | |
readonly DELAY_BETWEEN_TRY_IN_SECONDS=10 | |
readonly DEPENDENCY_CHECK_COMMAND=$1 | |
readonly CONTAINER_RUN_COMMAND=$2 | |
# wait until a command succeeds | |
# | |
# Usage: waitUntilReady "<command arg1...argN>" |
This file contains 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
abstract class CheckstyleReportAsCustomValueBuildService implements BuildService<CheckstyleReportAsCustomValueBuildService.Params>, OperationCompletionListener { | |
interface Params extends BuildServiceParameters { | |
ListProperty<FileSystemLocation> getReports() | |
Property<BuildScanExtension> getBuildScanApi() | |
} | |
@Override | |
void onFinish(FinishEvent finishEvent) { | |
if(finishEvent.getDescriptor().displayName.contains("checkstyle")){ |
This file contains 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 java.nio.file.Files | |
tasks.withType(JavaCompile) { | |
doLast { | |
def sizes = it.classpath.collect { | |
if (it.isFile()) { | |
return new FileSize(Files.size(it.toPath())/(1024*1024), "F ${it}") | |
} else { | |
return new FileSize(0, "D ${it}") | |
} |
This file contains 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
tasks.withType<JavaCompile>().configureEach { | |
doLast { | |
this.inputs.files.map { it -> | |
if(it.isFile) { | |
FileSize(it.length(), it.path) | |
} else { | |
FileSize(0, "DIR - " + it.path) | |
} | |
}.sortedBy { | |
it.size |
This file contains 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 java.nio.charset.Charset | |
import java.util.concurrent.TimeUnit | |
/** | |
* This Gradle script captures the processor architecture | |
* and adds these as a custom value. | |
* This should be applied to the root project: | |
* <code> apply from: file('gradle-processor-arch.gradle') </code> | |
*/ |
This file contains 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
// This normalization block should be combined with the Android cache fix plugin | |
// https://github.com/gradle/android-cache-fix-gradle-plugin#applying-the-plugin | |
normalization { | |
runtimeClasspath { | |
// See https://github.com/gradle/android-cache-fix-gradle-plugin/issues/341 for more details | |
ignore '**/java/lang/invoke/**' | |
} | |
} |
This file contains 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
val libraryFingerprint by tasks.registering(LibraryFingerprint::class) { | |
inputFiles.from(sourceSets["main"].output) | |
} | |
tasks.named("build").configure { | |
dependsOn(libraryFingerprint) | |
} | |
abstract class LibraryFingerprint : DefaultTask() { |
This file contains 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 | |
geUrl=$1 | |
bearerToken=$2 | |
since=$3 | |
customKey=$4 | |
customValue=$5 | |
rm -f $0.out.txt | |
function processBuilds() { |
This file contains 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 | |
outputFile=$0.out.csv | |
rm -f $outputFile | |
while getopts ":u:t:s:k:v:p:" opt; do | |
case $opt in | |
u) geUrl="$OPTARG" | |
;; | |
t) bearerToken="$OPTARG" |
This file contains 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
package com.gradle; | |
import com.gradle.maven.extension.api.GradleEnterpriseApi; | |
import com.gradle.maven.extension.api.cache.BuildCacheApi; | |
import com.gradle.maven.extension.api.cache.MojoMetadataProvider; | |
import com.gradle.maven.extension.api.scan.BuildScanApi; | |
import org.apache.maven.artifact.DependencyResolutionRequiredException; | |
import org.apache.maven.model.Resource; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
OlderNewer