Arthur McGibbon
03/10/2025, 3:14 PMorg.gradle.api.tasks.testing.Test
) are in \.gradle\caches\8.13\transforms\be3b1a1bb33d55c586a2a5188fe96027\transformed\testing-jvm\org\gradle\api\tasks\testing\Test.java
(i.e. not in a sources-jar downloadable from a repository). How does it work this out? Is there a way to query the Gradle API for these source locations? Any ArtifactResolutionQuery
I do doesn't seem to bring this back. I'd like to be able to work out the Gradle sources for my buildSrc
projects which implicitly depend on gradleApi()
and localGroovy()
Adam
03/10/2025, 3:24 PM// buildSrc/build.gradle.kts
val logSrcs by tasks.registering {
val srcs = configurations.compileClasspath
.get()
.incoming
.artifactView {
attributes {
attribute(DocsType.DOCS_TYPE_ATTRIBUTE, objects.named(DocsType.SOURCES))
}
}
.files
doLast {
println(srcs.joinToString("\n"))
}
}
Arthur McGibbon
03/10/2025, 4:10 PM.gradle\caches\8.13\generated-gradle-jars\gradle-api-8.13.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-ant-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-astbuilder-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-console-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-datetime-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-dateutil-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-groovydoc-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-json-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-nio-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-sql-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-templates-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-test-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\groovy-xml-3.0.22.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\javaparser-core-3.17.0.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\kotlin-stdlib-2.0.21.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\kotlin-reflect-2.0.21.jar
.gradle\wrapper\dists\gradle-8.13-bin\5xuhj0ry160q40clulazy9h7d\gradle-8.13\lib\gradle-installation-beacon-8.13.jar
This is with a basic Gradle project using the java-gradle-plugin
pluginAdam
03/11/2025, 4:02 PMVampire
03/12/2025, 8:50 PM