plugins {
id "org.gradle.test-retry" version "1.4.0" apply false
}
def isCiServer = System.getenv().containsKey("CI")
gradle.beforeProject { p ->
p.pluginManager.withPlugin("java") {
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 com.google.gson.Gson | |
import com.google.gson.reflect.TypeToken | |
import java.io.File | |
fun main() { | |
// the project needs to execute the dependency-analysis plugin in order to generate the usage json files | |
val path = "PATH_TO_THE_PROJECT" | |
val references = getModuleUsages(path) |
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 | |
TOKEN="" # Develocity API token | |
TASK_PATH=":app:minifyDemoReleaseWithR8" # task path under investigation | |
URL="https://ge.solutions-team.gradle.com" # Develocity url | |
QUERY="query=user:runner requested:assembleRelease" # Query advanced search: https://docs.gradle.com/enterprise/api-manual/#advanced_search_syntax | |
# Using `requested:assembleRelease` to filter build scans only requesting this type of build | |
MAX_BUILDS=50 | |
json_ids=$(curl -s --location -G "$URL/api/builds?maxBuilds=$MAX_BUILDS&reverse=true" \ |
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 com.google.devtools.ksp.gradle.KspTaskJvm | |
buildscript { | |
repositories { | |
google() | |
mavenCentral() | |
// Android Build Server | |
maven { url = uri("../nowinandroid-prebuilts/m2repository") } | |
} |
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
type metric main k2 | |
:app-nia-catalog:compileDebugKotlin Compiler code generation 956.59 2754.76 | |
:app-nia-catalog:compileDebugKotlin Analysis lines per second 270 386 | |
:app-nia-catalog:compileDebugKotlin Shrink and save current classpath snapshot after compilation 73.89 124.83 | |
:app-nia-catalog:compileDebugKotlin Load current classpath snapshot 15.97 27.27 | |
:app-nia-catalog:compileDebugKotlin Run compilation in Gradle worker 4000 4332.23 | |
:app-nia-catalog:compileDebugKotlin Sources compilation round 3646.6 3961.63 | |
:app-nia-catalog:compileDebugKotlin Run compilation 3989.38 4321.78 | |
:app-nia-catalog:compileDebugKotlin Incremental compilation in daemon 3940.88 4264.52 | |
:app-nia-catalog:compileDebugKotlin Total Gradle task time 4203.52 4541.3 |
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
FROM gradle/gradle-enterprise-test-distribution-agent:2.0.1 | |
USER 0 | |
RUN apt-get update \ | |
&& apt-get install -y wget \ | |
&& apt-get install -y unzip \ | |
&& rm -rf /var/lib/apt/lists/* | |
USER gradle | |
RUN mkdir -p /home/gradle/android-sdk | |
ENV ANDROID_HOME "/home/gradle/android-sdk" |
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 javax.inject.Inject | |
pluginManagement { | |
repositories { | |
gradlePluginPortal() | |
google() | |
mavenCentral() | |
} | |
} | |
plugins { |
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
<pluginManagement> | |
<plugins> | |
<plugin> | |
<groupId>com.gradle</groupId> | |
<artifactId>gradle-enterprise-maven-extension</artifactId> | |
<configuration> | |
<gradleEnterprise> | |
<plugins> | |
<plugin> | |
<groupId>com.diffplug.spotless</groupId> |
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
class Benford(sample: Array<BigInteger>) { | |
override fun toString() = str | |
private val firstDigits = IntArray(9) | |
private val count = sample.size.toDouble() | |
private val str: String | |
init { | |
for (n in sample) { | |
firstDigits[n.toString().substring(0, 1).toInt() - 1]++ |
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 CurlRequestValueSource : ValueSource<String, CurlRequestValueSource.Parameters> { | |
interface Parameters : ValueSourceParameters { | |
val server: Property<String> | |
} | |
@get:Inject | |
abstract val execOperations: ExecOperations | |
override fun obtain(): String { | |
return execOperations.exec { |
NewerOlder