File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
binary-compatibility-validator/test Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,16 @@ class PublicApiTest(
5555
5656 private fun getJarPath (libsDir : File ): File {
5757 val regex = Regex (" $moduleName -.+\\ .jar" )
58- val files = (libsDir.listFiles() ? : throw Exception (" Cannot list files in $libsDir " ))
58+ var files = (libsDir.listFiles() ? : throw Exception (" Cannot list files in $libsDir " ))
5959 .filter { it.name.let {
6060 it matches regex
6161 && ! it.endsWith(" -sources.jar" )
6262 && ! it.endsWith(" -javadoc.jar" )
6363 && ! it.endsWith(" -tests.jar" )}
6464 && ! it.name.contains(" -metadata-" )}
65- return files.singleOrNull() ? : throw Exception (" No single file matching $regex in $libsDir :\n ${files.joinToString(" \n " )} " )
65+ if (files.size > 1 ) // maybe multiplatform?
66+ files = files.filter { it.name.startsWith(" $moduleName -jvm-" ) }
67+ return files.singleOrNull() ? :
68+ error(" No single file matching $regex in $libsDir :\n ${files.joinToString(" \n " )} " )
6669 }
6770}
You can’t perform that action at this time.
0 commit comments