Sort Kotlin versions loaded from Maven by number

Otherwise we get 1.0.7 on top of 1.1.1, which is suboptimal
This commit is contained in:
Dmitry Jemerov
2017-03-20 19:42:42 +01:00
parent 8f8db75bb4
commit 04b64fa30c
@@ -48,6 +48,7 @@ import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -219,6 +220,7 @@ public class ConfigureDialogWithModulesAndVersion extends DialogWrapper {
finally {
urlConnection.disconnect();
}
Collections.sort(versions, VersionComparatorUtil.COMPARATOR.reversed());
// Handle the case when the new version has just been released and the Maven search index hasn't been updated yet
if (!ConfigureKotlinInProjectUtilsKt.isEap(bundledRuntimeVersion) && !KotlinPluginUtil.isSnapshotVersion() &&