From 80f1c72a0dee222d621a2d3a596d57174b8ad58c Mon Sep 17 00:00:00 2001 From: Matan Shukry Date: Sat, 17 Aug 2024 17:23:25 +0300 Subject: [PATCH] few fixes before publish --- .../example/android/app/build.gradle | 4 ++- .../example/pubspec.yaml | 4 +++ .../android/build.gradle | 30 ++++++++++--------- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/flutter_google_places_sdk/example/android/app/build.gradle b/flutter_google_places_sdk/example/android/app/build.gradle index 709055b..9170ac7 100644 --- a/flutter_google_places_sdk/example/android/app/build.gradle +++ b/flutter_google_places_sdk/example/android/app/build.gradle @@ -26,7 +26,9 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - namespace 'com.msh.flutter_google_places_sdk_example' + if (project.android.hasProperty("namespace")) { + namespace 'com.msh.flutter_google_places_sdk_example' + } compileSdkVersion 34 ndkVersion "26.1.10909125" diff --git a/flutter_google_places_sdk/example/pubspec.yaml b/flutter_google_places_sdk/example/pubspec.yaml index dcb4a0e..099ec5c 100644 --- a/flutter_google_places_sdk/example/pubspec.yaml +++ b/flutter_google_places_sdk/example/pubspec.yaml @@ -12,6 +12,10 @@ dependencies: flutter_google_places_sdk: path: ../../flutter_google_places_sdk +dependency_overrides: + flutter_google_places_sdk_android: + path: ../../flutter_google_places_sdk_android + dev_dependencies: flutter_test: sdk: flutter diff --git a/flutter_google_places_sdk_android/android/build.gradle b/flutter_google_places_sdk_android/android/build.gradle index 6523ff3..967a566 100644 --- a/flutter_google_places_sdk_android/android/build.gradle +++ b/flutter_google_places_sdk_android/android/build.gradle @@ -1,5 +1,5 @@ -group 'com.msh.flutter_google_places_sdk' -version '1.0-SNAPSHOT' +group = "com.msh.flutter_google_places_sdk" +version = "1.0-SNAPSHOT" buildscript { repositories { @@ -8,40 +8,42 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:8.4.1' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath("com.android.tools.build:gradle:8.4.1") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version") } } -rootProject.allprojects { +allprojects { repositories { google() mavenCentral() } } -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' +apply plugin: "com.android.library" +apply plugin: "kotlin-android" android { - namespace 'com.msh.flutter_google_places_sdk_example' + if (project.android.hasProperty("namespace")) { + namespace "com.msh.flutter_google_places_sdk" + } compileSdkVersion 34 compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = '17' + jvmTarget = JavaVersion.VERSION_17 } sourceSets { - main.java.srcDirs += 'src/main/kotlin' - test.java.srcDirs += 'src/test/kotlin' + main.java.srcDirs += "src/main/kotlin" + test.java.srcDirs += "src/test/kotlin" } defaultConfig { - minSdkVersion 21 + minSdk = 21 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } lintOptions {