@@ -97,7 +97,7 @@ class AndroidBuilder extends Builder {
9797 // we hook into the pre-validate event so that we can stop the build before
9898 // prompting if we know the build is going to fail.
9999 //
100- // this is also where we can detect android and jdk environments before
100+ // this is also where we can detect Android and JDK environments before
101101 // prompting occurs. because detection is expensive we also do it here instead
102102 // of during config() because there's no sense detecting if config() is being
103103 // called because of the help command.
@@ -110,13 +110,13 @@ class AndroidBuilder extends Builder {
110110
111111 async . series ( [
112112 function ( next ) {
113- // detect android environment
113+ // detect Android environment
114114 androidDetect ( config , { packageJson : _t . packageJson } , function ( androidInfo ) {
115115 _t . androidInfo = androidInfo ;
116116 assertIssue ( logger , androidInfo . issues , 'ANDROID_JDK_NOT_FOUND' ) ;
117117 assertIssue ( logger , androidInfo . issues , 'ANDROID_JDK_PATH_CONTAINS_AMPERSANDS' ) ;
118118
119- // if --android-sdk was not specified, then we simply try to set a default android sdk
119+ // if --android-sdk was not specified, then we simply try to set a default Android SDK
120120 if ( ! cli . argv [ 'android-sdk' ] ) {
121121 let androidSdkPath = config . android && config . android . sdkPath ;
122122 if ( ! androidSdkPath && androidInfo . sdk ) {
@@ -130,7 +130,7 @@ class AndroidBuilder extends Builder {
130130 } ,
131131
132132 function ( next ) {
133- // detect java development kit
133+ // detect JDK
134134 appc . jdk . detect ( config , null , function ( jdkInfo ) {
135135 assertIssue ( logger , jdkInfo . issues , 'JDK_NOT_INSTALLED' ) ;
136136 assertIssue ( logger , jdkInfo . issues , 'JDK_MISSING_PROGRAMS' ) ;
@@ -252,7 +252,7 @@ class AndroidBuilder extends Builder {
252252 } ) ) ;
253253 } ,
254254 validate : function ( value , callback ) {
255- // if there's a value, then they entered something, otherwise let the cli prompt
255+ // if there's a value, then they entered something, otherwise let the CLI prompt
256256 if ( value ) {
257257 const selectedAlias = value . toLowerCase ( ) ,
258258 alias = _t . keystoreAlias = _t . keystoreAliases . filter ( function ( a ) { return a . name && a . name . toLowerCase ( ) === selectedAlias ; } ) . shift ( ) ;
@@ -300,19 +300,19 @@ class AndroidBuilder extends Builder {
300300 } else if ( _t . androidInfo . sdk && _t . androidInfo . sdk . path === afs . resolvePath ( value ) ) {
301301 callback ( null , value ) ;
302302 } else {
303- // attempt to find android sdk
303+ // attempt to find Android SDK
304304 android . findSDK ( value , config , loadPackageJson ( __dirname ) , function ( ) {
305305
306- // NOTE: ignore errors when finding sdk , let gradle validate the sdk
306+ // NOTE: ignore errors when finding SDK , let gradle validate the SDK
307307
308308 function next ( ) {
309- // set the android sdk in the config just in case a plugin or something needs it
309+ // set the Android SDK in the config just in case a plugin or something needs it
310310 config . set ( 'android.sdkPath' , value ) ;
311311
312312 // path looks good, do a full scan again
313313 androidDetect ( config , { packageJson : _t . packageJson , bypassCache : true } , function ( androidInfo ) {
314314
315- // assume sdk is valid, let gradle validate the sdk
315+ // assume SDK is valid, let gradle validate the SDK
316316 if ( ! androidInfo . sdk ) {
317317 androidInfo . sdk = { path : value } ;
318318 }
@@ -322,8 +322,8 @@ class AndroidBuilder extends Builder {
322322 } ) ;
323323 }
324324
325- // new android sdk path looks good
326- // if we found an android sdk in the pre-validate hook, then we need to kill the other sdk 's adb server
325+ // new Android SDK path looks good
326+ // if we found an Android SDK in the pre-validate hook, then we need to kill the other SDK 's adb server
327327 if ( _t . androidInfo . sdk ) {
328328 new ADB ( config ) . stopServer ( next ) ;
329329 } else {
@@ -335,7 +335,7 @@ class AndroidBuilder extends Builder {
335335 } ,
336336 'avd-abi' : {
337337 abbr : 'B' ,
338- desc : 'the abi for the Android emulator; deprecated, use --device-id' ,
338+ desc : 'the ABI for the Android emulator; deprecated, use --device-id' ,
339339 hint : 'abi'
340340 } ,
341341 'avd-id' : {
@@ -462,15 +462,15 @@ class AndroidBuilder extends Builder {
462462 name = 'titanium_' + cli . argv [ 'avd-id' ] + '_' ;
463463
464464 if ( avds . length ) {
465- // try finding the first avd that starts with the avd id
465+ // try finding the first AVD that starts with the AVD id
466466 avds = avds . filter ( function ( avd ) {
467467 return avd . indexOf ( name ) === 0 ;
468468 } ) ;
469469 if ( avds . length === 1 ) {
470470 cli . argv [ 'device-id' ] = avds [ 0 ] ;
471471 return callback ( ) ;
472472 } else if ( avds . length > 1 ) {
473- // next try using the avd skin
473+ // next try using the AVD skin
474474 if ( ! cli . argv [ 'avd-skin' ] ) {
475475 // we have more than one match
476476 logger . error ( `Found ${ avds . length } avd${ avds . length === 1 ? '' : 's' } with id "${ cli . argv [ 'avd-id' ] } "` ) ;
@@ -499,7 +499,7 @@ class AndroidBuilder extends Builder {
499499 cli . argv [ 'device-id' ] = avds [ 0 ] ;
500500 return callback ( ) ;
501501 } else if ( ! cli . argv [ 'avd-abi' ] ) {
502- // we have more than one matching avd , but no abi to filter by so we have to error
502+ // we have more than one matching AVD , but no ABI to filter by so we have to error
503503 logger . error ( `Found ${
504504 avds . length
505505 } avd${ avds . length === 1 ? '' : 's' } with id "${
@@ -523,9 +523,9 @@ class AndroidBuilder extends Builder {
523523 } ) ;
524524 }
525525 if ( avds . length === 0 ) {
526- logger . error ( `No emulators found with id "${ cli . argv [ 'avd-id' ] } ", skin "${ cli . argv [ 'avd-skin' ] } ", and abi "${ cli . argv [ 'avd-abi' ] } "\n` ) ;
526+ logger . error ( `No emulators found with id "${ cli . argv [ 'avd-id' ] } ", skin "${ cli . argv [ 'avd-skin' ] } ", and ABI "${ cli . argv [ 'avd-abi' ] } "\n` ) ;
527527 } else {
528- // there is one or more avds , but we'll just return the first one
528+ // there is one or more AVDs , but we'll just return the first one
529529 cli . argv [ 'device-id' ] = avds [ 0 ] ;
530530 return callback ( ) ;
531531 }
@@ -536,7 +536,7 @@ class AndroidBuilder extends Builder {
536536
537537 logger . warn ( `${ '--avd-*' . cyan } options have been ${ 'deprecated' . red } , please use ${ '--device-id' . cyan } \n` ) ;
538538
539- // print list of available avds
539+ // print list of available AVDs
540540 if ( results . length && ! cli . argv . prompt ) {
541541 logger . log ( 'Available Emulators:' ) ;
542542 results . forEach ( function ( emu ) {
@@ -980,7 +980,7 @@ class AndroidBuilder extends Builder {
980980 logger . error ( 'The app id must consist only of letters, numbers, dashes, and underscores.' ) ;
981981 logger . error ( 'Note: Android does not allow dashes.' ) ;
982982 logger . error ( 'The first character must be a letter or underscore.' ) ;
983- logger . error ( 'Usually the app id is your company\'s reversed Internet domain name. (i.e . com.example.myapp)\n' ) ;
983+ logger . error ( 'Usually the app id is your company\'s reversed Internet domain name. (e.g . com.example.myapp)\n' ) ;
984984 process . exit ( 1 ) ;
985985 }
986986
@@ -989,7 +989,7 @@ class AndroidBuilder extends Builder {
989989 logger . error ( 'The app id must consist of letters, numbers, and underscores.' ) ;
990990 logger . error ( 'The first character must be a letter or underscore.' ) ;
991991 logger . error ( 'The first character after a period must not be a number.' ) ;
992- logger . error ( 'Usually the app id is your company\'s reversed Internet domain name. (i.e . com.example.myapp)\n' ) ;
992+ logger . error ( 'Usually the app id is your company\'s reversed Internet domain name. (e.g . com.example.myapp)\n' ) ;
993993 process . exit ( 1 ) ;
994994 }
995995
@@ -1033,7 +1033,7 @@ class AndroidBuilder extends Builder {
10331033 process . exit ( 1 ) ;
10341034 }
10351035
1036- // map sdk versions to sdk targets instead of by id
1036+ // map SDK versions to SDK targets instead of by id
10371037 const targetSDKMap = {
10381038 // placeholder for gradle to use
10391039 [ this . compileSdkVersion ] : {
@@ -1080,7 +1080,7 @@ class AndroidBuilder extends Builder {
10801080 process . exit ( 1 ) ;
10811081 }
10821082
1083- // validate the sdk levels
1083+ // validate the SDK levels
10841084 const usesSDK = this . customAndroidManifest ? this . customAndroidManifest . getUsesSdk ( ) : null ;
10851085
10861086 this . minSDK = this . minSupportedApiLevel ;
@@ -1111,7 +1111,7 @@ class AndroidBuilder extends Builder {
11111111 usesSDK . maxSdkVersion && ( this . maxSDK = usesSDK . maxSdkVersion ) ;
11121112 }
11131113
1114- // we need to translate the sdk to a real api level (i.e . L => 20, MNC => 22) so that
1114+ // we need to translate the SDK to a real API level (e.g . L => 20, MNC => 22) so that
11151115 // we can validate them
11161116 function getRealAPILevel ( ver ) {
11171117 return ( ver && targetSDKMap [ ver ] && targetSDKMap [ ver ] . sdk ) || ver ;
@@ -1120,7 +1120,7 @@ class AndroidBuilder extends Builder {
11201120 this . realTargetSDK = getRealAPILevel ( this . targetSDK ) ;
11211121 this . realMaxSDK = getRealAPILevel ( this . maxSDK ) ;
11221122
1123- // min sdk is too old
1123+ // min SDK is too old
11241124 if ( this . minSDK && this . realMinSDK < this . minSupportedApiLevel ) {
11251125 logger . error ( `The minimum supported SDK API version must be ${
11261126 this . minSupportedApiLevel
@@ -1156,7 +1156,7 @@ class AndroidBuilder extends Builder {
11561156 }
11571157
11581158 if ( this . targetSDK ) {
1159- // target sdk is too old
1159+ // target SDK is too old
11601160 if ( this . realTargetSDK < this . minTargetApiLevel ) {
11611161 logger . error ( `The target SDK API ${
11621162 this . targetSDK
@@ -1192,7 +1192,7 @@ class AndroidBuilder extends Builder {
11921192 process . exit ( 1 ) ;
11931193 }
11941194
1195- // target sdk < min sdk
1195+ // target SDK < min SDK
11961196 if ( this . realTargetSDK < this . realMinSDK ) {
11971197 logger . error ( `The target SDK API must be greater than or equal to the minimum SDK ${
11981198 this . minSDK
@@ -1211,7 +1211,7 @@ class AndroidBuilder extends Builder {
12111211 this . realTargetSDK = this . targetSDK ;
12121212 }
12131213
1214- // check that we have this target sdk installed
1214+ // check that we have this target SDK installed
12151215 this . androidTargetSDK = targetSDKMap [ this . targetSDK ] ;
12161216
12171217 if ( ! this . androidTargetSDK ) {
@@ -1784,7 +1784,7 @@ class AndroidBuilder extends Builder {
17841784 this . logger . info ( 'Profiler disabled' ) ;
17851785 }
17861786
1787- this . logger . info ( `Transpile javascript : ${ ( this . transpile ? 'true' : 'false' ) . cyan } ` ) ;
1787+ this . logger . info ( `Transpile JavaScript : ${ ( this . transpile ? 'true' : 'false' ) . cyan } ` ) ;
17881788 this . logger . info ( `Generate source maps: ${ ( this . sourceMaps ? 'true' : 'false' ) . cyan } ` ) ;
17891789 }
17901790
@@ -1854,15 +1854,15 @@ class AndroidBuilder extends Builder {
18541854 return true ;
18551855 }
18561856
1857- // if encryptJS changed, then we need to recompile the java files
1857+ // if encryptJS changed, then we need to recompile the Java files
18581858 if ( this . encryptJS !== manifest . encryptJS ) {
18591859 this . logger . info ( 'Forcing rebuild: JavaScript encryption flag changed' ) ;
18601860 this . logger . info ( ` Was: ${ manifest . encryptJS } ` ) ;
18611861 this . logger . info ( ` Now: ${ this . encryptJS } ` ) ;
18621862 return true ;
18631863 }
18641864
1865- // check if the titanium sdk paths are different
1865+ // check if the Titanium SDK paths are different
18661866 if ( this . platformPath !== manifest . platformPath ) {
18671867 this . logger . info ( 'Forcing rebuild: Titanium SDK path changed since last build' ) ;
18681868 this . logger . info ( ` Was: ${ manifest . platformPath } ` ) ;
@@ -2535,7 +2535,7 @@ class AndroidBuilder extends Builder {
25352535 combined = gather . mergeMaps ( allModulesResults ) ;
25362536
25372537 // Ok, so we have a Map<string, FileInfo> for the full set of unique relative paths
2538- // now categorize (i.e . lump into buckets of js/css/html/assets/generic resources)
2538+ // now categorize (e.g . lump into buckets of js/css/html/assets/generic resources)
25392539 const categorizer = new gather . Categorizer ( {
25402540 tiappIcon : this . tiapp . icon ,
25412541 jsFilesNotToProcess : Object . keys ( this . htmlJsFiles ) ,
@@ -2545,7 +2545,7 @@ class AndroidBuilder extends Builder {
25452545 }
25462546
25472547 /**
2548- * Optionally mifies the input css files and copies them to the app
2548+ * Optionally minifies the input CSS files and copies them to the app
25492549 * @param {Map<string,object> } files map from filename to file info
25502550 * @returns {Promise<void> }
25512551 */
@@ -2677,7 +2677,7 @@ class AndroidBuilder extends Builder {
26772677 } ) ;
26782678 await task . run ( ) ;
26792679 if ( this . useWebpack ) {
2680- // Merge Ti symbols from Webpack with the ones from legacy js processing
2680+ // Merge Ti symbols from Webpack with the ones from legacy JS processing
26812681 Object . keys ( task . data . tiSymbols ) . forEach ( file => {
26822682 const existingSymbols = this . tiSymbols [ file ] || [ ] ;
26832683 const additionalSymbols = task . data . tiSymbols [ file ] ;
@@ -2714,7 +2714,7 @@ class AndroidBuilder extends Builder {
27142714 }
27152715
27162716 /**
2717- * @param {string[] } jsBootstrapFiles list of bootstrap js files to add to listing we generate
2717+ * @param {string[] } jsBootstrapFiles list of bootstrap JS files to add to listing we generate
27182718 * @returns {Promise<void> }
27192719 */
27202720 async writeBootstrapJson ( jsBootstrapFiles ) {
@@ -2874,7 +2874,7 @@ class AndroidBuilder extends Builder {
28742874 throw new Error ( 'Could not load encryption library!' ) ;
28752875 }
28762876
2877- this . logger . info ( 'Encrypting javascript assets...' ) ;
2877+ this . logger . info ( 'Encrypting JavaScript assets...' ) ;
28782878
28792879 // NOTE: maintain 'build.android.titaniumprep' hook for remote encryption policy.
28802880 const hook = this . cli . createHook ( 'build.android.titaniumprep' , this , async function ( exe , args , opts , next ) {
0 commit comments