Android Gradle file templates: make it easier to convert them to Kotlin DSL in the future (#142146)
This PR will make it easier for future Flutter-Android apps/plugins/modules etc. to migrate to Gradle Kotlin DSL. This PR is similar to #140452 but concerns public Gradle templates instead of Flutter's internal Gradle code. It should be a no-op change. **before**  **after** 
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
group '{{androidIdentifier}}'
|
||||
version '1.0'
|
||||
group = "{{androidIdentifier}}"
|
||||
version = "1.0"
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
@@ -8,7 +8,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:{{agpVersion}}'
|
||||
classpath("com.android.tools.build:gradle:{{agpVersion}}")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,27 +19,27 @@ rootProject.allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: "com.android.library"
|
||||
|
||||
android {
|
||||
if (project.android.hasProperty("namespace")) {
|
||||
namespace '{{androidIdentifier}}'
|
||||
namespace = "{{androidIdentifier}}"
|
||||
}
|
||||
|
||||
compileSdk {{compileSdkVersion}}
|
||||
compileSdk = {{compileSdkVersion}}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
minSdk {{minSdkVersion}}
|
||||
minSdk = {{minSdkVersion}}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
testImplementation 'org.mockito:mockito-core:5.0.0'
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.mockito:mockito-core:5.0.0")
|
||||
}
|
||||
|
||||
testOptions {
|
||||
|
||||
Reference in New Issue
Block a user