File tree 1 file changed +19
-2
lines changed 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ android {
6
6
7
7
defaultConfig {
8
8
applicationId " com.google.android.testdpc"
9
- minSdkVersion ' MNC '
10
- targetSdkVersion ' MNC '
9
+ minSdkVersion 21
10
+ targetSdkVersion 21
11
11
versionCode 1
12
12
versionName " 1.0"
13
13
}
@@ -21,6 +21,23 @@ android {
21
21
sourceCompatibility JavaVersion . VERSION_1_7
22
22
targetCompatibility JavaVersion . VERSION_1_7
23
23
}
24
+
25
+ /* TODO: remove once release version of M sdk is released */
26
+ def minVersion = defaultConfig. getMinSdkVersion(). getApiString()
27
+ def targetVersion = defaultConfig. getTargetSdkVersion(). getApiString()
28
+ applicationVariants. all { variant ->
29
+ variant. outputs. each { output ->
30
+ output. processManifest. doLast {
31
+ def manifestOutFile = output. processManifest. manifestOutputFile
32
+ def newFileContents = manifestOutFile. getText(' UTF-8' ).
33
+ replace(' android:minSdkVersion="MNC"' ,
34
+ ' android:minSdkVersion="' + minVersion + ' "' )
35
+ newFileContents = newFileContents. replace(' android:targetSdkVersion="MNC"' ,
36
+ ' android:targetSdkVersion="' + targetVersion + ' "' )
37
+ manifestOutFile. write(newFileContents, ' UTF-8' )
38
+ }
39
+ }
40
+ }
24
41
}
25
42
26
43
dependencies {
You can’t perform that action at this time.
0 commit comments