Check version in desugar library configuration

Test: tools/archive.py --dry-run --dry-run-output ooo
Bug: 134732760
Change-Id: Iac8967775c8edff79f9851863059365c1fc452fb
diff --git a/tools/archive_desugar_jdk_libs.py b/tools/archive_desugar_jdk_libs.py
index 6edbd98..3ca25a6 100755
--- a/tools/archive_desugar_jdk_libs.py
+++ b/tools/archive_desugar_jdk_libs.py
@@ -55,12 +55,8 @@
       raise Exception('Version file '
           + VERSION_FILE + ' is expected to have exactly one line')
     version = lines[0].strip()
-    reg = re.compile('^([0-9]+)\\.([0-9]+)\\.([0-9]+)$')
-    if not reg.match(version):
-      raise Exception('Invalid version \''
-            + version
-            + '\' in version file '
-            + VERSION_FILE)
+    utils.check_basic_semver_version(
+        version, 'in version file ' + VERSION_FILE)
     return version