android-bench-sample / tasks /efflora__fossify-viewmodel-layer /environment /bench-sources.init.gradle
android-bench-sample / tasks /efflora__fossify-viewmodel-layer /environment /bench-sources.init.gradle
Download tasks/efflora__fossify-viewmodel-layer/environment/bench-sources.init.gradle from efflora/android-bench-sample: direct link, hf CLI and curl.
- Browser
- Download file 1.53 kB
-
https://huggingface.co/datasets/efflora/android-bench-sample/resolve/main/tasks/efflora__fossify-viewmodel-layer/environment/bench-sources.init.gradle
- Command line
-
hf download hf://datasets/efflora/android-bench-sample/tasks/efflora__fossify-viewmodel-layer/environment/bench-sources.init.gradle
-
curl -L -o bench-sources.init.gradle https://huggingface.co/datasets/efflora/android-bench-sample/resolve/main/tasks/efflora__fossify-viewmodel-layer/environment/bench-sources.init.gradle
1.53 kB
| // Image build only (Dockerfile): puts the -sources.jar of the app's JitPack-hosted libraries (org.fossify:* and | |
| // com.github.*, direct and transitive, on the foss debug and release runtime classpaths) into the Gradle cache, so | |
| // they can be read offline the way an IDE shows a dependency's sources. Missing sources are listed, not fatal. | |
| allprojects { p -> | |
| p.afterEvaluate { | |
| if (p.path != ':app') return | |
| p.tasks.register('benchCacheSources') { | |
| doLast { | |
| def ids = new TreeSet<String>() | |
| ['fossDebugRuntimeClasspath', 'fossReleaseRuntimeClasspath'].each { name -> | |
| p.configurations.getByName(name).incoming.resolutionResult.allComponents.each { c -> | |
| def id = c.moduleVersion | |
| def group = id?.group ?: '' | |
| if (group == 'org.fossify' || group.startsWith('com.github.')) { | |
| ids << "${id.group}:${id.name}:${id.version}".toString() | |
| } | |
| } | |
| } | |
| ids.each { coord -> | |
| def cfg = p.configurations.detachedConfiguration(p.dependencies.create("${coord}:sources@jar".toString())) | |
| cfg.transitive = false | |
| def files = cfg.incoming.artifactView { lenient(true) }.files.files | |
| println(files ? "sources ${coord} -> ${files*.name.join(',')}" : "sources ${coord} -> none") | |
| } | |
| } | |
| } | |
| } | |
| } | |