From cedfb6b43075db969b8bbd3f882d74e91ece2f01 Mon Sep 17 00:00:00 2001 From: Kerim Mathlouthi Date: Wed, 31 May 2023 02:48:34 +0200 Subject: [PATCH] =?UTF-8?q?fix=20plugin-migration-v4-to-v5=E2=80=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 22 ++++++++++++++-------- android/gradle.properties | 3 +++ 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 3e7845a..fb70a39 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,3 +1,10 @@ +ext { + junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2' + androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1' + androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5' + androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1' +} + buildscript { repositories { jcenter() @@ -13,10 +20,10 @@ apply plugin: 'com.android.library' android { namespace "com.codetrixstudio.capacitor.GoogleAuth.capacitorgoogleauth" - compileSdkVersion 32 + compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33 defaultConfig { - minSdkVersion 22 - targetSdkVersion 32 + minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22 + targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" @@ -46,10 +53,9 @@ repositories { dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':capacitor-android') - implementation 'androidx.appcompat:appcompat:1.2.0' - testImplementation 'junit:junit:4.13' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" + testImplementation "junit:junit:$junitVersion" + androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion" + androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion" implementation 'com.google.android.gms:play-services-auth:18.+' } - diff --git a/android/gradle.properties b/android/gradle.properties index aac7c9b..d7bdb89 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -15,3 +15,6 @@ org.gradle.jvmargs=-Xmx1536m # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true + +# Supports AndroidX +android.useAndroidX=true \ No newline at end of file