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(
55
55
56
56
private fun getJarPath (libsDir : File ): File {
57
57
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 " ))
59
59
.filter { it.name.let {
60
60
it matches regex
61
61
&& ! it.endsWith(" -sources.jar" )
62
62
&& ! it.endsWith(" -javadoc.jar" )
63
63
&& ! it.endsWith(" -tests.jar" )}
64
64
&& ! 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 " )} " )
66
69
}
67
70
}
You can’t perform that action at this time.
0 commit comments