@@ -12,7 +12,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
1212 private static VALUES_DIRNAME = "values" ;
1313 private static VALUES_VERSION_DIRNAME_PREFIX = AndroidProjectService . VALUES_DIRNAME + "-v" ;
1414 private static ANDROID_PLATFORM_NAME = "android" ;
15- private static MIN_RUNTIME_VERSION_WITH_GRADLE = "1.3 .0" ;
15+ private static MIN_RUNTIME_VERSION_WITH_GRADLE = "1.5 .0" ;
1616 private static REQUIRED_DEV_DEPENDENCIES = [
1717 { name : "babel-traverse" , version : "^6.4.5" } ,
1818 { name : "babel-types" , version : "^6.4.5" } ,
@@ -118,10 +118,8 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
118118 }
119119 this . copy ( this . platformData . projectRoot , frameworkDir , "build.gradle settings.gradle gradle.properties build-tools" , "-Rf" ) ;
120120
121- if ( this . useGradleWrapper ( frameworkDir ) ) {
122- this . copy ( this . platformData . projectRoot , frameworkDir , "gradle" , "-R" ) ;
123- this . copy ( this . platformData . projectRoot , frameworkDir , "gradlew gradlew.bat" , "-f" ) ;
124- }
121+ this . copy ( this . platformData . projectRoot , frameworkDir , "gradle" , "-R" ) ;
122+ this . copy ( this . platformData . projectRoot , frameworkDir , "gradlew gradlew.bat" , "-f" ) ;
125123
126124 this . cleanResValues ( targetSdkVersion , frameworkVersion ) ;
127125
@@ -158,11 +156,6 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
158156 } ) . future < any > ( ) ( ) ;
159157 }
160158
161- private useGradleWrapper ( frameworkDir : string ) : boolean {
162- let gradlew = path . join ( frameworkDir , "gradlew" ) ;
163- return this . $fs . exists ( gradlew ) ;
164- }
165-
166159 private cleanResValues ( targetSdkVersion : number , frameworkVersion : string ) : void {
167160 let resDestinationDir = this . getAppResourcesDestinationDirectoryPath ( frameworkVersion ) ;
168161 let directoriesInResFolder = this . $fs . readDirectory ( resDestinationDir ) ;
@@ -228,7 +221,6 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
228221
229222 public updatePlatform ( currentVersion : string , newVersion : string , canUpdate : boolean , addPlatform ?: Function , removePlatforms ?: ( platforms : string [ ] ) => IFuture < void > ) : IFuture < boolean > {
230223 return ( ( ) => {
231- // TODO: plamen5kov: drop support for project older than 1.3.0(MIN_RUNTIME_VERSION_WITH_GRADLE)
232224 if ( semver . eq ( newVersion , AndroidProjectService . MIN_RUNTIME_VERSION_WITH_GRADLE ) ) {
233225 let platformLowercase = this . platformData . normalizedPlatformName . toLowerCase ( ) ;
234226 removePlatforms ( [ platformLowercase . split ( "@" ) [ 0 ] ] ) . wait ( ) ;
@@ -249,7 +241,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
249241 buildOptions . unshift ( "--debug" ) ;
250242 }
251243 buildOptions . unshift ( "buildapk" ) ;
252- let gradleBin = this . useGradleWrapper ( projectRoot ) ? path . join ( projectRoot , "gradlew" ) : "gradle" ;
244+ let gradleBin = path . join ( projectRoot , "gradlew" ) ;
253245 if ( this . $hostInfo . isWindows ) {
254246 gradleBin += ".bat" ; // cmd command line parsing rules are weird. Avoid issues with quotes. See https://github.com/apache/cordova-android/blob/master/bin/templates/cordova/lib/builders/GradleBuilder.js for another approach
255247 }
@@ -399,7 +391,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
399391 buildOptions . unshift ( "clean" ) ;
400392
401393 let projectRoot = this . platformData . projectRoot ;
402- let gradleBin = this . useGradleWrapper ( projectRoot ) ? path . join ( projectRoot , "gradlew" ) : "gradle" ;
394+ let gradleBin = path . join ( projectRoot , "gradlew" ) ;
403395 if ( this . $hostInfo . isWindows ) {
404396 gradleBin += ".bat" ;
405397 }
0 commit comments