Replace deprecated usages of max/min with maxOrNull/minOrNull
This commit is contained in:
+1
-1
@@ -431,7 +431,7 @@ open class KotlinMPPGradleProjectResolver : AbstractProjectResolverExtensionComp
|
||||
sourceSetToCompilationData[sourceSet.name]?.let { compilationDataRecords ->
|
||||
it.targetCompatibility = compilationDataRecords
|
||||
.mapNotNull { compilationData -> compilationData.targetCompatibility }
|
||||
.minWith(VersionComparatorUtil.COMPARATOR)
|
||||
.minWithOrNull(VersionComparatorUtil.COMPARATOR)
|
||||
|
||||
if (sourceSet.actualPlatforms.getSinglePlatform() == KotlinPlatform.NATIVE) {
|
||||
it.konanTargets = compilationDataRecords
|
||||
|
||||
+1
-1
@@ -109,7 +109,7 @@ class KlibInfoProvider(kotlinNativeHome: File) {
|
||||
1 -> candidates.single()
|
||||
else -> {
|
||||
// there are multiple components, let's take just the first one alphabetically
|
||||
candidates.minBy { it.getName(it.nameCount - 2).toString() }!!
|
||||
candidates.minByOrNull { it.getName(it.nameCount - 2).toString() }!!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user