@@ -172,21 +172,15 @@ object DottyPlugin extends AutoPlugin {
172172
173173 scalaCompilerBridgeBinaryJar := Def .settingDyn {
174174 if (isDotty.value) Def .task {
175- val dottyBridgeArtifacts = fetchArtifactsOf(
175+ val updateReport = fetchArtifactsOf(
176176 scalaOrganization.value % " dotty-sbt-bridge" % scalaVersion.value,
177177 dependencyResolution.value,
178178 scalaModuleInfo.value,
179179 updateConfiguration.value,
180180 (unresolvedWarningConfiguration in update).value,
181181 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))
190184 }
191185 else Def .task {
192186 None : Option [File ]
@@ -380,7 +374,7 @@ object DottyPlugin extends AutoPlugin {
380374 updateReport.select(
381375 configurationFilter(Runtime .name),
382376 moduleFilter(organization, name, revision),
383- artifactFilter(extension = " jar" )
377+ artifactFilter(extension = " jar" , classifier = " " )
384378 )
385379 }
386380
0 commit comments