mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Bump targetSdkVersion to 31 and organize static values (#91719)
This commit is contained in:
parent
ff6f462095
commit
d7631275fe
2
.gitignore
vendored
2
.gitignore
vendored
@ -61,7 +61,7 @@ unlinked_spec.ds
|
|||||||
|
|
||||||
# Android related
|
# Android related
|
||||||
**/android/**/gradle-wrapper.jar
|
**/android/**/gradle-wrapper.jar
|
||||||
**/android/.gradle
|
.gradle/
|
||||||
**/android/captures/
|
**/android/captures/
|
||||||
**/android/gradlew
|
**/android/gradlew
|
||||||
**/android/gradlew.bat
|
**/android/gradlew.bat
|
||||||
|
@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_11
|
sourceCompatibility JavaVersion.VERSION_11
|
||||||
@ -27,8 +27,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "0.0.1"
|
versionName "0.0.1"
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -38,8 +38,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.example.macrobenchmarks"
|
applicationId "com.example.macrobenchmarks"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -27,8 +27,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "0.0.1"
|
versionName "0.0.1"
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -27,8 +27,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "0.0.1"
|
versionName "0.0.1"
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -27,8 +27,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "0.0.1"
|
versionName "0.0.1"
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -38,8 +38,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "io.flutter.examples.stocks"
|
applicationId "io.flutter.examples.stocks"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -49,7 +49,7 @@ android {
|
|||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.example.abstract_method_smoke_test"
|
applicationId "com.example.abstract_method_smoke_test"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -49,7 +49,7 @@ android {
|
|||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.example.android_embedding_v2_smoke_test"
|
applicationId "com.example.android_embedding_v2_smoke_test"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -27,8 +27,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "0.0.1"
|
versionName "0.0.1"
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -39,8 +39,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "io.flutter.integration.platformviews"
|
applicationId "io.flutter.integration.platformviews"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -5,13 +5,14 @@ found in the LICENSE file. -->
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="io.flutter.integration.platformviews">
|
package="io.flutter.integration.platformviews">
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:name="io.flutter.app.FlutterApplication"
|
android:name="io.flutter.app.FlutterApplication"
|
||||||
android:label="platform_views">
|
android:label="platform_views">
|
||||||
<activity
|
<activity
|
||||||
|
android:exported="true"
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
|
||||||
@ -21,8 +22,8 @@ found in the LICENSE file. -->
|
|||||||
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
|
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
|
||||||
android:value="true" />
|
android:value="true" />
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER"/>
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<!-- Don't delete the meta-data below.
|
<!-- Don't delete the meta-data below.
|
||||||
|
@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -27,8 +27,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "0.0.1"
|
versionName "0.0.1"
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ apply plugin: 'kotlin-android'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.java.srcDirs += 'src/main/kotlin'
|
main.java.srcDirs += 'src/main/kotlin'
|
||||||
@ -49,8 +49,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "io.flutter.integration.deferred_components_test"
|
applicationId "io.flutter.integration.deferred_components_test"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -28,8 +28,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "io.flutter.externalui"
|
applicationId "io.flutter.externalui"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -28,8 +28,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.yourcompany.flavors"
|
applicationId "com.yourcompany.flavors"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -49,8 +49,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "io.flutter.demo.gallery"
|
applicationId "io.flutter.demo.gallery"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -29,7 +29,7 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.yourcompany.flavors"
|
applicationId "com.yourcompany.flavors"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -39,8 +39,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "io.flutter.integration.platformviews"
|
applicationId "io.flutter.integration.platformviews"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -48,8 +48,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.example.non_nullable"
|
applicationId "com.example.non_nullable"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -27,8 +27,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "0.0.1"
|
versionName "0.0.1"
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -39,8 +39,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.example.release_smoke_test"
|
applicationId "com.example.release_smoke_test"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
@ -19,7 +19,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -27,8 +27,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -52,8 +52,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.example.manual_tests"
|
applicationId "com.example.manual_tests"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ apply plugin: 'kotlin-android'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -48,8 +48,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "dev.flutter.flutter_api_samples"
|
applicationId "dev.flutter.flutter_api_samples"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -38,8 +38,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "io.flutter.examples.flutter_view"
|
applicationId "io.flutter.examples.flutter_view"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -38,8 +38,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "io.flutter.examples.hello_world"
|
applicationId "io.flutter.examples.hello_world"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -39,8 +39,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.example.image_list"
|
applicationId "com.example.image_list"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -38,8 +38,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "io.flutter.examples.layers"
|
applicationId "io.flutter.examples.layers"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -38,8 +38,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "io.flutter.examples.platform_channel"
|
applicationId "io.flutter.examples.platform_channel"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -38,8 +38,8 @@ android {
|
|||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "io.flutter.examples.platform_view"
|
applicationId "io.flutter.examples.platform_view"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
|
// found in the LICENSE file.
|
||||||
|
|
||||||
import static groovy.io.FileType.FILES
|
import static groovy.io.FileType.FILES
|
||||||
|
|
||||||
import com.android.builder.model.AndroidProject
|
import com.android.builder.model.AndroidProject
|
||||||
@ -23,6 +27,27 @@ import org.gradle.api.tasks.bundling.Jar
|
|||||||
import org.gradle.internal.os.OperatingSystem
|
import org.gradle.internal.os.OperatingSystem
|
||||||
import org.gradle.util.VersionNumber
|
import org.gradle.util.VersionNumber
|
||||||
|
|
||||||
|
/** For apps only. Provides the flutter extension used in app/build.gradle. */
|
||||||
|
class FlutterExtension {
|
||||||
|
/** Sets the compileSdkVersion used by default in Flutter app projects. */
|
||||||
|
static int compileSdkVersion = 30
|
||||||
|
|
||||||
|
/** Sets the minSdkVersion used by default in Flutter app projects. */
|
||||||
|
static int minSdkVersion = 16
|
||||||
|
|
||||||
|
/** Sets the targetSdkVersion used by default in Flutter app projects. */
|
||||||
|
static int targetSdkVersion = 31
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specifies the relative directory to the Flutter project directory.
|
||||||
|
* In an app project, this is ../.. since the app's build.gradle is under android/app.
|
||||||
|
*/
|
||||||
|
String source
|
||||||
|
|
||||||
|
/** Allows to override the target file. Otherwise, the target is lib/main.dart. */
|
||||||
|
String target
|
||||||
|
}
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
@ -33,10 +58,15 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Some apps don't set default compile options.
|
||||||
|
* Apps can change these values in android/app/build.gradle.
|
||||||
|
* This just ensures that default values are set.
|
||||||
|
*/
|
||||||
android {
|
android {
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility 1.8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
targetCompatibility 1.8
|
targetCompatibility JavaVersion.VERSION_1_8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,19 +75,19 @@ apply plugin: FlutterPlugin
|
|||||||
class FlutterPlugin implements Plugin<Project> {
|
class FlutterPlugin implements Plugin<Project> {
|
||||||
private static final String DEFAULT_MAVEN_HOST = "https://storage.googleapis.com";
|
private static final String DEFAULT_MAVEN_HOST = "https://storage.googleapis.com";
|
||||||
|
|
||||||
// The platforms that can be passed to the `--Ptarget-platform` flag.
|
/** The platforms that can be passed to the `--Ptarget-platform` flag. */
|
||||||
private static final String PLATFORM_ARM32 = "android-arm";
|
private static final String PLATFORM_ARM32 = "android-arm";
|
||||||
private static final String PLATFORM_ARM64 = "android-arm64";
|
private static final String PLATFORM_ARM64 = "android-arm64";
|
||||||
private static final String PLATFORM_X86 = "android-x86";
|
private static final String PLATFORM_X86 = "android-x86";
|
||||||
private static final String PLATFORM_X86_64 = "android-x64";
|
private static final String PLATFORM_X86_64 = "android-x64";
|
||||||
|
|
||||||
// The ABI architectures.
|
/** The ABI architectures supported by Flutter. */
|
||||||
private static final String ARCH_ARM32 = "armeabi-v7a";
|
private static final String ARCH_ARM32 = "armeabi-v7a";
|
||||||
private static final String ARCH_ARM64 = "arm64-v8a";
|
private static final String ARCH_ARM64 = "arm64-v8a";
|
||||||
private static final String ARCH_X86 = "x86";
|
private static final String ARCH_X86 = "x86";
|
||||||
private static final String ARCH_X86_64 = "x86_64";
|
private static final String ARCH_X86_64 = "x86_64";
|
||||||
|
|
||||||
// Maps platforms to ABI architectures.
|
/** Maps platforms to ABI architectures. */
|
||||||
private static final Map PLATFORM_ARCH_MAP = [
|
private static final Map PLATFORM_ARCH_MAP = [
|
||||||
(PLATFORM_ARM32) : ARCH_ARM32,
|
(PLATFORM_ARM32) : ARCH_ARM32,
|
||||||
(PLATFORM_ARM64) : ARCH_ARM64,
|
(PLATFORM_ARM64) : ARCH_ARM64,
|
||||||
@ -65,9 +95,11 @@ class FlutterPlugin implements Plugin<Project> {
|
|||||||
(PLATFORM_X86_64) : ARCH_X86_64,
|
(PLATFORM_X86_64) : ARCH_X86_64,
|
||||||
]
|
]
|
||||||
|
|
||||||
// The version code that gives each ABI a value.
|
/**
|
||||||
// For each APK variant, use the following versions to override the version of the Universal APK.
|
* The version code that gives each ABI a value.
|
||||||
// Otherwise, the Play Store will complain that the APK variants have the same version.
|
* For each APK variant, use the following versions to override the version of the Universal APK.
|
||||||
|
* Otherwise, the Play Store will complain that the APK variants have the same version.
|
||||||
|
*/
|
||||||
private static final Map ABI_VERSION = [
|
private static final Map ABI_VERSION = [
|
||||||
(ARCH_ARM32) : 1,
|
(ARCH_ARM32) : 1,
|
||||||
(ARCH_ARM64) : 2,
|
(ARCH_ARM64) : 2,
|
||||||
@ -75,18 +107,20 @@ class FlutterPlugin implements Plugin<Project> {
|
|||||||
(ARCH_X86_64) : 4,
|
(ARCH_X86_64) : 4,
|
||||||
]
|
]
|
||||||
|
|
||||||
// When split is enabled, multiple APKs are generated per each ABI.
|
/** When split is enabled, multiple APKs are generated per each ABI. */
|
||||||
private static final List DEFAULT_PLATFORMS = [
|
private static final List DEFAULT_PLATFORMS = [
|
||||||
PLATFORM_ARM32,
|
PLATFORM_ARM32,
|
||||||
PLATFORM_ARM64,
|
PLATFORM_ARM64,
|
||||||
PLATFORM_X86_64,
|
PLATFORM_X86_64,
|
||||||
]
|
]
|
||||||
|
|
||||||
// The name prefix for flutter builds. This is used to identify gradle tasks
|
/**
|
||||||
// where we expect the flutter tool to provide any error output, and skip the
|
* The name prefix for flutter builds. This is used to identify gradle tasks
|
||||||
// standard Gradle error output in the FlutterEventLogger. If you change this,
|
* where we expect the flutter tool to provide any error output, and skip the
|
||||||
// be sure to change any instances of this string in symbols in the code below
|
* standard Gradle error output in the FlutterEventLogger. If you change this,
|
||||||
// to match.
|
* be sure to change any instances of this string in symbols in the code below
|
||||||
|
* to match.
|
||||||
|
*/
|
||||||
static final String FLUTTER_BUILD_PREFIX = "flutterBuild"
|
static final String FLUTTER_BUILD_PREFIX = "flutterBuild"
|
||||||
|
|
||||||
private Project project
|
private Project project
|
||||||
@ -293,7 +327,7 @@ class FlutterPlugin implements Plugin<Project> {
|
|||||||
getPluginDependencies().each this.&configurePluginDependencies
|
getPluginDependencies().each this.&configurePluginDependencies
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adds the plugin project dependency to the app project .
|
/** Adds the plugin project dependency to the app project. */
|
||||||
private void configurePluginProject(String pluginName, String _) {
|
private void configurePluginProject(String pluginName, String _) {
|
||||||
Project pluginProject = project.rootProject.findProject(":$pluginName")
|
Project pluginProject = project.rootProject.findProject(":$pluginName")
|
||||||
if (pluginProject == null) {
|
if (pluginProject == null) {
|
||||||
@ -337,19 +371,19 @@ class FlutterPlugin implements Plugin<Project> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns `true` if the given path contains an `android/build.gradle` file.
|
/**
|
||||||
//
|
* Returns `true` if the given path contains an `android/build.gradle` file.
|
||||||
// TODO(egarciad): Fix https://github.com/flutter/flutter/issues/39657.
|
*/
|
||||||
// Android Studio may create empty android directories due to the logic in <app>/android/settings.gradle,
|
|
||||||
// which imports all plugins regardless of whether they support the android platform.
|
|
||||||
private Boolean doesSupportAndroidPlatform(String path) {
|
private Boolean doesSupportAndroidPlatform(String path) {
|
||||||
File editableAndroidProject = new File(path, 'android' + File.separator + 'build.gradle')
|
File editableAndroidProject = new File(path, 'android' + File.separator + 'build.gradle')
|
||||||
return editableAndroidProject.exists()
|
return editableAndroidProject.exists()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the dependencies on other plugin projects to the plugin project.
|
/**
|
||||||
// A plugin A can depend on plugin B. As a result, this dependency must be surfaced by
|
* Add the dependencies on other plugin projects to the plugin project.
|
||||||
// making the Gradle plugin project A depend on the Gradle plugin project B.
|
* A plugin A can depend on plugin B. As a result, this dependency must be surfaced by
|
||||||
|
* making the Gradle plugin project A depend on the Gradle plugin project B.
|
||||||
|
*/
|
||||||
private void configurePluginDependencies(Object dependencyObject) {
|
private void configurePluginDependencies(Object dependencyObject) {
|
||||||
assert dependencyObject.name instanceof String
|
assert dependencyObject.name instanceof String
|
||||||
Project pluginProject = project.rootProject.findProject(":${dependencyObject.name}")
|
Project pluginProject = project.rootProject.findProject(":${dependencyObject.name}")
|
||||||
@ -392,7 +426,7 @@ class FlutterPlugin implements Plugin<Project> {
|
|||||||
return androidPlugins
|
return androidPlugins
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets the plugins dependencies from `.flutter-plugins-dependencies`.
|
/** Gets the plugins dependencies from `.flutter-plugins-dependencies`. */
|
||||||
private List getPluginDependencies() {
|
private List getPluginDependencies() {
|
||||||
// Consider a `.flutter-plugins-dependencies` file with the following content:
|
// Consider a `.flutter-plugins-dependencies` file with the following content:
|
||||||
// {
|
// {
|
||||||
@ -487,7 +521,7 @@ class FlutterPlugin implements Plugin<Project> {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Whether to build the debug app in "fast-start" mode.
|
/** Whether to build the debug app in "fast-start" mode. */
|
||||||
private Boolean isFastStart() {
|
private Boolean isFastStart() {
|
||||||
if (project.hasProperty("fast-start")) {
|
if (project.hasProperty("fast-start")) {
|
||||||
return project.property("fast-start").toBoolean()
|
return project.property("fast-start").toBoolean()
|
||||||
@ -501,9 +535,11 @@ class FlutterPlugin implements Plugin<Project> {
|
|||||||
return project.plugins.hasPlugin("com.android.application");
|
return project.plugins.hasPlugin("com.android.application");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns true if the build mode is supported by the current call to Gradle.
|
/**
|
||||||
// This only relevant when using a local engine. Because the engine
|
* Returns true if the build mode is supported by the current call to Gradle.
|
||||||
// is built for a specific mode, the call to Gradle must match that mode.
|
* This only relevant when using a local engine. Because the engine
|
||||||
|
* is built for a specific mode, the call to Gradle must match that mode.
|
||||||
|
*/
|
||||||
private Boolean supportsBuildMode(String flutterBuildMode) {
|
private Boolean supportsBuildMode(String flutterBuildMode) {
|
||||||
if (!useLocalEngine()) {
|
if (!useLocalEngine()) {
|
||||||
return true;
|
return true;
|
||||||
@ -588,30 +624,32 @@ class FlutterPlugin implements Plugin<Project> {
|
|||||||
return target
|
return target
|
||||||
}
|
}
|
||||||
|
|
||||||
// In AGP 4.0, the Android linter task depends on the JAR tasks that generate `libapp.so`.
|
/**
|
||||||
// When building APKs, this causes an issue where building release requires the debug JAR,
|
* In AGP 4.0, the Android linter task depends on the JAR tasks that generate `libapp.so`.
|
||||||
// but Gradle won't build debug.
|
* When building APKs, this causes an issue where building release requires the debug JAR,
|
||||||
//
|
* but Gradle won't build debug.
|
||||||
// To workaround this issue, only configure the JAR task that is required given the task
|
*
|
||||||
// from the command line.
|
* To workaround this issue, only configure the JAR task that is required given the task
|
||||||
//
|
* from the command line.
|
||||||
// The AGP team said that this issue is fixed in Gradle 7.0, which isn't released at the
|
*
|
||||||
// time of adding this code. Once released, this can be removed.
|
* The AGP team said that this issue is fixed in Gradle 7.0, which isn't released at the
|
||||||
//
|
* time of adding this code. Once released, this can be removed.
|
||||||
// Tested cases:
|
*
|
||||||
// * `./gradlew assembleRelease`
|
* Tested cases:
|
||||||
// * `./gradlew app:assembleRelease.`
|
* * `./gradlew assembleRelease`
|
||||||
// * `./gradlew assemble{flavorName}Release`
|
* * `./gradlew app:assembleRelease.`
|
||||||
// * `./gradlew app:assemble{flavorName}Release`
|
* * `./gradlew assemble{flavorName}Release`
|
||||||
// * `./gradlew assemble.`
|
* * `./gradlew app:assemble{flavorName}Release`
|
||||||
// * `./gradlew app:assemble.`
|
* * `./gradlew assemble.`
|
||||||
// * `./gradlew bundle.`
|
* * `./gradlew app:assemble.`
|
||||||
// * `./gradlew bundleRelease.`
|
* * `./gradlew bundle.`
|
||||||
// * `./gradlew app:bundleRelease.`
|
* * `./gradlew bundleRelease.`
|
||||||
//
|
* * `./gradlew app:bundleRelease.`
|
||||||
// Related issues:
|
*
|
||||||
// https://issuetracker.google.com/issues/158060799
|
* Related issues:
|
||||||
// https://issuetracker.google.com/issues/158753935
|
* https://issuetracker.google.com/issues/158060799
|
||||||
|
* https://issuetracker.google.com/issues/158753935
|
||||||
|
*/
|
||||||
private boolean shouldConfigureFlutterTask(Task assembleTask) {
|
private boolean shouldConfigureFlutterTask(Task assembleTask) {
|
||||||
def cliTasksNames = project.gradle.startParameter.taskNames
|
def cliTasksNames = project.gradle.startParameter.taskNames
|
||||||
if (cliTasksNames.size() != 1 || !cliTasksNames.first().contains("assemble")) {
|
if (cliTasksNames.size() != 1 || !cliTasksNames.first().contains("assemble")) {
|
||||||
@ -917,11 +955,6 @@ class FlutterPlugin implements Plugin<Project> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FlutterExtension {
|
|
||||||
String source
|
|
||||||
String target
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class BaseFlutterTask extends DefaultTask {
|
abstract class BaseFlutterTask extends DefaultTask {
|
||||||
@Internal
|
@Internal
|
||||||
File flutterRoot
|
File flutterRoot
|
||||||
|
@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -35,8 +35,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "{{androidIdentifier}}"
|
applicationId "{{androidIdentifier}}"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -44,8 +44,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "{{androidIdentifier}}"
|
applicationId "{{androidIdentifier}}"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ group '{{androidIdentifier}}'
|
|||||||
version '1.0'
|
version '1.0'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -38,8 +38,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -2368,7 +2368,7 @@ void main() {
|
|||||||
expect(env['flutter'].allows(Version(2, 4, 9)), false);
|
expect(env['flutter'].allows(Version(2, 4, 9)), false);
|
||||||
});
|
});
|
||||||
|
|
||||||
testUsingContext('default app uses Android SDK 30', () async {
|
testUsingContext('default app uses flutter default versions', () async {
|
||||||
Cache.flutterRoot = '../..';
|
Cache.flutterRoot = '../..';
|
||||||
|
|
||||||
final CreateCommand command = CreateCommand();
|
final CreateCommand command = CreateCommand();
|
||||||
@ -2380,8 +2380,8 @@ void main() {
|
|||||||
|
|
||||||
final String buildContent = await globals.fs.file('${projectDir.path}/android/app/build.gradle').readAsString();
|
final String buildContent = await globals.fs.file('${projectDir.path}/android/app/build.gradle').readAsString();
|
||||||
|
|
||||||
expect(buildContent.contains('compileSdkVersion 30'), true);
|
expect(buildContent.contains('compileSdkVersion flutter.compileSdkVersion'), true);
|
||||||
expect(buildContent.contains('targetSdkVersion 30'), true);
|
expect(buildContent.contains('targetSdkVersion flutter.targetSdkVersion'), true);
|
||||||
});
|
});
|
||||||
|
|
||||||
testUsingContext('Linux plugins handle partially camel-case project names correctly', () async {
|
testUsingContext('Linux plugins handle partially camel-case project names correctly', () async {
|
||||||
|
@ -40,6 +40,7 @@ void main() {
|
|||||||
'--target-platform=android-arm64'
|
'--target-platform=android-arm64'
|
||||||
], workingDirectory: tempDir.path);
|
], workingDirectory: tempDir.path);
|
||||||
|
|
||||||
|
expect(result.exitCode, 0);
|
||||||
expect(result.stdout.toString(), contains('app-release.aab'));
|
expect(result.stdout.toString(), contains('app-release.aab'));
|
||||||
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
|
expect(result.stdout.toString(), contains('Deferred components prebuild validation passed.'));
|
||||||
expect(result.stdout.toString(), contains('Deferred components gen_snapshot validation passed.'));
|
expect(result.stdout.toString(), contains('Deferred components gen_snapshot validation passed.'));
|
||||||
@ -60,8 +61,6 @@ void main() {
|
|||||||
|
|
||||||
expect(archive.findFile('component1/assets/flutter_assets/test_assets/asset2.txt') != null, true);
|
expect(archive.findFile('component1/assets/flutter_assets/test_assets/asset2.txt') != null, true);
|
||||||
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset1.txt') != null, true);
|
expect(archive.findFile('base/assets/flutter_assets/test_assets/asset1.txt') != null, true);
|
||||||
|
|
||||||
expect(result.exitCode, 0);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
testWithoutContext('simple build appbundle all targets succeeds', () async {
|
testWithoutContext('simple build appbundle all targets succeeds', () async {
|
||||||
|
@ -177,7 +177,7 @@ class BasicDeferredComponentsConfig extends DeferredComponentsConfig {
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main.java.srcDirs += 'src/main/kotlin'
|
main.java.srcDirs += 'src/main/kotlin'
|
||||||
@ -190,8 +190,8 @@ class BasicDeferredComponentsConfig extends DeferredComponentsConfig {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "ninja.qian.splitaottest1"
|
applicationId "ninja.qian.splitaottest1"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ apply plugin: 'com.android.application'
|
|||||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 30
|
compileSdkVersion flutter.compileSdkVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility JavaVersion.VERSION_1_8
|
||||||
@ -39,8 +39,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||||
applicationId "com.example.integration_test_example"
|
applicationId "com.example.integration_test_example"
|
||||||
minSdkVersion 16
|
minSdkVersion flutter.minSdkVersion
|
||||||
targetSdkVersion 30
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
Loading…
Reference in New Issue
Block a user