You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/04/02 18:44:40 UTC

[GitHub] [cordova-android] wmramazan commented on a change in pull request #709: Android - Closes #708.

wmramazan commented on a change in pull request #709: Android - Closes #708.
URL: https://github.com/apache/cordova-android/pull/709#discussion_r271446021
 
 

 ##########
 File path: framework/cordova.gradle
 ##########
 @@ -78,19 +78,26 @@ int compareVersionList(Collection aParts, Collection bParts) {
     pairs.findResult(aParts.size()-bParts.size()) {it[0] - it[1] != 0 ? it[0] - it[1] : null}
 }
 
-// Compare two version strings, such as "19.0.0" and "18.1.1.0". If all matched
+// Compare two version strings, such as "19.0.0-rc1" and "18.1.1.0". If all matched
 // elements are identical, the longer version is the largest by this method.
 // Examples:
+//   "20.0.0-rc1" > "19.0.0"
 //   "19.0.0" > "19"
 //   "19.0.1" > "19.0.0"
 //   "19.1.0" > "19.0.1"
 //   "19" > "18.999.999"
 int compareVersions(String a, String b) {
+    a = removeTagOfReleaseLifeCycle(a)
+    b = removeTagOfReleaseLifeCycle(b)
 
 Review comment:
   Thanks for the review.
   
   I thought that Android SDK Manager will change the version string by removing the pre-release identifier after the release so we don't need to compare with pre-release identifiers. But some users may use all versions of build-tools for debugging.
   
   I don't know that the 3rd party libraries can be used for the solution. Is it acceptable for the project? It may cause vulnerability and reduce consistency.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org