This is an automated email from the ASF dual-hosted git repository.

steven pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-android.git


The following commit(s) were added to refs/heads/master by this push:
     new e9603b0  CB-13879 updated gradle plugin
e9603b0 is described below

commit e9603b07389472aa5ca610b3e1bb5553e5fe53f9
Author: Steve Gill <stevengil...@gmail.com>
AuthorDate: Wed Feb 14 16:54:06 2018 -0800

    CB-13879 updated gradle plugin
---
 framework/build.gradle                     |  2 +-
 node_modules/android-versions/index.js     | 73 +++++++++++++++---------------
 node_modules/android-versions/package.json | 48 ++++++++++----------
 3 files changed, 62 insertions(+), 61 deletions(-)

diff --git a/framework/build.gradle b/framework/build.gradle
index 8feed69..85dc2a5 100644
--- a/framework/build.gradle
+++ b/framework/build.gradle
@@ -31,7 +31,7 @@ buildscript {
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.0.0'
+        classpath 'com.android.tools.build:gradle:3.0.1'
         classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
         classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
     }
diff --git a/node_modules/android-versions/index.js 
b/node_modules/android-versions/index.js
index cedbaf6..6592926 100644
--- a/node_modules/android-versions/index.js
+++ b/node_modules/android-versions/index.js
@@ -30,41 +30,41 @@
  */
 
 var VERSIONS = {
-  BASE:                   { api: 1,     ndk: 0, semver: "1.0",   name: "(no 
code name)",     versionCode: "BASE" },
-  BASE_1_1:               { api: 2,     ndk: 0, semver: "1.1",   name: "(no 
code name)",     versionCode: "BASE_1_1" },
-  CUPCAKE:                { api: 3,     ndk: 1, semver: "1.5",   name: 
"Cupcake",            versionCode: "CUPCAKE" },
-  DONUT:                  { api: 4,     ndk: 2, semver: "1.6",   name: 
"Donut",              versionCode: "DONUT" },
-  ECLAIR:                 { api: 5,     ndk: 2, semver: "2.0",   name: 
"Eclair",             versionCode: "ECLAIR" },
-  ECLAIR_0_1:             { api: 6,     ndk: 2, semver: "2.0.1", name: 
"Eclair",             versionCode: "ECLAIR_0_1" },
-  ECLAIR_MR1:             { api: 7,     ndk: 3, semver: "2.1",   name: 
"Eclair",             versionCode: "ECLAIR_MR1" },
-  FROYO:                  { api: 8,     ndk: 4, semver: "2.2",   name: 
"Froyo",              versionCode: "FROYO" },
-  GINGERBREAD:            { api: 9,     ndk: 5, semver: "2.3",   name: 
"Gingerbread",        versionCode: "GINGERBREAD" },
-  GINGERBREAD_MR1:        { api: 10,    ndk: 5, semver: "2.3.3", name: 
"Gingerbread",        versionCode: "GINGERBREAD_MR1" },
-  HONEYCOMB:              { api: 11,    ndk: 5, semver: "3.0",   name: 
"Honeycomb",          versionCode: "HONEYCOMB" },
-  HONEYCOMB_MR1:          { api: 12,    ndk: 6, semver: "3.1",   name: 
"Honeycomb",          versionCode: "HONEYCOMB_MR1" },
-  HONEYCOMB_MR2:          { api: 13,    ndk: 6, semver: "3.2",   name: 
"Honeycomb",          versionCode: "HONEYCOMB_MR2" },
-  ICE_CREAM_SANDWICH:     { api: 14,    ndk: 7, semver: "4.0",   name: "Ice 
Cream Sandwich", versionCode: "ICE_CREAM_SANDWICH" },
-  ICE_CREAM_SANDWICH_MR1: { api: 15,    ndk: 8, semver: "4.0.3", name: "Ice 
Cream Sandwich", versionCode: "ICE_CREAM_SANDWICH_MR1" },
-  JELLY_BEAN:             { api: 16,    ndk: 8, semver: "4.1",   name: 
"Jellybean",          versionCode: "JELLY_BEAN" },
-  JELLY_BEAN_MR1:         { api: 17,    ndk: 8, semver: "4.2",   name: 
"Jellybean",          versionCode: "JELLY_BEAN_MR1" },
-  JELLY_BEAN_MR2:         { api: 18,    ndk: 8, semver: "4.3",   name: 
"Jellybean",          versionCode: "JELLY_BEAN_MR2" },
-  KITKAT:                 { api: 19,    ndk: 8, semver: "4.4",   name: 
"KitKat",             versionCode: "KITKAT" },
-  KITKAT_WATCH:           { api: 20,    ndk: 8, semver: "4.4",   name: "KitKat 
Watch",       versionCode: "KITKAT_WATCH" },
-  LOLLIPOP:               { api: 21,    ndk: 8, semver: "5.0",   name: 
"Lollipop",           versionCode: "LOLLIPOP" },
-  LOLLIPOP_MR1:           { api: 22,    ndk: 8, semver: "5.1",   name: 
"Lollipop",           versionCode: "LOLLIPOP_MR1" },
-  M:                      { api: 23,    ndk: 8, semver: "6.0",   name: 
"Marshmallow",        versionCode: "M" },
-  N:                      { api: 24,    ndk: 8, semver: "7.0",   name: 
"Nougat",             versionCode: "N" },
-  N_MR1:                  { api: 25,    ndk: 8, semver: "7.1",   name: 
"Nougat",             versionCode: "N_MR1" },
-  O:                      { api: 26,    ndk: 8, semver: "8.0.0", name: "Oreo", 
              versionCode: "O" }
+  BASE:                   { api: 1,     ndk: 0, semver: "1.0",               
name: "(no code name)",     versionCode: "BASE" },
+  BASE_1_1:               { api: 2,     ndk: 0, semver: "1.1",               
name: "(no code name)",     versionCode: "BASE_1_1" },
+  CUPCAKE:                { api: 3,     ndk: 1, semver: "1.5",               
name: "Cupcake",            versionCode: "CUPCAKE" },
+  DONUT:                  { api: 4,     ndk: 2, semver: "1.6",               
name: "Donut",              versionCode: "DONUT" },
+  ECLAIR:                 { api: 5,     ndk: 2, semver: "2.0",               
name: "Eclair",             versionCode: "ECLAIR" },
+  ECLAIR_0_1:             { api: 6,     ndk: 2, semver: "2.0.1",             
name: "Eclair",             versionCode: "ECLAIR_0_1" },
+  ECLAIR_MR1:             { api: 7,     ndk: 3, semver: "2.1",               
name: "Eclair",             versionCode: "ECLAIR_MR1" },
+  FROYO:                  { api: 8,     ndk: 4, semver: "2.2.x",             
name: "Froyo",              versionCode: "FROYO" },
+  GINGERBREAD:            { api: 9,     ndk: 5, semver: "2.3.0 - 2.3.2",     
name: "Gingerbread",        versionCode: "GINGERBREAD" },
+  GINGERBREAD_MR1:        { api: 10,    ndk: 5, semver: "2.3.3 - 2.3.7",     
name: "Gingerbread",        versionCode: "GINGERBREAD_MR1" },
+  HONEYCOMB:              { api: 11,    ndk: 5, semver: "3.0",               
name: "Honeycomb",          versionCode: "HONEYCOMB" },
+  HONEYCOMB_MR1:          { api: 12,    ndk: 6, semver: "3.1",               
name: "Honeycomb",          versionCode: "HONEYCOMB_MR1" },
+  HONEYCOMB_MR2:          { api: 13,    ndk: 6, semver: "3.2.x",             
name: "Honeycomb",          versionCode: "HONEYCOMB_MR2" },
+  ICE_CREAM_SANDWICH:     { api: 14,    ndk: 7, semver: "4.0.1 - 4.0.2",     
name: "Ice Cream Sandwich", versionCode: "ICE_CREAM_SANDWICH" },
+  ICE_CREAM_SANDWICH_MR1: { api: 15,    ndk: 8, semver: "4.0.3 - 4.0.4",     
name: "Ice Cream Sandwich", versionCode: "ICE_CREAM_SANDWICH_MR1" },
+  JELLY_BEAN:             { api: 16,    ndk: 8, semver: "4.1.x",             
name: "Jellybean",          versionCode: "JELLY_BEAN" },
+  JELLY_BEAN_MR1:         { api: 17,    ndk: 8, semver: "4.2.x",             
name: "Jellybean",          versionCode: "JELLY_BEAN_MR1" },
+  JELLY_BEAN_MR2:         { api: 18,    ndk: 8, semver: "4.3.x",             
name: "Jellybean",          versionCode: "JELLY_BEAN_MR2" },
+  KITKAT:                 { api: 19,    ndk: 8, semver: "4.4.0 - 4.4.4",     
name: "KitKat",             versionCode: "KITKAT" },
+  KITKAT_WATCH:           { api: 20,    ndk: 8, semver: "4.4",               
name: "KitKat Watch",       versionCode: "KITKAT_WATCH" },
+  LOLLIPOP:               { api: 21,    ndk: 8, semver: "5.0",               
name: "Lollipop",           versionCode: "LOLLIPOP" },
+  LOLLIPOP_MR1:           { api: 22,    ndk: 8, semver: "5.1",               
name: "Lollipop",           versionCode: "LOLLIPOP_MR1" },
+  M:                      { api: 23,    ndk: 8, semver: "6.0",               
name: "Marshmallow",        versionCode: "M" },
+  N:                      { api: 24,    ndk: 8, semver: "7.0",               
name: "Nougat",             versionCode: "N" },
+  N_MR1:                  { api: 25,    ndk: 8, semver: "7.1",               
name: "Nougat",             versionCode: "N_MR1" },
+  O:                      { api: 26,    ndk: 8, semver: "8.0.0",             
name: "Oreo",               versionCode: "O" },
+  O_MR1:                  { api: 27,    ndk: 8, semver: "8.1.0",             
name: "Oreo",               versionCode: "O_MR1" }
 }
 
-// This altSemVer accomodates the variations of semantic versions in the table 
above.
-// For instance, Oreo is 8.0.0 while N is 7.0, searching for "8.0" or "8.0.0" 
will
-// return Oreo, or searching for "7.0" or "7.0.0" will return N. "2.2.0" will 
return Froyo.
-function getAlternateSemVer(semver) {
-  if (semver.match(/\d+.\d+.0/)) {
-    return semver.replace(/.\d+$/, '')
-  } else if (semver.match(/^\d+.\d+$/)) {
+var semver = require('semver');
+
+// semver format requires <major>.<minor>.<patch> but we allow just 
<major>.<minor> format.
+// Coerce <major>.<minor> to <major>.<minor>.0
+function formatSemver(semver) {
+  if (semver.match(/^\d+.\d+$/)) {
     return semver + '.0'
   } else {
     return semver
@@ -82,9 +82,10 @@ function getFromDefaultPredicate(arg) {
       return true
     }
 
-    // Compare semver and alternate semver (see above).
-    var altSemVer = getAlternateSemVer(arg)
-    if (version.semver === arg || version.semver === altSemVer) {
+    let argSemver = formatSemver(arg);
+    let versionSemver = formatSemver(version.semver);
+
+    if (semver.valid(argSemver) && semver.satisfies(argSemver, versionSemver)) 
{
       return true
     }
 
diff --git a/node_modules/android-versions/package.json 
b/node_modules/android-versions/package.json
index 564f2a5..dbfccb7 100644
--- a/node_modules/android-versions/package.json
+++ b/node_modules/android-versions/package.json
@@ -2,69 +2,70 @@
   "_args": [
     [
       {
-        "raw": "android-versions@^1.2.1",
+        "raw": "android-versions@^1.3.0",
         "scope": null,
         "escapedName": "android-versions",
         "name": "android-versions",
-        "rawSpec": "^1.2.1",
-        "spec": ">=1.2.1 <2.0.0",
+        "rawSpec": "^1.3.0",
+        "spec": ">=1.3.0 <2.0.0",
         "type": "range"
       },
-      "/Users/jbowser/cordova/cordova-android"
+      "/Users/steveng/repo/cordova/cordova-android"
     ]
   ],
-  "_from": "android-versions@>=1.2.1 <2.0.0",
-  "_id": "android-versions@1.2.1",
+  "_from": "android-versions@>=1.3.0 <2.0.0",
+  "_id": "android-versions@1.3.0",
   "_inCache": true,
   "_location": "/android-versions",
-  "_nodeVersion": "8.0.0",
+  "_nodeVersion": "8.9.1",
   "_npmOperationalInternal": {
     "host": "s3://npm-registry-packages",
-    "tmp": "tmp/android-versions-1.2.1.tgz_1505373302036_0.5689644906669855"
+    "tmp": "tmp/android-versions-1.3.0.tgz_1516678569554_0.20621655881404877"
   },
   "_npmUser": {
     "name": "dvoiss",
     "email": "davidvo...@gmail.com"
   },
-  "_npmVersion": "5.4.0",
+  "_npmVersion": "5.5.1",
   "_phantomChildren": {},
   "_requested": {
-    "raw": "android-versions@^1.2.1",
+    "raw": "android-versions@^1.3.0",
     "scope": null,
     "escapedName": "android-versions",
     "name": "android-versions",
-    "rawSpec": "^1.2.1",
-    "spec": ">=1.2.1 <2.0.0",
+    "rawSpec": "^1.3.0",
+    "spec": ">=1.3.0 <2.0.0",
     "type": "range"
   },
   "_requiredBy": [
     "/"
   ],
-  "_resolved": 
"https://registry.npmjs.org/android-versions/-/android-versions-1.2.1.tgz";,
-  "_shasum": "3f50baf693e73a512c3c5403542291cead900063",
+  "_resolved": 
"https://registry.npmjs.org/android-versions/-/android-versions-1.3.0.tgz";,
+  "_shasum": "ce6f3eae2e165ce4ed49b89beb68014741093044",
   "_shrinkwrap": null,
-  "_spec": "android-versions@^1.2.1",
-  "_where": "/Users/jbowser/cordova/cordova-android",
+  "_spec": "android-versions@^1.3.0",
+  "_where": "/Users/steveng/repo/cordova/cordova-android",
   "author": {
     "name": "dvoiss"
   },
   "bugs": {
     "url": "https://github.com/dvoiss/android-versions/issues";
   },
-  "dependencies": {},
+  "dependencies": {
+    "semver": "^5.4.1"
+  },
   "description": "Get the name, API level, version level, NDK level, or 
version code from any version of Android.",
   "devDependencies": {
-    "jsdoc": "^3.4.0",
     "jshint": "^2.9.2",
     "tape": "^4.6.0"
   },
   "directories": {},
   "dist": {
-    "integrity": 
"sha512-k6zlrtWbJ3tx1ZsyyJ0Bo3r6cqPA3JUnFGv7pnIaLr1XVxSi2Tcem2lg3kBebFp27v/A40tZqdlouPyakpyKrw==",
-    "shasum": "3f50baf693e73a512c3c5403542291cead900063",
-    "tarball": 
"https://registry.npmjs.org/android-versions/-/android-versions-1.2.1.tgz";
+    "integrity": 
"sha512-d/i1G16Oaw/T1EvskUA7Oo1vIQVK/0ZlpQgZfYVBwg6v/9FBE3QV66g5N1/bTHpRml8tFLxh+KoTw5DokK9c+A==",
+    "shasum": "ce6f3eae2e165ce4ed49b89beb68014741093044",
+    "tarball": 
"https://registry.npmjs.org/android-versions/-/android-versions-1.3.0.tgz";
   },
-  "gitHead": "7e2def6e70634a4ebcaaa639a4c4955ae2a566e7",
+  "gitHead": "f9772c197a75709df703a2cf339b4427032b08d3",
   "homepage": "https://github.com/dvoiss/android-versions#readme";,
   "keywords": [
     "android",
@@ -95,9 +96,8 @@
     "url": "git+https://github.com/dvoiss/android-versions.git";
   },
   "scripts": {
-    "docs": "jsdoc index.js -d ./docs/ -R README.md --debug",
     "jshint": "jshint .",
     "test": "tape tests/**/*.js"
   },
-  "version": "1.2.1"
+  "version": "1.3.0"
 }

-- 
To stop receiving notification emails like this one, please contact
ste...@apache.org.

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

Reply via email to