From 46133674e79666e3bf0224f50ca1a04d944c08c9 Mon Sep 17 00:00:00 2001 From: Poovamraj T T Date: Wed, 12 Jul 2023 12:07:41 +0200 Subject: [PATCH] Add namespace to build.gradle (#290) Co-authored-by: Rita Zerrizuela --- auth0_flutter/android/build.gradle | 8 ++++++-- auth0_flutter/example/android/app/build.gradle | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/auth0_flutter/android/build.gradle b/auth0_flutter/android/build.gradle index 8473a959..ea02e801 100644 --- a/auth0_flutter/android/build.gradle +++ b/auth0_flutter/android/build.gradle @@ -1,4 +1,6 @@ -group 'com.auth0.auth0_flutter' +def libApplicationId = 'com.auth0.auth0_flutter' + +group libApplicationId version '1.0-SNAPSHOT' buildscript { @@ -26,7 +28,9 @@ apply plugin: 'kotlin-android' android { compileSdkVersion 31 - + if (project.android.hasProperty("namespace")) { + namespace libApplicationId + } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 diff --git a/auth0_flutter/example/android/app/build.gradle b/auth0_flutter/example/android/app/build.gradle index 92edf09d..bcffda3a 100644 --- a/auth0_flutter/example/android/app/build.gradle +++ b/auth0_flutter/example/android/app/build.gradle @@ -1,3 +1,4 @@ +def exampleAppApplicationId = 'com.auth0.auth0_flutter_example' def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -31,7 +32,9 @@ jacoco { android { compileSdk 31 - + if (project.android.hasProperty("namespace")) { + namespace exampleAppApplicationId + } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 @@ -48,7 +51,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.auth0.auth0_flutter_example" + applicationId exampleAppApplicationId minSdkVersion 21 targetSdkVersion 31 versionCode flutterVersionCode.toInteger()