Skip to content

Instantly share code, notes, and snippets.

@cdsap
Created March 7, 2025 01:46
Show Gist options
  • Save cdsap/bb41bce7aae10ee66fab77d493ea1118 to your computer and use it in GitHub Desktop.
Save cdsap/bb41bce7aae10ee66fab77d493ea1118 to your computer and use it in GitHub Desktop.
Get Modules executed in a set Of builds
curl --location -G 'https://$DV_URL/api/builds?maxBuilds=50&models=gradle-build-cache-performance&reverse=true' --header "Authorization: Bearer $TOKEN" --data-urlencode 'query=project:nowinandroid_test gradle.requestedTasks:assembleDebug'
$RESPONSE | jq '[.[]
| {
id: .models.gradleBuildCachePerformance.model.id,
buildDuration: .models.gradleBuildCachePerformance.model.buildTime,
modules: (
(.models.gradleBuildCachePerformance.model.taskExecution // [])
| map(select(.taskType=="org.jetbrains.kotlin.gradle.tasks.KotlinCompile" and .avoidanceOutcome=="executed_cacheable")
| (.taskPath // "") | split(":")[:-1] | join(":")
)
| unique
)
}
]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment