@@ -12,7 +12,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
12
12
private static VALUES_DIRNAME = "values" ;
13
13
private static VALUES_VERSION_DIRNAME_PREFIX = AndroidProjectService . VALUES_DIRNAME + "-v" ;
14
14
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" ;
16
16
private static REQUIRED_DEV_DEPENDENCIES = [
17
17
{ name : "babel-traverse" , version : "^6.4.5" } ,
18
18
{ name : "babel-types" , version : "^6.4.5" } ,
@@ -118,10 +118,8 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
118
118
}
119
119
this . copy ( this . platformData . projectRoot , frameworkDir , "build.gradle settings.gradle gradle.properties build-tools" , "-Rf" ) ;
120
120
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" ) ;
125
123
126
124
this . cleanResValues ( targetSdkVersion , frameworkVersion ) ;
127
125
@@ -158,11 +156,6 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
158
156
} ) . future < any > ( ) ( ) ;
159
157
}
160
158
161
- private useGradleWrapper ( frameworkDir : string ) : boolean {
162
- let gradlew = path . join ( frameworkDir , "gradlew" ) ;
163
- return this . $fs . exists ( gradlew ) ;
164
- }
165
-
166
159
private cleanResValues ( targetSdkVersion : number , frameworkVersion : string ) : void {
167
160
let resDestinationDir = this . getAppResourcesDestinationDirectoryPath ( frameworkVersion ) ;
168
161
let directoriesInResFolder = this . $fs . readDirectory ( resDestinationDir ) ;
@@ -228,7 +221,6 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
228
221
229
222
public updatePlatform ( currentVersion : string , newVersion : string , canUpdate : boolean , addPlatform ?: Function , removePlatforms ?: ( platforms : string [ ] ) => IFuture < void > ) : IFuture < boolean > {
230
223
return ( ( ) => {
231
- // TODO: plamen5kov: drop support for project older than 1.3.0(MIN_RUNTIME_VERSION_WITH_GRADLE)
232
224
if ( semver . eq ( newVersion , AndroidProjectService . MIN_RUNTIME_VERSION_WITH_GRADLE ) ) {
233
225
let platformLowercase = this . platformData . normalizedPlatformName . toLowerCase ( ) ;
234
226
removePlatforms ( [ platformLowercase . split ( "@" ) [ 0 ] ] ) . wait ( ) ;
@@ -249,7 +241,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
249
241
buildOptions . unshift ( "--debug" ) ;
250
242
}
251
243
buildOptions . unshift ( "buildapk" ) ;
252
- let gradleBin = this . useGradleWrapper ( projectRoot ) ? path . join ( projectRoot , "gradlew" ) : "gradle" ;
244
+ let gradleBin = path . join ( projectRoot , "gradlew" ) ;
253
245
if ( this . $hostInfo . isWindows ) {
254
246
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
255
247
}
@@ -399,7 +391,7 @@ export class AndroidProjectService extends projectServiceBaseLib.PlatformProject
399
391
buildOptions . unshift ( "clean" ) ;
400
392
401
393
let projectRoot = this . platformData . projectRoot ;
402
- let gradleBin = this . useGradleWrapper ( projectRoot ) ? path . join ( projectRoot , "gradlew" ) : "gradle" ;
394
+ let gradleBin = path . join ( projectRoot , "gradlew" ) ;
403
395
if ( this . $hostInfo . isWindows ) {
404
396
gradleBin += ".bat" ;
405
397
}
0 commit comments