File tree Expand file tree Collapse file tree 4 files changed +28
-6
lines changed
Expand file tree Collapse file tree 4 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,13 @@ import * as _ from "lodash";
1010
1111export class AndroidToolsInfo implements NativeScriptDoctor . IAndroidToolsInfo {
1212 public readonly ANDROID_TARGET_PREFIX = "android" ;
13- private getSupportedTargets ( projectDir : string ) {
13+ public getSupportedTargets ( projectDir : string ) {
1414 const runtimeVersion = this . getRuntimeVersion ( { projectDir} ) ;
1515 let baseTargets = [
1616 "android-17" ,
1717 "android-18" ,
1818 "android-19" ,
19+ "android-20" ,
1920 "android-21" ,
2021 "android-22" ,
2122 "android-23" ,
@@ -24,7 +25,8 @@ export class AndroidToolsInfo implements NativeScriptDoctor.IAndroidToolsInfo {
2425 "android-26" ,
2526 "android-27" ,
2627 "android-28" ,
27- "android-29"
28+ "android-29" ,
29+ "android-30"
2830 ] ;
2931
3032 if ( runtimeVersion && semver . lt ( semver . coerce ( runtimeVersion ) , "6.1.0" ) ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " nativescript-doctor" ,
3- "version" : " 1.14.1 " ,
3+ "version" : " 1.14.2 " ,
44 "description" : " Library that helps identifying if the environment can be used for development of {N} apps." ,
55 "main" : " lib/index.js" ,
66 "types" : " ./typings/nativescript-doctor.d.ts" ,
77 "scripts" : {
8- "test" : " node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- --recursive"
8+ "clean" : " npx rimraf node_modules package-lock.json && npm i && ./node_modules/.bin/grunt clean" ,
9+ "build" : " ./node_modules/.bin/grunt" ,
10+ "build.all" : " ./node_modules/.bin/grunt ts:devall" ,
11+ "pack" : " ./node_modules/.bin/grunt pack" ,
12+ "test" : " node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha -- --recursive" ,
13+ "changelog" : " conventional-changelog -p angular -i CHANGELOG.md -s"
914 },
1015 "repository" : {
1116 "type" : " git" ,
3338 "@types/winreg" : " 1.2.30" ,
3439 "@types/yauzl" : " 2.9.0" ,
3540 "chai" : " 4.1.2" ,
41+ "conventional-changelog-cli" : " ^2.0.34" ,
3642 "grunt" : " 1.0.3" ,
3743 "grunt-contrib-clean" : " 1.0.0" ,
3844 "grunt-contrib-watch" : " 1.1.0" ,
4450 "rimraf" : " 2.5.4" ,
4551 "tslint" : " 5.14.0" ,
4652 "tslint-microsoft-contrib" : " 6.1.0" ,
47- "typescript" : " 3.3.4000 "
53+ "typescript" : " ~3.8.3 "
4854 },
4955 "dependencies" : {
5056 "lodash" : " 4.17.15" ,
Original file line number Diff line number Diff line change @@ -75,6 +75,21 @@ describe("androidToolsInfo", () => {
7575 } ) ;
7676 } ) ;
7777
78+ describe ( "supportedAndroidSdks" , ( ) => {
79+ it ( "should support android-17 - android-30" , ( ) => {
80+ const min = 17 ;
81+ const max = 30 ;
82+ let cnt = 0 ;
83+ const androidToolsInfo = getAndroidToolsInfo ( "6.5.0" ) ;
84+ const supportedTargets = androidToolsInfo . getSupportedTargets ( "test" ) ;
85+ for ( let i = 0 ; i < supportedTargets . length ; i ++ ) {
86+ assert . equal ( supportedTargets [ i ] , `android-${ min + i } ` ) ;
87+ cnt = min + i ;
88+ }
89+ assert . equal ( cnt , max ) ;
90+ } ) ;
91+ } ) ;
92+
7893 describe ( "validateJavacVersion" , ( ) => {
7994 const testData : ITestData [ ] = [
8095 {
Original file line number Diff line number Diff line change 6666 true ,
6767 " check-branch" ,
6868 " check-decl" ,
69- " check-operator" ,
7069 " check-module" ,
7170 " check-separator"
7271 ]
You can’t perform that action at this time.
0 commit comments