@@ -172,21 +172,15 @@ object DottyPlugin extends AutoPlugin {
172
172
173
173
scalaCompilerBridgeBinaryJar := Def .settingDyn {
174
174
if (isDotty.value) Def .task {
175
- val dottyBridgeArtifacts = fetchArtifactsOf(
175
+ val updateReport = fetchArtifactsOf(
176
176
scalaOrganization.value % " dotty-sbt-bridge" % scalaVersion.value,
177
177
dependencyResolution.value,
178
178
scalaModuleInfo.value,
179
179
updateConfiguration.value,
180
180
(unresolvedWarningConfiguration in update).value,
181
181
streams.value.log,
182
- ).allFiles
183
- val jars = dottyBridgeArtifacts.filter(art => art.getName.startsWith(" dotty-sbt-bridge" ) && art.getName.endsWith(" .jar" )).toArray
184
- if (jars.size == 0 )
185
- throw new MessageOnlyException (" No jar found for dotty-sbt-bridge" )
186
- else if (jars.size > 1 )
187
- throw new MessageOnlyException (s " Multiple jars found for dotty-sbt-bridge: ${jars.toList}" )
188
- else
189
- jars.headOption
182
+ )
183
+ Option (getJar(updateReport, scalaOrganization.value, " dotty-sbt-bridge" , scalaVersion.value))
190
184
}
191
185
else Def .task {
192
186
None : Option [File ]
@@ -380,7 +374,7 @@ object DottyPlugin extends AutoPlugin {
380
374
updateReport.select(
381
375
configurationFilter(Runtime .name),
382
376
moduleFilter(organization, name, revision),
383
- artifactFilter(extension = " jar" )
377
+ artifactFilter(extension = " jar" , classifier = " " )
384
378
)
385
379
}
386
380
0 commit comments