@@ -21,6 +21,7 @@ description = "A tool to profile and benchmark Gradle builds"
21
21
22
22
val gradleRuntime by configurations.creating
23
23
val profilerPlugins by configurations.creating
24
+ val ideImplementation by configurations.creating
24
25
25
26
dependencies {
26
27
implementation(libs.toolingApi)
@@ -42,6 +43,7 @@ dependencies {
42
43
because(" To write JSON output" )
43
44
}
44
45
implementation(project(" :client-protocol" ))
46
+ implementation(project(" :ide-provisioning-api" ))
45
47
46
48
47
49
gradleRuntime(gradleApi())
@@ -52,6 +54,7 @@ dependencies {
52
54
profilerPlugins(project(" :studio-agent" ))
53
55
profilerPlugins(project(" :heap-dump" ))
54
56
profilerPlugins(project(" :studio-plugin" ))
57
+ ideImplementation(project(" :ide-provisioning" ))
55
58
56
59
runtimeOnly(" org.slf4j:slf4j-simple:1.7.10" )
57
60
testImplementation(libs.bundles.testDependencies)
@@ -87,13 +90,29 @@ val generateHtmlReportJavaScript = tasks.register<NpxTask>("generateHtmlReportJa
87
90
args.addAll(source.absolutePath, " --outfile" , output.get().asFile.absolutePath)
88
91
}
89
92
93
+ val listIdeProvisioningDependencies = tasks.register(" listIdeProvisioningDependencies" ) {
94
+ val input = ideImplementation.minus(gradleRuntime)
95
+ val output = project.layout.buildDirectory.file(" ide-provisioning/ide-provisioning.txt" )
96
+ inputs.files(input)
97
+ outputs.file(output)
98
+ doLast {
99
+ output.get().asFile.writeText(input.joinToString(" \n " ) { it.name })
100
+ }
101
+ }
102
+
90
103
tasks.processResources {
91
104
into(" META-INF/jars" ) {
92
105
from(profilerPlugins.minus(gradleRuntime)) {
93
106
// Removing the version from the JARs here, since they are referenced by name in production code.
94
107
rename(""" (.*)-\d\.\d.*\.jar""" , " ${' $' } 1.jar" )
95
108
}
96
109
}
110
+ into(" META-INF/jars" ) {
111
+ from(ideImplementation.minus(gradleRuntime))
112
+ }
113
+ into(" META-INF/classpath" ) {
114
+ from(listIdeProvisioningDependencies)
115
+ }
97
116
from(generateHtmlReportJavaScript)
98
117
}
99
118
0 commit comments