From 3f188059066144063451bacf48a33a38041437ac Mon Sep 17 00:00:00 2001 From: Marina Coelho Date: Wed, 17 May 2023 10:36:41 +0100 Subject: [PATCH] Migrate all snippets to most recent AGP and kts syntax (#451) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Updated gradle version for all modules, migrated admob to kts syntax * Use kts syntax in analytics module * Use kts syntax in appcheck module * Use kts syntax in auth module * Use kts syntax in config module * Use kts syntax in crashlytics module * Use kts syntax in database module * Use kts syntax in dl invites module * Use kts syntax in dl module * Use kts syntax in firebaseoptions module * Use kts syntax in firestore module * Use kts syntax in functions module * Use kts syntax in inappmessaging module * Use kts syntax in installations module * Use kts syntax in messaging module * Use kts syntax in ml functions module * Use kts syntax in mlkit module * Use kts syntax in perf module * Use kts syntax in storage module * Use kts syntax in tasks module * Use kts syntax in test lab module * Updated main gradle files to kts syntax * chore(ktlint): inputs.file() --> inputs.files() * chore(storage): re-add google-services.json * Apply suggestions from code review * Update build.gradle.kts --------- Co-authored-by: Rosário P. Fernandes --- admob/app/build.gradle | 49 ----------- admob/app/build.gradle.kts | 53 ++++++++++++ admob/app/proguard-rules.pro | 2 +- admob/build.gradle | 25 ------ admob/build.gradle.kts | 22 +++++ admob/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- admob/settings.gradle | 1 - admob/settings.gradle.kts | 9 ++ analytics/app/build.gradle | 49 ----------- analytics/app/build.gradle.kts | 44 ++++++++++ analytics/app/proguard-rules.pro | 2 +- analytics/build.gradle | 25 ------ analytics/build.gradle.kts | 23 +++++ analytics/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- analytics/settings.gradle | 10 --- analytics/settings.gradle.kts | 11 +++ appcheck/app/build.gradle | 47 ----------- appcheck/app/build.gradle.kts | 49 +++++++++++ appcheck/app/proguard-rules.pro | 2 +- appcheck/build.gradle | 27 ------ appcheck/build.gradle.kts | 23 +++++ .../gradle/wrapper/gradle-wrapper.properties | 2 +- appcheck/settings.gradle | 1 - appcheck/settings.gradle.kts | 9 ++ auth/app/build.gradle | 53 ------------ auth/app/build.gradle.kts | 56 +++++++++++++ auth/app/proguard-rules.pro | 2 +- auth/build.gradle | 25 ------ auth/build.gradle.kts | 22 +++++ auth/gradle.properties | 2 + auth/gradle/wrapper/gradle-wrapper.properties | 2 +- auth/settings.gradle | 1 - auth/settings.gradle.kts | 9 ++ build.gradle | 83 ------------------- build.gradle.kts | 79 ++++++++++++++++++ config/app/build.gradle | 51 ------------ config/app/build.gradle.kts | 51 ++++++++++++ config/app/proguard-rules.pro | 2 +- config/build.gradle | 25 ------ config/build.gradle.kts | 22 +++++ config/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- config/settings.gradle | 1 - config/settings.gradle.kts | 9 ++ crashlytics/app/build.gradle | 43 ---------- crashlytics/app/build.gradle.kts | 46 ++++++++++ crashlytics/app/proguard-rules.pro | 2 +- crashlytics/build.gradle | 26 ------ crashlytics/build.gradle.kts | 23 +++++ crashlytics/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- crashlytics/settings.gradle | 1 - crashlytics/settings.gradle.kts | 9 ++ database/app/build.gradle | 42 ---------- database/app/build.gradle.kts | 51 ++++++++++++ database/app/proguard-rules.pro | 2 +- database/build.gradle | 26 ------ database/build.gradle.kts | 22 +++++ database/gradle.properties | 3 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- database/settings.gradle | 1 - database/settings.gradle.kts | 9 ++ dl-invites/app/build.gradle | 41 --------- dl-invites/app/build.gradle.kts | 48 +++++++++++ dl-invites/app/proguard-rules.pro | 2 +- dl-invites/build.gradle | 25 ------ dl-invites/build.gradle.kts | 22 +++++ dl-invites/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- dl-invites/settings.gradle | 1 - dl-invites/settings.gradle.kts | 9 ++ dynamic-links/app/build.gradle | 45 ---------- dynamic-links/app/build.gradle.kts | 52 ++++++++++++ dynamic-links/app/proguard-rules.pro | 2 +- dynamic-links/build.gradle | 25 ------ dynamic-links/build.gradle.kts | 22 +++++ dynamic-links/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- dynamic-links/settings.gradle | 1 - dynamic-links/settings.gradle.kts | 9 ++ firebaseoptions/app/build.gradle | 38 --------- firebaseoptions/app/build.gradle.kts | 42 ++++++++++ firebaseoptions/app/proguard-rules.pro | 2 +- firebaseoptions/build.gradle | 25 ------ firebaseoptions/build.gradle.kts | 22 +++++ firebaseoptions/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- firebaseoptions/settings.gradle | 1 - firebaseoptions/settings.gradle.kts | 9 ++ firestore/app/build.gradle | 61 -------------- firestore/app/build.gradle.kts | 58 +++++++++++++ firestore/app/proguard-rules.pro | 2 +- firestore/build.gradle | 26 ------ firestore/build.gradle.kts | 22 +++++ firestore/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- firestore/settings.gradle | 1 - firestore/settings.gradle.kts | 9 ++ functions/app/build.gradle | 38 --------- functions/app/build.gradle.kts | 44 ++++++++++ functions/app/proguard-rules.pro | 2 +- functions/build.gradle | 25 ------ functions/build.gradle.kts | 22 +++++ functions/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- functions/settings.gradle | 1 - functions/settings.gradle.kts | 9 ++ gradle/wrapper/gradle-wrapper.properties | 2 +- inappmessaging/app/build.gradle | 48 ----------- inappmessaging/app/build.gradle.kts | 53 ++++++++++++ inappmessaging/app/proguard-rules.pro | 2 +- inappmessaging/build.gradle | 25 ------ inappmessaging/build.gradle.kts | 22 +++++ inappmessaging/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- inappmessaging/settings.gradle | 1 - inappmessaging/settings.gradle.kts | 9 ++ installations/app/build.gradle | 41 --------- installations/app/build.gradle.kts | 41 +++++++++ installations/app/proguard-rules.pro | 2 +- installations/build.gradle | 27 ------ installations/build.gradle.kts | 21 +++++ .../gradle/wrapper/gradle-wrapper.properties | 2 +- installations/settings.gradle | 2 - installations/settings.gradle.kts | 10 +++ messaging/app/build.gradle | 51 ------------ messaging/app/build.gradle.kts | 57 +++++++++++++ messaging/app/proguard-rules.pro | 2 +- messaging/build.gradle | 25 ------ messaging/build.gradle.kts | 22 +++++ messaging/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- messaging/settings.gradle | 1 - messaging/settings.gradle.kts | 9 ++ ml-functions/app/build.gradle | 54 ------------ ml-functions/app/build.gradle.kts | 61 ++++++++++++++ ml-functions/app/proguard-rules.pro | 2 +- ml-functions/app/src/main/AndroidManifest.xml | 3 +- ml-functions/build.gradle | 25 ------ ml-functions/build.gradle.kts | 22 +++++ .../gradle/wrapper/gradle-wrapper.properties | 2 +- ml-functions/settings.gradle | 1 - ml-functions/settings.gradle.kts | 9 ++ mlkit/app/build.gradle | 46 ---------- mlkit/app/build.gradle.kts | 57 +++++++++++++ mlkit/app/proguard-rules.pro | 2 +- .../firebase/example/mlkit/MainActivity.java | 3 +- .../example/mlkit/kotlin/MainActivity.kt | 2 +- mlkit/build.gradle | 25 ------ mlkit/build.gradle.kts | 22 +++++ .../gradle/wrapper/gradle-wrapper.properties | 3 +- mlkit/settings.gradle | 1 - mlkit/settings.gradle.kts | 9 ++ perf/app/build.gradle | 38 --------- perf/app/build.gradle.kts | 47 +++++++++++ perf/app/proguard-rules.pro | 2 +- .../firebase/example/perf/MainActivity.java | 2 - .../example/perf/kotlin/MainActivity.kt | 2 +- perf/build.gradle | 25 ------ perf/build.gradle.kts | 23 +++++ perf/gradle.properties | 1 + perf/gradle/wrapper/gradle-wrapper.properties | 2 +- perf/settings.gradle | 1 - perf/settings.gradle.kts | 9 ++ settings.gradle | 20 ----- settings.gradle.kts | 29 +++++++ storage/app/build.gradle | 57 ------------- storage/app/build.gradle.kts | 55 ++++++++++++ storage/app/google-services.json | 2 +- storage/app/proguard-rules.pro | 2 +- storage/build.gradle | 25 ------ storage/build.gradle.kts | 22 +++++ storage/gradle.properties | 3 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- storage/settings.gradle | 1 - storage/settings.gradle.kts | 9 ++ tasks/app/build.gradle | 37 --------- tasks/app/build.gradle.kts | 43 ++++++++++ tasks/app/proguard-rules.pro | 2 +- tasks/build.gradle | 25 ------ tasks/build.gradle.kts | 22 +++++ tasks/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- tasks/settings.gradle | 1 - tasks/settings.gradle.kts | 9 ++ test-lab/app/build.gradle | 46 ---------- test-lab/app/build.gradle.kts | 45 ++++++++++ test-lab/app/proguard-rules.pro | 2 +- test-lab/build.gradle | 25 ------ test-lab/build.gradle.kts | 22 +++++ test-lab/gradle.properties | 1 + .../gradle/wrapper/gradle-wrapper.properties | 2 +- test-lab/settings.gradle | 1 - test-lab/settings.gradle.kts | 9 ++ 196 files changed, 1888 insertions(+), 1695 deletions(-) delete mode 100644 admob/app/build.gradle create mode 100644 admob/app/build.gradle.kts delete mode 100644 admob/build.gradle create mode 100644 admob/build.gradle.kts delete mode 100644 admob/settings.gradle create mode 100644 admob/settings.gradle.kts delete mode 100644 analytics/app/build.gradle create mode 100644 analytics/app/build.gradle.kts delete mode 100644 analytics/build.gradle create mode 100644 analytics/build.gradle.kts delete mode 100644 analytics/settings.gradle create mode 100644 analytics/settings.gradle.kts delete mode 100644 appcheck/app/build.gradle create mode 100644 appcheck/app/build.gradle.kts delete mode 100644 appcheck/build.gradle create mode 100644 appcheck/build.gradle.kts delete mode 100644 appcheck/settings.gradle create mode 100644 appcheck/settings.gradle.kts delete mode 100644 auth/app/build.gradle create mode 100644 auth/app/build.gradle.kts delete mode 100644 auth/build.gradle create mode 100644 auth/build.gradle.kts delete mode 100644 auth/settings.gradle create mode 100644 auth/settings.gradle.kts delete mode 100644 build.gradle create mode 100644 build.gradle.kts delete mode 100644 config/app/build.gradle create mode 100644 config/app/build.gradle.kts delete mode 100644 config/build.gradle create mode 100644 config/build.gradle.kts delete mode 100644 config/settings.gradle create mode 100644 config/settings.gradle.kts delete mode 100644 crashlytics/app/build.gradle create mode 100644 crashlytics/app/build.gradle.kts delete mode 100644 crashlytics/build.gradle create mode 100644 crashlytics/build.gradle.kts delete mode 100644 crashlytics/settings.gradle create mode 100644 crashlytics/settings.gradle.kts delete mode 100644 database/app/build.gradle create mode 100644 database/app/build.gradle.kts delete mode 100644 database/build.gradle create mode 100644 database/build.gradle.kts delete mode 100644 database/settings.gradle create mode 100644 database/settings.gradle.kts delete mode 100644 dl-invites/app/build.gradle create mode 100644 dl-invites/app/build.gradle.kts delete mode 100644 dl-invites/build.gradle create mode 100644 dl-invites/build.gradle.kts delete mode 100644 dl-invites/settings.gradle create mode 100644 dl-invites/settings.gradle.kts delete mode 100644 dynamic-links/app/build.gradle create mode 100644 dynamic-links/app/build.gradle.kts delete mode 100644 dynamic-links/build.gradle create mode 100644 dynamic-links/build.gradle.kts delete mode 100644 dynamic-links/settings.gradle create mode 100644 dynamic-links/settings.gradle.kts delete mode 100644 firebaseoptions/app/build.gradle create mode 100644 firebaseoptions/app/build.gradle.kts delete mode 100644 firebaseoptions/build.gradle create mode 100644 firebaseoptions/build.gradle.kts delete mode 100644 firebaseoptions/settings.gradle create mode 100644 firebaseoptions/settings.gradle.kts delete mode 100644 firestore/app/build.gradle create mode 100644 firestore/app/build.gradle.kts delete mode 100644 firestore/build.gradle create mode 100644 firestore/build.gradle.kts delete mode 100644 firestore/settings.gradle create mode 100644 firestore/settings.gradle.kts delete mode 100644 functions/app/build.gradle create mode 100644 functions/app/build.gradle.kts delete mode 100644 functions/build.gradle create mode 100644 functions/build.gradle.kts delete mode 100644 functions/settings.gradle create mode 100644 functions/settings.gradle.kts delete mode 100644 inappmessaging/app/build.gradle create mode 100644 inappmessaging/app/build.gradle.kts delete mode 100644 inappmessaging/build.gradle create mode 100644 inappmessaging/build.gradle.kts delete mode 100644 inappmessaging/settings.gradle create mode 100644 inappmessaging/settings.gradle.kts delete mode 100644 installations/app/build.gradle create mode 100644 installations/app/build.gradle.kts delete mode 100644 installations/build.gradle create mode 100644 installations/build.gradle.kts delete mode 100644 installations/settings.gradle create mode 100644 installations/settings.gradle.kts delete mode 100644 messaging/app/build.gradle create mode 100644 messaging/app/build.gradle.kts delete mode 100644 messaging/build.gradle create mode 100644 messaging/build.gradle.kts delete mode 100644 messaging/settings.gradle create mode 100644 messaging/settings.gradle.kts delete mode 100644 ml-functions/app/build.gradle create mode 100644 ml-functions/app/build.gradle.kts delete mode 100644 ml-functions/build.gradle create mode 100644 ml-functions/build.gradle.kts delete mode 100644 ml-functions/settings.gradle create mode 100644 ml-functions/settings.gradle.kts delete mode 100644 mlkit/app/build.gradle create mode 100644 mlkit/app/build.gradle.kts delete mode 100644 mlkit/build.gradle create mode 100644 mlkit/build.gradle.kts delete mode 100644 mlkit/settings.gradle create mode 100644 mlkit/settings.gradle.kts delete mode 100644 perf/app/build.gradle create mode 100644 perf/app/build.gradle.kts delete mode 100644 perf/build.gradle create mode 100644 perf/build.gradle.kts delete mode 100644 perf/settings.gradle create mode 100644 perf/settings.gradle.kts delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts delete mode 100644 storage/app/build.gradle create mode 100644 storage/app/build.gradle.kts delete mode 100644 storage/build.gradle create mode 100644 storage/build.gradle.kts delete mode 100644 storage/settings.gradle create mode 100644 storage/settings.gradle.kts delete mode 100644 tasks/app/build.gradle create mode 100644 tasks/app/build.gradle.kts delete mode 100644 tasks/build.gradle create mode 100644 tasks/build.gradle.kts delete mode 100644 tasks/settings.gradle create mode 100644 tasks/settings.gradle.kts delete mode 100644 test-lab/app/build.gradle create mode 100644 test-lab/app/build.gradle.kts delete mode 100644 test-lab/build.gradle create mode 100644 test-lab/build.gradle.kts delete mode 100644 test-lab/settings.gradle create mode 100644 test-lab/settings.gradle.kts diff --git a/admob/app/build.gradle b/admob/app/build.gradle deleted file mode 100644 index f2dcb7c9a..000000000 --- a/admob/app/build.gradle +++ /dev/null @@ -1,49 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.example.admob" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - multiDexEnabled true - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'devrel.firebase.google.com.firebaseoptions' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.browser:browser:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation "com.google.firebase:firebase-ads:22.0.0" - implementation "androidx.constraintlayout:constraintlayout:2.1.4" - implementation "androidx.multidex:multidex:2.0.1" - - // [START gradle_play_config] - implementation 'com.google.android.gms:play-services-ads:22.0.0' - // [END gradle_play_config] - - // For an optimal experience using AdMob, add the Firebase SDK - // for Google Analytics. This is recommended, but not required. - implementation 'com.google.firebase:firebase-analytics:21.2.2' -} - -apply plugin: 'com.google.gms.google-services' diff --git a/admob/app/build.gradle.kts b/admob/app/build.gradle.kts new file mode 100644 index 000000000..cb8d951d2 --- /dev/null +++ b/admob/app/build.gradle.kts @@ -0,0 +1,53 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "com.google.firebase.example.admob" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.example.admob" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + multiDexEnabled = true + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.browser:browser:1.5.0") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("com.google.firebase:firebase-ads:22.0.0") + implementation("androidx.constraintlayout:constraintlayout:2.1.4") + implementation("androidx.multidex:multidex:2.0.1") + + // [START gradle_play_config] + implementation("com.google.android.gms:play-services-ads:22.0.0") + // [END gradle_play_config] + + // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // For an optimal experience using AdMob, add the Firebase SDK + // for Google Analytics. This is recommended, but not required. + implementation("com.google.firebase:firebase-analytics") +} diff --git a/admob/app/proguard-rules.pro b/admob/app/proguard-rules.pro index af6097fd5..4f3270429 100644 --- a/admob/app/proguard-rules.pro +++ b/admob/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/admob/build.gradle b/admob/build.gradle deleted file mode 100644 index cefd1a1ff..000000000 --- a/admob/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenLocal() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/admob/build.gradle.kts b/admob/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/admob/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/admob/gradle.properties b/admob/gradle.properties index aac7c9b46..6dd0218ed 100644 --- a/admob/gradle.properties +++ b/admob/gradle.properties @@ -10,6 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/admob/gradle/wrapper/gradle-wrapper.properties b/admob/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/admob/gradle/wrapper/gradle-wrapper.properties +++ b/admob/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/admob/settings.gradle b/admob/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/admob/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/admob/settings.gradle.kts b/admob/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/admob/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/analytics/app/build.gradle b/analytics/app/build.gradle deleted file mode 100644 index 6906f1411..000000000 --- a/analytics/app/build.gradle +++ /dev/null @@ -1,49 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.example.analytics" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - multiDexEnabled true - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.firebase.example.analytics' -} -repositories { - maven { - // Ironsource library used for ad_impression snippets - url "https://android-sdk.is.com/" - } -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation "com.google.firebase:firebase-analytics:21.2.2" - implementation "com.google.firebase:firebase-analytics-ktx:21.2.2" - // Ironsource and AppLovin libraries used for ad_impression snippets - implementation 'com.applovin:applovin-sdk:11.5.1' - implementation 'com.ironsource.sdk:mediationsdk:7.2.4.1' - -} - -apply plugin: 'com.google.gms.google-services' diff --git a/analytics/app/build.gradle.kts b/analytics/app/build.gradle.kts new file mode 100644 index 000000000..09f755470 --- /dev/null +++ b/analytics/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "com.google.firebase.example.analytics" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.example.analytics" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + multiDexEnabled = true + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("com.google.firebase:firebase-analytics:21.2.2") + implementation("com.google.firebase:firebase-analytics-ktx:21.2.2") + // Ironsource and AppLovin libraries used for ad_impression snippets + implementation("com.applovin:applovin-sdk:11.5.1") + implementation("com.ironsource.sdk:mediationsdk:7.2.4.1") + +} diff --git a/analytics/app/proguard-rules.pro b/analytics/app/proguard-rules.pro index af6097fd5..4f3270429 100644 --- a/analytics/app/proguard-rules.pro +++ b/analytics/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/analytics/build.gradle b/analytics/build.gradle deleted file mode 100644 index 590c01899..000000000 --- a/analytics/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/analytics/build.gradle.kts b/analytics/build.gradle.kts new file mode 100644 index 000000000..2ee6a64ce --- /dev/null +++ b/analytics/build.gradle.kts @@ -0,0 +1,23 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + maven("https://android-sdk.is.com/") + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/analytics/gradle.properties b/analytics/gradle.properties index aac7c9b46..6dd0218ed 100644 --- a/analytics/gradle.properties +++ b/analytics/gradle.properties @@ -10,6 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/analytics/gradle/wrapper/gradle-wrapper.properties b/analytics/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/analytics/gradle/wrapper/gradle-wrapper.properties +++ b/analytics/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/analytics/settings.gradle b/analytics/settings.gradle deleted file mode 100644 index 9bca1c406..000000000 --- a/analytics/settings.gradle +++ /dev/null @@ -1,10 +0,0 @@ -include ':app' - -// Ironsource library used for ad_impression snippets -dependencyResolutionManagement { - repositories { - maven { - url 'https://android-sdk.is.com/' - } - } -} diff --git a/analytics/settings.gradle.kts b/analytics/settings.gradle.kts new file mode 100644 index 000000000..93ab44371 --- /dev/null +++ b/analytics/settings.gradle.kts @@ -0,0 +1,11 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + // Ironsource library used for ad_impression snippets + maven("https://android-sdk.is.com/") + } +} + +include(":app") diff --git a/appcheck/app/build.gradle b/appcheck/app/build.gradle deleted file mode 100644 index 3b8798eac..000000000 --- a/appcheck/app/build.gradle +++ /dev/null @@ -1,47 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'com.google.gms.google-services' // Google Services plugin - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.example.appcheck" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - multiDexEnabled true - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.firebase.example.appcheck' -} - -dependencies { - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.9.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - implementation 'com.google.firebase:firebase-appcheck-ktx:17.0.0' - implementation 'com.google.firebase:firebase-appcheck-debug:17.0.0' - implementation 'com.google.firebase:firebase-appcheck-playintegrity:17.0.0' - - implementation 'com.squareup.retrofit2:retrofit:2.9.0' - - implementation "androidx.core:core-ktx:1.9.0" - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} \ No newline at end of file diff --git a/appcheck/app/build.gradle.kts b/appcheck/app/build.gradle.kts new file mode 100644 index 000000000..b1632dcb1 --- /dev/null +++ b/appcheck/app/build.gradle.kts @@ -0,0 +1,49 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "com.google.firebase.example.appcheck" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.example.appcheck" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + multiDexEnabled = true + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("com.google.android.material:material:1.9.0") + implementation("androidx.constraintlayout:constraintlayout:2.1.4") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + implementation("com.google.firebase:firebase-appcheck-playintegrity") + implementation("com.google.firebase:firebase-appcheck-debug:17.0.0") + implementation("com.google.firebase:firebase-appcheck-ktx:17.0.0") + + implementation("com.squareup.retrofit2:retrofit:2.9.0") + implementation("androidx.core:core-ktx:1.10.1") +} \ No newline at end of file diff --git a/appcheck/app/proguard-rules.pro b/appcheck/app/proguard-rules.pro index 481bb4348..ff59496d8 100644 --- a/appcheck/app/proguard-rules.pro +++ b/appcheck/app/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/appcheck/build.gradle b/appcheck/build.gradle deleted file mode 100644 index c158d91a4..000000000 --- a/appcheck/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. -buildscript { - ext.kotlin_version = '1.5.21' - repositories { - google() - mavenCentral() - } - dependencies { - classpath "com.android.tools.build:gradle:8.0.1" - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.google.gms:google-services:4.3.15' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} \ No newline at end of file diff --git a/appcheck/build.gradle.kts b/appcheck/build.gradle.kts new file mode 100644 index 000000000..9bed70528 --- /dev/null +++ b/appcheck/build.gradle.kts @@ -0,0 +1,23 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + maven("https://android-sdk.is.com/") + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} \ No newline at end of file diff --git a/appcheck/gradle/wrapper/gradle-wrapper.properties b/appcheck/gradle/wrapper/gradle-wrapper.properties index 69a15af83..9b344a14c 100644 --- a/appcheck/gradle/wrapper/gradle-wrapper.properties +++ b/appcheck/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Mon Jul 26 13:22:22 PDT 2021 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/appcheck/settings.gradle b/appcheck/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/appcheck/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/appcheck/settings.gradle.kts b/appcheck/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/appcheck/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/auth/app/build.gradle b/auth/app/build.gradle deleted file mode 100644 index d6f8fe0e9..000000000 --- a/auth/app/build.gradle +++ /dev/null @@ -1,53 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.quickstart.auth" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - multiDexEnabled true - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.firebase.quickstart.auth' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.browser:browser:1.0.0' - implementation 'androidx.cardview:cardview:1.0.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'com.google.android.material:material:1.9.0' - implementation 'androidx.activity:activity:1.7.1' - - implementation "com.google.firebase:firebase-auth-ktx:22.0.0" - - // [START gradle_firebase_ui_auth] - implementation "com.firebaseui:firebase-ui-auth:8.0.2" - - // Required only if Facebook login support is required - // Find the latest Facebook SDK releases here: https://goo.gl/Ce5L94 - implementation "com.facebook.android:facebook-android-sdk:4.42.0" - // [END gradle_firebase_ui_auth] -} - -repositories { - mavenCentral() -} diff --git a/auth/app/build.gradle.kts b/auth/app/build.gradle.kts new file mode 100644 index 000000000..e8286b4eb --- /dev/null +++ b/auth/app/build.gradle.kts @@ -0,0 +1,56 @@ +plugins { + id("com.android.application") + id("kotlin-android") +} + +android { + namespace = "com.google.firebase.quickstart.auth" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.quickstart.auth" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + multiDexEnabled = true + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("androidx.browser:browser:1.0.0") + implementation("androidx.cardview:cardview:1.0.0") + implementation("androidx.constraintlayout:constraintlayout:2.1.4") + implementation("com.google.android.material:material:1.9.0") + implementation("androidx.activity:activity-ktx:1.7.1") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Add the dependency for the Firebase Authentication library + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-auth-ktx") + + // [START gradle_firebase_ui_auth] + implementation("com.firebaseui:firebase-ui-auth:8.0.2") + + // Required only if Facebook login support is required + // Find the latest Facebook SDK releases here: https://goo.gl/Ce5L94 + implementation("com.facebook.android:facebook-android-sdk:4.42.0") + // [END gradle_firebase_ui_auth] +} diff --git a/auth/app/proguard-rules.pro b/auth/app/proguard-rules.pro index a5afa4992..e0535e42a 100644 --- a/auth/app/proguard-rules.pro +++ b/auth/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /usr/local/google/home/samstern/android-sdk-linux/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/auth/build.gradle b/auth/build.gradle deleted file mode 100644 index 590c01899..000000000 --- a/auth/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/auth/build.gradle.kts b/auth/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/auth/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/auth/gradle.properties b/auth/gradle.properties index 89e0d99e2..acf164f6c 100644 --- a/auth/gradle.properties +++ b/auth/gradle.properties @@ -16,3 +16,5 @@ # 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 +android.enableJetifier=true +android.useAndroidX=true diff --git a/auth/gradle/wrapper/gradle-wrapper.properties b/auth/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/auth/gradle/wrapper/gradle-wrapper.properties +++ b/auth/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/auth/settings.gradle b/auth/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/auth/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/auth/settings.gradle.kts b/auth/settings.gradle.kts new file mode 100644 index 000000000..829e50961 --- /dev/null +++ b/auth/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") \ No newline at end of file diff --git a/build.gradle b/build.gradle deleted file mode 100644 index f9dca900f..000000000 --- a/build.gradle +++ /dev/null @@ -1,83 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -plugins { - id 'com.github.ben-manes.versions' version '0.41.0' -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } - - def isNonStable = { candidate -> - return ['alpha', 'beta', 'rc', 'snapshot', '-m'].any { word -> - return candidate.version.toLowerCase().contains(word) - } - } - - def isBlocked = { candidate -> - def blocklist = [ - 'androidx.browser:browser', - 'com.facebook.android:facebook-android-sdk', - 'com.applovin:applovin-sdk', - 'com.ironsource.sdk:mediationsdk' - ] - return blocklist.any { word -> - return candidate.toString().contains(word) - } - } - - dependencyUpdates { - rejectVersionIf { - isNonStable(it.candidate) || isBlocked(it.candidate) - } - } -} - -configurations { - ktlint -} - -dependencies { - ktlint ("com.pinterest:ktlint:0.49.1") { - attributes { - attribute(Bundling.BUNDLING_ATTRIBUTE, getObjects().named(Bundling, Bundling.EXTERNAL)) - } - } -} - -task("ktlint", type: JavaExec, group: "verification") { - def outputDir = "${project.buildDir}/reports/ktlint/" - def inputFiles = project.fileTree(dir: "src", include: "**/*.kt") - def outputFile = "${outputDir}ktlint-checkstyle-report.xml" - - // See: - // https://medium.com/@vanniktech/making-your-gradle-tasks-incremental-7f26e4ef09c3 - inputs.files(inputFiles) - outputs.dir(outputDir) - - description = "Check Kotlin code style." - classpath = configurations.ktlint - mainClass.set("com.pinterest.ktlint.Main") - args = [ - "--format", - "--code-style=android_studio", - "--reporter=plain", - "--reporter=checkstyle,output=${outputFile}", - "**/*.kt", - ] - jvmArgs "--add-opens=java.base/java.lang=ALL-UNNAMED" -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 000000000..7c29947f2 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,79 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false + id("com.google.firebase.crashlytics") version "2.9.4" apply false + id("com.google.firebase.firebase-perf") version "1.4.2" apply false + id("androidx.navigation.safeargs") version "2.5.3" apply false + id("com.github.ben-manes.versions") version "0.41.0" apply true +} + +allprojects { + repositories { + google() + mavenLocal() + mavenCentral() + } +} + +fun isNonStable(candidate: ModuleComponentIdentifier): Boolean { + return listOf("alpha", "beta", "rc", "snapshot", "-m").any { keyword -> + keyword in candidate.version.lowercase() + } +} + +fun isBlockListed(candidate: ModuleComponentIdentifier): Boolean { + return listOf( + "androidx.browser:browser", + "com.facebook.android:facebook-android-sdk", + "com.applovin:applovin-sdk", + "com.ironsource.sdk:mediationsdk" + ).any { keyword -> + keyword in candidate.toString().lowercase() + } +} + +tasks.withType { + rejectVersionIf { + isNonStable(candidate) || isBlockListed(candidate) + } +} + +val ktlint by configurations.creating + +dependencies { + ktlint("com.pinterest:ktlint:0.49.0") { + attributes { + attribute(Bundling.BUNDLING_ATTRIBUTE, objects.named(Bundling.EXTERNAL)) + } + } +} + +tasks.register("ktlintCheck") { + val outputDir = "${project.buildDir}/reports/ktlint/" + val inputFiles = project.fileTree("src").include("**/*.kt") + val outputFile = "${outputDir}ktlint-checkstyle-report.xml" + + // See: https://medium.com/@vanniktech/making-your-gradle-tasks-incremental-7f26e4ef09c3 + inputs.files(inputFiles) + outputs.file(outputFile) + + group = LifecycleBasePlugin.VERIFICATION_GROUP + description = "Check Kotlin code style" + classpath = ktlint + mainClass.set("com.pinterest.ktlint.Main") + + args( + "--format", + "--code-style=android_studio", + "--reporter=plain", + "--reporter=checkstyle,output=${outputFile}", + "**/*.kt" + ) + + jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED") +} diff --git a/config/app/build.gradle b/config/app/build.gradle deleted file mode 100644 index 3cacd8d27..000000000 --- a/config/app/build.gradle +++ /dev/null @@ -1,51 +0,0 @@ -plugins { - id 'com.android.application' - id 'org.jetbrains.kotlin.android' -} - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.quickstart.config" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - multiDexEnabled true - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.firebase.quickstart.config' -} - -dependencies { - implementation 'androidx.core:core-ktx:1.9.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'com.google.android.material:material:1.9.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - // Remote Config - implementation "com.google.firebase:firebase-config-ktx:21.4.0" - - // For an optimal experience using Remote Config, add the Firebase SDK - // for Google Analytics. This is recommended, but not required. - implementation 'com.google.firebase:firebase-analytics-ktx:21.2.2' - - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' -} \ No newline at end of file diff --git a/config/app/build.gradle.kts b/config/app/build.gradle.kts new file mode 100644 index 000000000..056e4c801 --- /dev/null +++ b/config/app/build.gradle.kts @@ -0,0 +1,51 @@ +plugins { + id("com.android.application") + id("kotlin-android") +} + +android { + namespace = "com.google.firebase.quickstart.config" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.quickstart.config" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + multiDexEnabled = true + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.core:core-ktx:1.10.1") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("com.google.android.material:material:1.9.0") + implementation("androidx.constraintlayout:constraintlayout:2.1.4") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Add the dependencies for the Remote Config and Analytics libraries + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-config-ktx") + implementation("com.google.firebase:firebase-analytics-ktx") + + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test.ext:junit:1.1.5") + androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") +} \ No newline at end of file diff --git a/config/app/proguard-rules.pro b/config/app/proguard-rules.pro index 481bb4348..ff59496d8 100644 --- a/config/app/proguard-rules.pro +++ b/config/app/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/config/build.gradle b/config/build.gradle deleted file mode 100644 index 590c01899..000000000 --- a/config/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/config/build.gradle.kts b/config/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/config/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/config/gradle.properties b/config/gradle.properties index 89e0d99e2..210ead18e 100644 --- a/config/gradle.properties +++ b/config/gradle.properties @@ -16,3 +16,4 @@ # 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 +android.useAndroidX=true diff --git a/config/gradle/wrapper/gradle-wrapper.properties b/config/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/config/gradle/wrapper/gradle-wrapper.properties +++ b/config/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/config/settings.gradle b/config/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/config/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/config/settings.gradle.kts b/config/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/config/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/crashlytics/app/build.gradle b/crashlytics/app/build.gradle deleted file mode 100644 index e3f881daf..000000000 --- a/crashlytics/app/build.gradle +++ /dev/null @@ -1,43 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'com.google.gms.google-services' -apply plugin: 'com.google.firebase.crashlytics' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.example.crashlytics" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.firebase.example.crashlytics' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - - implementation 'com.google.firebase:firebase-crashlytics:18.3.7' - implementation 'com.google.firebase:firebase-crashlytics-ktx:18.3.7' - - // For an optimal experience using Crashlytics, add the Firebase SDK - // for Google Analytics. This is recommended, but not required. - implementation 'com.google.firebase:firebase-analytics:21.2.2' -} diff --git a/crashlytics/app/build.gradle.kts b/crashlytics/app/build.gradle.kts new file mode 100644 index 000000000..b542a664b --- /dev/null +++ b/crashlytics/app/build.gradle.kts @@ -0,0 +1,46 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") + id("com.google.firebase.crashlytics") +} + +android { + namespace = "com.google.firebase.example.crashlytics" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.example.crashlytics" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Add the dependencies for the Crashlytics and Analytics libraries + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-crashlytics-ktx") + implementation("com.google.firebase:firebase-analytics-ktx") +} diff --git a/crashlytics/app/proguard-rules.pro b/crashlytics/app/proguard-rules.pro index af6097fd5..4f3270429 100644 --- a/crashlytics/app/proguard-rules.pro +++ b/crashlytics/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/crashlytics/build.gradle b/crashlytics/build.gradle deleted file mode 100644 index cf8475b3d..000000000 --- a/crashlytics/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.5' - } -} - -allprojects { - repositories { - google() - mavenLocal() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/crashlytics/build.gradle.kts b/crashlytics/build.gradle.kts new file mode 100644 index 000000000..60d64d0c3 --- /dev/null +++ b/crashlytics/build.gradle.kts @@ -0,0 +1,23 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false + id("com.google.firebase.crashlytics") version "2.9.4" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/crashlytics/gradle.properties b/crashlytics/gradle.properties index aac7c9b46..6dd0218ed 100644 --- a/crashlytics/gradle.properties +++ b/crashlytics/gradle.properties @@ -10,6 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/crashlytics/gradle/wrapper/gradle-wrapper.properties b/crashlytics/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/crashlytics/gradle/wrapper/gradle-wrapper.properties +++ b/crashlytics/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/crashlytics/settings.gradle b/crashlytics/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/crashlytics/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/crashlytics/settings.gradle.kts b/crashlytics/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/crashlytics/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/database/app/build.gradle b/database/app/build.gradle deleted file mode 100644 index 77aa161f8..000000000 --- a/database/app/build.gradle +++ /dev/null @@ -1,42 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.referencecode.database" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - packagingOptions { - resources { - // Required to avoid clashes in Jackson. - excludes += ['META-INF/LICENSE', 'META-INF/LICENSE-FIREBASE.txt', 'META-INF/NOTICE'] - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.firebase.referencecode.database' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation "com.google.firebase:firebase-database-ktx:20.2.1" -} - -apply plugin: 'com.google.gms.google-services' diff --git a/database/app/build.gradle.kts b/database/app/build.gradle.kts new file mode 100644 index 000000000..89696402f --- /dev/null +++ b/database/app/build.gradle.kts @@ -0,0 +1,51 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "com.google.firebase.referencecode.database" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.referencecode.database" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + packaging { + resources.excludes += "META-INF/LICENSE" + resources.excludes += "META-INF/LICENSE-FIREBASE.txt" + resources.excludes += "META-INF/NOTICE" + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } + buildFeatures { + viewBinding = true + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Add the dependency for the Realtime Database library + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-database-ktx") +} diff --git a/database/app/proguard-rules.pro b/database/app/proguard-rules.pro index 98ab6b648..75eaf04dc 100644 --- a/database/app/proguard-rules.pro +++ b/database/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /home/gkal/android-sdks/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/database/build.gradle b/database/build.gradle deleted file mode 100644 index 7f317d5b1..000000000 --- a/database/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenLocal() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/database/build.gradle.kts b/database/build.gradle.kts new file mode 100644 index 000000000..f3dc8c88f --- /dev/null +++ b/database/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} \ No newline at end of file diff --git a/database/gradle.properties b/database/gradle.properties index 1d3591c8a..ccd5dda1d 100644 --- a/database/gradle.properties +++ b/database/gradle.properties @@ -15,4 +15,5 @@ # When configured, Gradle will run in incubating parallel mode. # 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 \ No newline at end of file +# org.gradle.parallel=true +android.useAndroidX=true \ No newline at end of file diff --git a/database/gradle/wrapper/gradle-wrapper.properties b/database/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/database/gradle/wrapper/gradle-wrapper.properties +++ b/database/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/database/settings.gradle b/database/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/database/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/database/settings.gradle.kts b/database/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/database/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/dl-invites/app/build.gradle b/dl-invites/app/build.gradle deleted file mode 100644 index 2654f9198..000000000 --- a/dl-invites/app/build.gradle +++ /dev/null @@ -1,41 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.dynamicinvites" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - multiDexEnabled true - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.firebase.dynamicinvites' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.cardview:cardview:1.0.0' - implementation 'androidx.recyclerview:recyclerview:1.3.0' - implementation 'com.google.firebase:firebase-dynamic-links:21.1.0' - - implementation 'com.google.android.material:material:1.9.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' -} diff --git a/dl-invites/app/build.gradle.kts b/dl-invites/app/build.gradle.kts new file mode 100644 index 000000000..016ac11bb --- /dev/null +++ b/dl-invites/app/build.gradle.kts @@ -0,0 +1,48 @@ +plugins { + id("com.android.application") + id("kotlin-android") +} + +android { + namespace = "com.google.firebase.dynamicinvites" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.dynamicinvites" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + multiDexEnabled = true + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("androidx.cardview:cardview:1.0.0") + implementation("androidx.recyclerview:recyclerview:1.3.0") + implementation("com.google.android.material:material:1.9.0") + implementation("androidx.constraintlayout:constraintlayout:2.1.4") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Add the dependency for the Dynamic Links library + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-dynamic-links-ktx") +} diff --git a/dl-invites/app/proguard-rules.pro b/dl-invites/app/proguard-rules.pro index f1b424510..2f9dc5a47 100644 --- a/dl-invites/app/proguard-rules.pro +++ b/dl-invites/app/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/dl-invites/build.gradle b/dl-invites/build.gradle deleted file mode 100644 index cefd1a1ff..000000000 --- a/dl-invites/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenLocal() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/dl-invites/build.gradle.kts b/dl-invites/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/dl-invites/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/dl-invites/gradle.properties b/dl-invites/gradle.properties index 82618cecb..ec5d04486 100644 --- a/dl-invites/gradle.properties +++ b/dl-invites/gradle.properties @@ -7,6 +7,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # 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 diff --git a/dl-invites/gradle/wrapper/gradle-wrapper.properties b/dl-invites/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/dl-invites/gradle/wrapper/gradle-wrapper.properties +++ b/dl-invites/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/dl-invites/settings.gradle b/dl-invites/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/dl-invites/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/dl-invites/settings.gradle.kts b/dl-invites/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/dl-invites/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/dynamic-links/app/build.gradle b/dynamic-links/app/build.gradle deleted file mode 100644 index 8da92b617..000000000 --- a/dynamic-links/app/build.gradle +++ /dev/null @@ -1,45 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.quickstart.dynamiclinks" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - multiDexEnabled true - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.firebase.quickstart.dynamiclinks' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation "com.google.firebase:firebase-auth-ktx:22.0.0" - implementation "com.google.firebase:firebase-invites:17.0.0" - implementation "com.google.firebase:firebase-dynamic-links-ktx:21.1.0" - - // For an optimal experience using Dynamic Links, add the Firebase SDK - // for Google Analytics. This is recommended, but not required. - implementation 'com.google.firebase:firebase-analytics:21.2.2' - - implementation "com.google.firebase:firebase-database-ktx:20.2.1" - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' -} diff --git a/dynamic-links/app/build.gradle.kts b/dynamic-links/app/build.gradle.kts new file mode 100644 index 000000000..3d05c914d --- /dev/null +++ b/dynamic-links/app/build.gradle.kts @@ -0,0 +1,52 @@ +plugins { + id("com.android.application") + id("kotlin-android") +} + +android { + namespace = "com.google.firebase.quickstart.dynamiclinks" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.quickstart.dynamiclinks" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + multiDexEnabled = true + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-auth-ktx") + implementation("com.google.firebase:firebase-database-ktx") + implementation("com.google.firebase:firebase-dynamic-links-ktx") + implementation("com.google.firebase:firebase-invites:17.0.0") + + // For an optimal experience using Dynamic Links, add the Firebase SDK + // for Google Analytics. This is recommended, but not required. + implementation("com.google.firebase:firebase-analytics-ktx") + + implementation("androidx.constraintlayout:constraintlayout:2.1.4") +} diff --git a/dynamic-links/app/proguard-rules.pro b/dynamic-links/app/proguard-rules.pro index a5afa4992..e0535e42a 100644 --- a/dynamic-links/app/proguard-rules.pro +++ b/dynamic-links/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /usr/local/google/home/samstern/android-sdk-linux/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/dynamic-links/build.gradle b/dynamic-links/build.gradle deleted file mode 100644 index 590c01899..000000000 --- a/dynamic-links/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/dynamic-links/build.gradle.kts b/dynamic-links/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/dynamic-links/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/dynamic-links/gradle.properties b/dynamic-links/gradle.properties index aac7c9b46..6dd0218ed 100644 --- a/dynamic-links/gradle.properties +++ b/dynamic-links/gradle.properties @@ -10,6 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/dynamic-links/gradle/wrapper/gradle-wrapper.properties b/dynamic-links/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/dynamic-links/gradle/wrapper/gradle-wrapper.properties +++ b/dynamic-links/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/dynamic-links/settings.gradle b/dynamic-links/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/dynamic-links/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/dynamic-links/settings.gradle.kts b/dynamic-links/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/dynamic-links/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/firebaseoptions/app/build.gradle b/firebaseoptions/app/build.gradle deleted file mode 100644 index 8f278501a..000000000 --- a/firebaseoptions/app/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "devrel.firebase.google.com.firebaseoptions" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'devrel.firebase.google.com.firebaseoptions' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation "com.google.firebase:firebase-common-ktx:20.3.2" - implementation "com.google.firebase:firebase-database-ktx:20.2.1" -} - -apply plugin: 'com.google.gms.google-services' diff --git a/firebaseoptions/app/build.gradle.kts b/firebaseoptions/app/build.gradle.kts new file mode 100644 index 000000000..c19ced5e9 --- /dev/null +++ b/firebaseoptions/app/build.gradle.kts @@ -0,0 +1,42 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "devrel.firebase.google.com.firebaseoptions" + compileSdk = 33 + + defaultConfig { + applicationId = "devrel.firebase.google.com.firebaseoptions" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + implementation("com.google.firebase:firebase-database-ktx") + implementation("com.google.firebase:firebase-common-ktx") +} diff --git a/firebaseoptions/app/proguard-rules.pro b/firebaseoptions/app/proguard-rules.pro index af6097fd5..4f3270429 100644 --- a/firebaseoptions/app/proguard-rules.pro +++ b/firebaseoptions/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/firebaseoptions/build.gradle b/firebaseoptions/build.gradle deleted file mode 100644 index 590c01899..000000000 --- a/firebaseoptions/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/firebaseoptions/build.gradle.kts b/firebaseoptions/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/firebaseoptions/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/firebaseoptions/gradle.properties b/firebaseoptions/gradle.properties index aac7c9b46..6dd0218ed 100644 --- a/firebaseoptions/gradle.properties +++ b/firebaseoptions/gradle.properties @@ -10,6 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/firebaseoptions/gradle/wrapper/gradle-wrapper.properties b/firebaseoptions/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/firebaseoptions/gradle/wrapper/gradle-wrapper.properties +++ b/firebaseoptions/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/firebaseoptions/settings.gradle b/firebaseoptions/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/firebaseoptions/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/firebaseoptions/settings.gradle.kts b/firebaseoptions/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/firebaseoptions/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/firestore/app/build.gradle b/firestore/app/build.gradle deleted file mode 100644 index 78b5e117a..000000000 --- a/firestore/app/build.gradle +++ /dev/null @@ -1,61 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.example.firestore" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - multiDexEnabled true - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.example.firestore' - lint { - warning 'InvalidPackage' - } -} - -repositories { - google() - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - implementation 'androidx.multidex:multidex:2.0.1' - - // Firestore - implementation "com.google.firebase:firebase-firestore-ktx:24.6.0" - - // Firebase / Play Services - implementation "com.google.firebase:firebase-auth:22.0.0" - implementation "com.google.android.gms:play-services-auth:20.5.0" - implementation "com.google.firebase:firebase-functions-ktx:20.3.0" - - // GeoFire (for Geoqueries solution) - implementation "com.firebase:geofire-android-common:3.2.0" -} - -apply plugin: 'com.google.gms.google-services' diff --git a/firestore/app/build.gradle.kts b/firestore/app/build.gradle.kts new file mode 100644 index 000000000..300373b8c --- /dev/null +++ b/firestore/app/build.gradle.kts @@ -0,0 +1,58 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "com.google.example.firestore" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.example.firestore" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + multiDexEnabled = true + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } + lint { + warning += "InvalidPackage" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("androidx.constraintlayout:constraintlayout:2.1.4") + implementation("androidx.multidex:multidex:2.0.1") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Declare the dependency for the Cloud Firestore library + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-firestore-ktx") + + // Firebase / Play Services + implementation("com.google.firebase:firebase-auth-ktx") + implementation("com.google.android.gms:play-services-auth:20.5.0") + implementation("com.google.firebase:firebase-functions-ktx") + + // GeoFire (for Geoqueries solution) + implementation("com.firebase:geofire-android-common:3.2.0") +} diff --git a/firestore/app/proguard-rules.pro b/firestore/app/proguard-rules.pro index e39333687..6731bfd6e 100644 --- a/firestore/app/proguard-rules.pro +++ b/firestore/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /usr/local/google/home/samstern/android-sdk-linux/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/firestore/build.gradle b/firestore/build.gradle deleted file mode 100644 index 2ec81cd67..000000000 --- a/firestore/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - mavenLocal() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/firestore/build.gradle.kts b/firestore/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/firestore/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/firestore/gradle.properties b/firestore/gradle.properties index a5705d8a0..6dd0218ed 100644 --- a/firestore/gradle.properties +++ b/firestore/gradle.properties @@ -10,9 +10,9 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # 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 -android.enableBuildCache=false diff --git a/firestore/gradle/wrapper/gradle-wrapper.properties b/firestore/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/firestore/gradle/wrapper/gradle-wrapper.properties +++ b/firestore/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/firestore/settings.gradle b/firestore/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/firestore/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/firestore/settings.gradle.kts b/firestore/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/firestore/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/functions/app/build.gradle b/functions/app/build.gradle deleted file mode 100644 index 0bdaa005a..000000000 --- a/functions/app/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "devrel.firebase.google.com.functions" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'devrel.firebase.google.com.functions' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - - implementation "com.google.firebase:firebase-functions-ktx:20.3.0" -} - -apply plugin: 'com.google.gms.google-services' diff --git a/functions/app/build.gradle.kts b/functions/app/build.gradle.kts new file mode 100644 index 000000000..41fafe434 --- /dev/null +++ b/functions/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "devrel.firebase.google.com.functions" + compileSdk = 33 + + defaultConfig { + applicationId = "devrel.firebase.google.com.functions" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Add the dependency for the Cloud Functions library + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-functions-ktx") +} diff --git a/functions/app/proguard-rules.pro b/functions/app/proguard-rules.pro index af6097fd5..4f3270429 100644 --- a/functions/app/proguard-rules.pro +++ b/functions/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/functions/build.gradle b/functions/build.gradle deleted file mode 100644 index 590c01899..000000000 --- a/functions/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/functions/build.gradle.kts b/functions/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/functions/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/functions/gradle.properties b/functions/gradle.properties index aac7c9b46..6dd0218ed 100644 --- a/functions/gradle.properties +++ b/functions/gradle.properties @@ -10,6 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/functions/gradle/wrapper/gradle-wrapper.properties b/functions/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/functions/gradle/wrapper/gradle-wrapper.properties +++ b/functions/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/functions/settings.gradle b/functions/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/functions/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/functions/settings.gradle.kts b/functions/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/functions/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index da1db5f04..e1bef7e87 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/inappmessaging/app/build.gradle b/inappmessaging/app/build.gradle deleted file mode 100644 index 93ee097fc..000000000 --- a/inappmessaging/app/build.gradle +++ /dev/null @@ -1,48 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.example.inappmessaging" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - multiDexEnabled true - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'devrel.firebase.google.com.firebaseoptions' - lint { - // TODO(thatfiredev): Remove this once - // https://github.com/bumptech/glide/issues/4940 is fixed - disable 'NotificationPermission' - } -} - -dependencies { - implementation 'androidx.multidex:multidex:2.0.1' - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.browser:browser:1.0.0' - - implementation "com.google.firebase:firebase-inappmessaging-ktx:20.3.2" - implementation "com.google.firebase:firebase-inappmessaging-display-ktx:20.3.2" - - // The Firebase SDK for Google Analytics is required to use In-App Messaging. - implementation 'com.google.firebase:firebase-analytics:21.2.2' -} diff --git a/inappmessaging/app/build.gradle.kts b/inappmessaging/app/build.gradle.kts new file mode 100644 index 000000000..927151b92 --- /dev/null +++ b/inappmessaging/app/build.gradle.kts @@ -0,0 +1,53 @@ +plugins { + id("com.android.application") + id("kotlin-android") +} + +android { + namespace = "com.google.firebase.example.inappmessaging" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.example.inappmessaging" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + multiDexEnabled = true + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } + lint { + // TODO(thatfiredev): Remove this once + // https://github.com/bumptech/glide/issues/4940 is fixed + disable += "NotificationPermission" + } +} + +dependencies { + implementation("androidx.multidex:multidex:2.0.1") + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("androidx.browser:browser:1.5.0") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Add the dependencies for the In-App Messaging and Analytics libraries + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-inappmessaging-display-ktx") + implementation("com.google.firebase:firebase-analytics-ktx") +} diff --git a/inappmessaging/app/proguard-rules.pro b/inappmessaging/app/proguard-rules.pro index af6097fd5..4f3270429 100644 --- a/inappmessaging/app/proguard-rules.pro +++ b/inappmessaging/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/inappmessaging/build.gradle b/inappmessaging/build.gradle deleted file mode 100644 index cefd1a1ff..000000000 --- a/inappmessaging/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenLocal() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/inappmessaging/build.gradle.kts b/inappmessaging/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/inappmessaging/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/inappmessaging/gradle.properties b/inappmessaging/gradle.properties index aac7c9b46..6dd0218ed 100644 --- a/inappmessaging/gradle.properties +++ b/inappmessaging/gradle.properties @@ -10,6 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/inappmessaging/gradle/wrapper/gradle-wrapper.properties b/inappmessaging/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/inappmessaging/gradle/wrapper/gradle-wrapper.properties +++ b/inappmessaging/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/inappmessaging/settings.gradle b/inappmessaging/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/inappmessaging/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/inappmessaging/settings.gradle.kts b/inappmessaging/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/inappmessaging/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/installations/app/build.gradle b/installations/app/build.gradle deleted file mode 100644 index 31239531e..000000000 --- a/installations/app/build.gradle +++ /dev/null @@ -1,41 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'com.google.gms.google-services' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.samples.snippet" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.samples.snippet' -} - -dependencies { - implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation 'androidx.core:core-ktx:1.9.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' - - implementation 'com.google.firebase:firebase-installations:17.1.3' -} \ No newline at end of file diff --git a/installations/app/build.gradle.kts b/installations/app/build.gradle.kts new file mode 100644 index 000000000..54c032716 --- /dev/null +++ b/installations/app/build.gradle.kts @@ -0,0 +1,41 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "com.google.samples.snippet" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.samples.snippet" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation(fileTree("libs").include("*.jar")) + implementation("androidx.core:core-ktx:1.10.1") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("androidx.constraintlayout:constraintlayout:2.1.4") + + implementation("com.google.firebase:firebase-installations:17.1.3") +} \ No newline at end of file diff --git a/installations/app/proguard-rules.pro b/installations/app/proguard-rules.pro index 481bb4348..ff59496d8 100644 --- a/installations/app/proguard-rules.pro +++ b/installations/app/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/installations/build.gradle b/installations/build.gradle deleted file mode 100644 index f9c97dd39..000000000 --- a/installations/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath "com.android.tools.build:gradle:8.0.1" - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} \ No newline at end of file diff --git a/installations/build.gradle.kts b/installations/build.gradle.kts new file mode 100644 index 000000000..00c0745d1 --- /dev/null +++ b/installations/build.gradle.kts @@ -0,0 +1,21 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} \ No newline at end of file diff --git a/installations/gradle/wrapper/gradle-wrapper.properties b/installations/gradle/wrapper/gradle-wrapper.properties index 5c2842f68..fb3509f85 100644 --- a/installations/gradle/wrapper/gradle-wrapper.properties +++ b/installations/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip diff --git a/installations/settings.gradle b/installations/settings.gradle deleted file mode 100644 index 8cedfc042..000000000 --- a/installations/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -include ':app' -rootProject.name = "My Application" \ No newline at end of file diff --git a/installations/settings.gradle.kts b/installations/settings.gradle.kts new file mode 100644 index 000000000..f7b3b2744 --- /dev/null +++ b/installations/settings.gradle.kts @@ -0,0 +1,10 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") +rootProject.name = "My Application" \ No newline at end of file diff --git a/messaging/app/build.gradle b/messaging/app/build.gradle deleted file mode 100644 index b3aa02445..000000000 --- a/messaging/app/build.gradle +++ /dev/null @@ -1,51 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.example.messaging" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - multiDexEnabled true - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.firebase.example.messaging' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation "com.google.firebase:firebase-messaging-ktx:23.1.2" - - // For an optimal experience using FCM, add the Firebase SDK - // for Google Analytics. This is recommended, but not required. - implementation 'com.google.firebase:firebase-analytics:21.2.2' - - // Used to store FCM Registration Token. - // This is recommended, but not required. - // See: https://firebase.google.com/docs/cloud-messaging/manage-tokens - implementation 'com.google.firebase:firebase-firestore-ktx:24.6.0' - - implementation "com.google.android.gms:play-services-auth:20.5.0" - implementation 'androidx.work:work-runtime-ktx:2.8.1' - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1' -} - -apply plugin: 'com.google.gms.google-services' diff --git a/messaging/app/build.gradle.kts b/messaging/app/build.gradle.kts new file mode 100644 index 000000000..1947d104e --- /dev/null +++ b/messaging/app/build.gradle.kts @@ -0,0 +1,57 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "com.google.firebase.example.messaging" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.example.messaging" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + multiDexEnabled = true + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + + // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Import Firebase Cloud Messaging library + implementation("com.google.firebase:firebase-messaging-ktx") + + // For an optimal experience using FCM, add the Firebase SDK + // for Google Analytics. This is recommended, but not required. + implementation("com.google.firebase:firebase-analytics") + + // Used to store FCM Registration Token. + // This is recommended, but not required. + // See: https://firebase.google.com/docs/cloud-messaging/manage-tokens + implementation("com.google.firebase:firebase-firestore-ktx") + + implementation("com.google.android.gms:play-services-auth:20.5.0") + implementation("androidx.work:work-runtime-ktx:2.8.1") + implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1") +} diff --git a/messaging/app/proguard-rules.pro b/messaging/app/proguard-rules.pro index af6097fd5..4f3270429 100644 --- a/messaging/app/proguard-rules.pro +++ b/messaging/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/messaging/build.gradle b/messaging/build.gradle deleted file mode 100644 index cefd1a1ff..000000000 --- a/messaging/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenLocal() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/messaging/build.gradle.kts b/messaging/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/messaging/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/messaging/gradle.properties b/messaging/gradle.properties index aac7c9b46..6dd0218ed 100644 --- a/messaging/gradle.properties +++ b/messaging/gradle.properties @@ -10,6 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/messaging/gradle/wrapper/gradle-wrapper.properties b/messaging/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/messaging/gradle/wrapper/gradle-wrapper.properties +++ b/messaging/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/messaging/settings.gradle b/messaging/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/messaging/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/messaging/settings.gradle.kts b/messaging/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/messaging/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/ml-functions/app/build.gradle b/ml-functions/app/build.gradle deleted file mode 100644 index 98b78f180..000000000 --- a/ml-functions/app/build.gradle +++ /dev/null @@ -1,54 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'kotlin-android-extensions' - -android { - // Changes the test build type for instrumented tests to "stage". - testBuildType "release" - compileSdkVersion 33 - - defaultConfig { - applicationId "devrel.firebase.google.com.mlfunctions" - minSdkVersion 16 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' - } - - buildTypes { - release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - testProguardFiles getDefaultProguardFile('proguard-android.txt'), 'test-proguard-rules.pro' - signingConfig signingConfigs.debug - } - } - - buildFeatures { - viewBinding = true - } -} - -dependencies { - implementation 'androidx.appcompat:appcompat:1.6.1' - - // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) - implementation platform('com.google.firebase:firebase-bom:26.1.1') - - // Cloud Functions for Firebase (Java) - implementation 'com.google.firebase:firebase-functions' - - // Cloud Functions for Firebase (Kotlin) - implementation 'com.google.firebase:firebase-functions-ktx' - - implementation 'com.google.code.gson:gson:2.8.6' - - testImplementation 'junit:junit:4.13.1' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' - androidTestImplementation 'androidx.test:rules:1.3.0' - androidTestImplementation 'androidx.test:runner:1.3.0' - androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' -} - -apply plugin: 'com.google.gms.google-services' \ No newline at end of file diff --git a/ml-functions/app/build.gradle.kts b/ml-functions/app/build.gradle.kts new file mode 100644 index 000000000..c51813686 --- /dev/null +++ b/ml-functions/app/build.gradle.kts @@ -0,0 +1,61 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "devrel.firebase.google.com.mlfunctions" + // Changes the test build type for instrumented tests to "stage". + testBuildType = "release" + compileSdk = 33 + + defaultConfig { + applicationId = "devrel.firebase.google.com.mlfunctions" + minSdk = 16 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + testProguardFiles(getDefaultProguardFile("proguard-android.txt"), "test-proguard-rules.pro") + signingConfig = signingConfigs.getByName("debug") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } + buildFeatures { + viewBinding = true + } +} + +dependencies { + implementation("androidx.appcompat:appcompat:1.6.1") + + // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Cloud Functions for Firebase (Java) + implementation("com.google.firebase:firebase-functions") + + // Cloud Functions for Firebase (Kotlin) + implementation("com.google.firebase:firebase-functions-ktx") + + implementation("com.google.code.gson:gson:2.9.0") + + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") + androidTestImplementation("androidx.test:rules:1.5.0") + androidTestImplementation("androidx.test:runner:1.5.2") + androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0") +} diff --git a/ml-functions/app/proguard-rules.pro b/ml-functions/app/proguard-rules.pro index af6097fd5..bfbdb437b 100644 --- a/ml-functions/app/proguard-rules.pro +++ b/ml-functions/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/ml-functions/app/src/main/AndroidManifest.xml b/ml-functions/app/src/main/AndroidManifest.xml index b683517ef..97c286e32 100644 --- a/ml-functions/app/src/main/AndroidManifest.xml +++ b/ml-functions/app/src/main/AndroidManifest.xml @@ -8,7 +8,8 @@ android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> - + diff --git a/ml-functions/build.gradle b/ml-functions/build.gradle deleted file mode 100644 index 590c01899..000000000 --- a/ml-functions/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/ml-functions/build.gradle.kts b/ml-functions/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/ml-functions/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/ml-functions/gradle/wrapper/gradle-wrapper.properties b/ml-functions/gradle/wrapper/gradle-wrapper.properties index 2c02f232e..918f55e3d 100644 --- a/ml-functions/gradle/wrapper/gradle-wrapper.properties +++ b/ml-functions/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip diff --git a/ml-functions/settings.gradle b/ml-functions/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/ml-functions/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/ml-functions/settings.gradle.kts b/ml-functions/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/ml-functions/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/mlkit/app/build.gradle b/mlkit/app/build.gradle deleted file mode 100644 index 484903c7b..000000000 --- a/mlkit/app/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.example.mlkit" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - lintOptions { - // MLKit libraries are deprecated - abortOnError false - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - packagingOptions { - exclude 'META-INF/androidx.exifinterface_exifinterface.version' - exclude 'META-INF/proguard/androidx-annotations.pro' - } - namespace 'devrel.firebase.google.com.firebaseoptions' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.exifinterface:exifinterface:1.3.5' - implementation "com.google.firebase:firebase-ml-common:22.1.2" - implementation "com.google.firebase:firebase-ml-model-interpreter:22.0.4" - implementation "com.google.firebase:firebase-ml-vision:24.1.0" - - // Needed to fix a temporary issue with duplicate class com.google.android.gms.internal.vision.* errors - // Image Labeling model. - implementation 'com.google.android.gms:play-services-vision:20.1.3' - implementation 'com.google.android.gms:play-services-vision-common:19.1.3' -} - -apply plugin: 'com.google.gms.google-services' diff --git a/mlkit/app/build.gradle.kts b/mlkit/app/build.gradle.kts new file mode 100644 index 000000000..0acc82813 --- /dev/null +++ b/mlkit/app/build.gradle.kts @@ -0,0 +1,57 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "com.google.firebase.example.mlkit" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.example.mlkit" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + lint { + // MLKit libraries are deprecated + abortOnError = false + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } + packaging { + resources.excludes += "META-INF/androidx.exifinterface_exifinterface.version" + resources.excludes += "META-INF/proguard/androidx-annotations.pro" + } + buildFeatures { + buildConfig = true + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("androidx.exifinterface:exifinterface:1.3.5") + implementation("com.google.firebase:firebase-ml-common:22.1.2") + implementation("com.google.firebase:firebase-ml-model-interpreter:22.0.4") + implementation("com.google.firebase:firebase-ml-vision:24.1.0") + + // Needed to fix a temporary issue with duplicate class com.google.android.gms.internal.vision.* errors + // Image Labeling model. + implementation("com.google.android.gms:play-services-vision:20.1.3") + implementation("com.google.android.gms:play-services-vision-common:19.1.3") +} diff --git a/mlkit/app/proguard-rules.pro b/mlkit/app/proguard-rules.pro index af6097fd5..4f3270429 100644 --- a/mlkit/app/proguard-rules.pro +++ b/mlkit/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/mlkit/app/src/main/java/com/google/firebase/example/mlkit/MainActivity.java b/mlkit/app/src/main/java/com/google/firebase/example/mlkit/MainActivity.java index f5b4bb2aa..c3997160a 100644 --- a/mlkit/app/src/main/java/com/google/firebase/example/mlkit/MainActivity.java +++ b/mlkit/app/src/main/java/com/google/firebase/example/mlkit/MainActivity.java @@ -2,14 +2,13 @@ import androidx.appcompat.app.AppCompatActivity; +import com.google.firebase.BuildConfig; import com.google.firebase.ml.vision.FirebaseVision; import com.google.firebase.ml.vision.cloud.FirebaseVisionCloudDetectorOptions; import com.google.firebase.ml.vision.common.FirebaseVisionImage; import com.google.firebase.ml.vision.common.FirebaseVisionImageMetadata; import com.google.firebase.ml.vision.label.FirebaseVisionCloudImageLabelerOptions; -import devrel.firebase.google.com.firebaseoptions.BuildConfig; - public class MainActivity extends AppCompatActivity { public void buildCloudVisionOptions() { diff --git a/mlkit/app/src/main/java/com/google/firebase/example/mlkit/kotlin/MainActivity.kt b/mlkit/app/src/main/java/com/google/firebase/example/mlkit/kotlin/MainActivity.kt index bd08aceec..15e644d47 100644 --- a/mlkit/app/src/main/java/com/google/firebase/example/mlkit/kotlin/MainActivity.kt +++ b/mlkit/app/src/main/java/com/google/firebase/example/mlkit/kotlin/MainActivity.kt @@ -1,12 +1,12 @@ package com.google.firebase.example.mlkit.kotlin import androidx.appcompat.app.AppCompatActivity +import com.google.firebase.BuildConfig import com.google.firebase.ml.vision.FirebaseVision import com.google.firebase.ml.vision.cloud.FirebaseVisionCloudDetectorOptions import com.google.firebase.ml.vision.common.FirebaseVisionImage import com.google.firebase.ml.vision.common.FirebaseVisionImageMetadata import com.google.firebase.ml.vision.label.FirebaseVisionCloudImageLabelerOptions -import devrel.firebase.google.com.firebaseoptions.BuildConfig class MainActivity : AppCompatActivity() { diff --git a/mlkit/build.gradle b/mlkit/build.gradle deleted file mode 100644 index cefd1a1ff..000000000 --- a/mlkit/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenLocal() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/mlkit/build.gradle.kts b/mlkit/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/mlkit/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/mlkit/gradle/wrapper/gradle-wrapper.properties b/mlkit/gradle/wrapper/gradle-wrapper.properties index ae04661ee..2b0d721f6 100644 --- a/mlkit/gradle/wrapper/gradle-wrapper.properties +++ b/mlkit/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ +#Mon May 15 13:34:12 BST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/mlkit/settings.gradle b/mlkit/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/mlkit/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/mlkit/settings.gradle.kts b/mlkit/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/mlkit/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/perf/app/build.gradle b/perf/app/build.gradle deleted file mode 100644 index 7b89aa5ce..000000000 --- a/perf/app/build.gradle +++ /dev/null @@ -1,38 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'com.google.gms.google-services' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.example.perf" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - multiDexEnabled true - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'devrel.firebase.google.com.firebaseoptions' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation "com.google.firebase:firebase-config-ktx:21.4.0" - implementation "com.google.firebase:firebase-perf-ktx:20.3.2" -} diff --git a/perf/app/build.gradle.kts b/perf/app/build.gradle.kts new file mode 100644 index 000000000..003f78c87 --- /dev/null +++ b/perf/app/build.gradle.kts @@ -0,0 +1,47 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") + id("com.google.firebase.firebase-perf") +} + +android { + namespace = "com.google.firebase.example.perf" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.example.perf" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + multiDexEnabled = true + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Add the dependency for the Performance Monitoring library + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-perf-ktx") + implementation("com.google.firebase:firebase-config-ktx") +} diff --git a/perf/app/proguard-rules.pro b/perf/app/proguard-rules.pro index af6097fd5..4f3270429 100644 --- a/perf/app/proguard-rules.pro +++ b/perf/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/perf/app/src/main/java/com/google/firebase/example/perf/MainActivity.java b/perf/app/src/main/java/com/google/firebase/example/perf/MainActivity.java index 1b9ec1159..3698f3b16 100644 --- a/perf/app/src/main/java/com/google/firebase/example/perf/MainActivity.java +++ b/perf/app/src/main/java/com/google/firebase/example/perf/MainActivity.java @@ -23,8 +23,6 @@ import java.net.URL; import java.util.Map; -import devrel.firebase.google.com.firebaseoptions.R; - public class MainActivity extends AppCompatActivity { // [START perf_traced_create] diff --git a/perf/app/src/main/java/com/google/firebase/example/perf/kotlin/MainActivity.kt b/perf/app/src/main/java/com/google/firebase/example/perf/kotlin/MainActivity.kt index 54e0e0cde..93a8de2da 100644 --- a/perf/app/src/main/java/com/google/firebase/example/perf/kotlin/MainActivity.kt +++ b/perf/app/src/main/java/com/google/firebase/example/perf/kotlin/MainActivity.kt @@ -2,6 +2,7 @@ package com.google.firebase.example.perf.kotlin import android.os.Bundle import androidx.appcompat.app.AppCompatActivity +import com.google.firebase.example.perf.R import com.google.firebase.example.perf.kotlin.model.ItemCache import com.google.firebase.example.perf.kotlin.model.User import com.google.firebase.ktx.Firebase @@ -10,7 +11,6 @@ import com.google.firebase.perf.ktx.performance import com.google.firebase.perf.ktx.trace import com.google.firebase.perf.metrics.AddTrace import com.google.firebase.remoteconfig.ktx.remoteConfig -import devrel.firebase.google.com.firebaseoptions.R import java.io.DataOutputStream import java.io.IOException import java.io.InputStream diff --git a/perf/build.gradle b/perf/build.gradle deleted file mode 100644 index cefd1a1ff..000000000 --- a/perf/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenLocal() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/perf/build.gradle.kts b/perf/build.gradle.kts new file mode 100644 index 000000000..e66160722 --- /dev/null +++ b/perf/build.gradle.kts @@ -0,0 +1,23 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false + id("com.google.firebase.firebase-perf") version "1.4.2" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/perf/gradle.properties b/perf/gradle.properties index aac7c9b46..6dd0218ed 100644 --- a/perf/gradle.properties +++ b/perf/gradle.properties @@ -10,6 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/perf/gradle/wrapper/gradle-wrapper.properties b/perf/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/perf/gradle/wrapper/gradle-wrapper.properties +++ b/perf/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/perf/settings.gradle b/perf/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/perf/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/perf/settings.gradle.kts b/perf/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/perf/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 22f780c8c..000000000 --- a/settings.gradle +++ /dev/null @@ -1,20 +0,0 @@ -include ':auth:app', - ':appcheck:app', - ':config:app', - ':database:app', - ':dynamic-links:app', - ':dl-invites:app', - ':firebaseoptions:app', - ':functions:app', - ':firestore:app', - ':storage:app', - ':tasks:app', - ':inappmessaging:app', - ':admob:app', - ':messaging:app', - ':crashlytics:app', - ':perf:app', - ':test-lab:app', - ':analytics:app', - ':installations:app' - diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 000000000..6ac3b56bd --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,29 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":auth:app", + ":appcheck:app", + ":config:app", + ":database:app", + ":dynamic-links:app", + ":dl-invites:app", + ":firebaseoptions:app", + ":functions:app", + ":firestore:app", + ":storage:app", + ":tasks:app", + ":inappmessaging:app", + ":admob:app", + ":messaging:app", + ":crashlytics:app", + ":perf:app", + ":test-lab:app", + ":analytics:app", + ":installations:app" +) + diff --git a/storage/app/build.gradle b/storage/app/build.gradle deleted file mode 100644 index a51a1c954..000000000 --- a/storage/app/build.gradle +++ /dev/null @@ -1,57 +0,0 @@ -plugins { - id 'com.android.application' - id 'kotlin-android' - id 'com.google.devtools.ksp' version '1.8.20-1.0.10' -} - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.referencecode.storage" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - namespace 'com.google.firebase.referencecode.storage' - lint { - // TODO(thatfiredev): Remove this once - // https://github.com/bumptech/glide/issues/4940 is fixed - disable 'NotificationPermission' - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - - // Workaround until https://youtrack.jetbrains.com/issue/KT-55947 is fixed - tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { - kotlinOptions { - jvmTarget = "11" - } - } -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation "com.google.firebase:firebase-storage-ktx:20.2.0" - - implementation 'com.firebaseui:firebase-ui-storage:8.0.2' - implementation 'com.github.bumptech.glide:glide:4.15.1' - ksp 'com.github.bumptech.glide:ksp:4.15.1' - - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' -} - -apply plugin: 'com.google.gms.google-services' diff --git a/storage/app/build.gradle.kts b/storage/app/build.gradle.kts new file mode 100644 index 000000000..c9af0f11f --- /dev/null +++ b/storage/app/build.gradle.kts @@ -0,0 +1,55 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") + id("com.google.devtools.ksp") version "1.8.20-1.0.10" +} + +android { + namespace = "com.google.firebase.referencecode.storage" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.referencecode.storage" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + lint { + // TODO(thatfiredev): Remove this once + // https://github.com/bumptech/glide/issues/4940 is fixed + disable += "NotificationPermission" + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + + // Import the BoM for the Firebase platform + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Add the dependency for the Cloud Storage library + // When using the BoM, you don't specify versions in Firebase library dependencies + implementation("com.google.firebase:firebase-storage-ktx") + + implementation("com.firebaseui:firebase-ui-storage:8.0.2") + implementation("com.github.bumptech.glide:glide:4.15.1") + ksp("com.github.bumptech.glide:ksp:4.15.1") + + implementation("androidx.constraintlayout:constraintlayout:2.1.4") +} diff --git a/storage/app/google-services.json b/storage/app/google-services.json index 01aee2cfd..650635515 100644 --- a/storage/app/google-services.json +++ b/storage/app/google-services.json @@ -177,4 +177,4 @@ ], "client_info": [], "ARTIFACT_VERSION": "1" -} +} \ No newline at end of file diff --git a/storage/app/proguard-rules.pro b/storage/app/proguard-rules.pro index a76554022..5c0f2549c 100644 --- a/storage/app/proguard-rules.pro +++ b/storage/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/puf/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/storage/build.gradle b/storage/build.gradle deleted file mode 100644 index 590c01899..000000000 --- a/storage/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/storage/build.gradle.kts b/storage/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/storage/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/storage/gradle.properties b/storage/gradle.properties index 1d3591c8a..ccd5dda1d 100644 --- a/storage/gradle.properties +++ b/storage/gradle.properties @@ -15,4 +15,5 @@ # When configured, Gradle will run in incubating parallel mode. # 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 \ No newline at end of file +# org.gradle.parallel=true +android.useAndroidX=true \ No newline at end of file diff --git a/storage/gradle/wrapper/gradle-wrapper.properties b/storage/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/storage/gradle/wrapper/gradle-wrapper.properties +++ b/storage/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/storage/settings.gradle b/storage/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/storage/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/storage/settings.gradle.kts b/storage/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/storage/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/tasks/app/build.gradle b/tasks/app/build.gradle deleted file mode 100644 index 01fecaa49..000000000 --- a/tasks/app/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply plugin: 'com.google.gms.google-services' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.quickstart.tasks" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'com.google.firebase.quickstart.tasks' -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - - implementation "com.google.firebase:firebase-auth-ktx:22.0.0" -} diff --git a/tasks/app/build.gradle.kts b/tasks/app/build.gradle.kts new file mode 100644 index 000000000..79bd6a683 --- /dev/null +++ b/tasks/app/build.gradle.kts @@ -0,0 +1,43 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "com.google.firebase.quickstart.tasks" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.quickstart.tasks" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + + // Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom) + implementation(platform("com.google.firebase:firebase-bom:32.0.0")) + + // Import Firebase Authentication library + implementation("com.google.firebase:firebase-auth-ktx") +} diff --git a/tasks/app/proguard-rules.pro b/tasks/app/proguard-rules.pro index a5afa4992..e0535e42a 100644 --- a/tasks/app/proguard-rules.pro +++ b/tasks/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /usr/local/google/home/samstern/android-sdk-linux/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/tasks/build.gradle b/tasks/build.gradle deleted file mode 100644 index 590c01899..000000000 --- a/tasks/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenCentral() - mavenLocal() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/tasks/build.gradle.kts b/tasks/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/tasks/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/tasks/gradle.properties b/tasks/gradle.properties index aac7c9b46..6dd0218ed 100644 --- a/tasks/gradle.properties +++ b/tasks/gradle.properties @@ -10,6 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/tasks/gradle/wrapper/gradle-wrapper.properties b/tasks/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/tasks/gradle/wrapper/gradle-wrapper.properties +++ b/tasks/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/tasks/settings.gradle b/tasks/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/tasks/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/tasks/settings.gradle.kts b/tasks/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/tasks/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app") diff --git a/test-lab/app/build.gradle b/test-lab/app/build.gradle deleted file mode 100644 index ee5c029e6..000000000 --- a/test-lab/app/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdkVersion 33 - - defaultConfig { - applicationId "com.google.firebase.example.testlab" - minSdkVersion 19 - targetSdkVersion 33 - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - kotlinOptions { - jvmTarget = '11' - } - namespace 'devrel.firebase.google.com.firebaseoptions' -} - -repositories { - flatDir { - dirs '../aars' - } -} - -dependencies { - implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation "com.google.firebase:firebase-iid:21.1.0" - - implementation(name:'cloudtestingscreenshotter_lib', ext:'aar') - -} - -apply plugin: 'com.google.gms.google-services' diff --git a/test-lab/app/build.gradle.kts b/test-lab/app/build.gradle.kts new file mode 100644 index 000000000..ae0542d61 --- /dev/null +++ b/test-lab/app/build.gradle.kts @@ -0,0 +1,45 @@ +plugins { + id("com.android.application") + id("kotlin-android") + id("com.google.gms.google-services") +} + +android { + namespace = "com.google.firebase.example.testlab" + compileSdk = 33 + + defaultConfig { + applicationId = "com.google.firebase.example.testlab" + minSdk = 19 + targetSdk = 33 + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildTypes { + getByName("release") { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } +} + +repositories { + flatDir { + dirs("../aars") + } +} + +dependencies { + implementation("androidx.legacy:legacy-support-v4:1.0.0") + implementation("androidx.appcompat:appcompat:1.6.1") + implementation("com.google.firebase:firebase-iid:21.1.0") + implementation(fileTree("../aars")) +} diff --git a/test-lab/app/proguard-rules.pro b/test-lab/app/proguard-rules.pro index af6097fd5..4f3270429 100644 --- a/test-lab/app/proguard-rules.pro +++ b/test-lab/app/proguard-rules.pro @@ -2,7 +2,7 @@ # By default, the flags in this file are appended to flags specified # in /Users/ianbarber/Library/Android/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. +# directive in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/test-lab/build.gradle b/test-lab/build.gradle deleted file mode 100644 index cefd1a1ff..000000000 --- a/test-lab/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - google() - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:8.0.1' - classpath 'com.google.gms:google-services:4.3.15' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21" - } -} - -allprojects { - repositories { - google() - mavenLocal() - mavenCentral() - } -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/test-lab/build.gradle.kts b/test-lab/build.gradle.kts new file mode 100644 index 000000000..862035098 --- /dev/null +++ b/test-lab/build.gradle.kts @@ -0,0 +1,22 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +plugins { + id("com.android.application") version "8.0.0" apply false + id("com.android.library") version "8.0.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.20" apply false + id("com.google.gms.google-services") version "4.3.15" apply false +} + +allprojects { + repositories { + mavenLocal() + google() + mavenCentral() + } +} + +tasks { + register("clean", Delete::class) { + delete(rootProject.buildDir) + } +} diff --git a/test-lab/gradle.properties b/test-lab/gradle.properties index aac7c9b46..6dd0218ed 100644 --- a/test-lab/gradle.properties +++ b/test-lab/gradle.properties @@ -10,6 +10,7 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit diff --git a/test-lab/gradle/wrapper/gradle-wrapper.properties b/test-lab/gradle/wrapper/gradle-wrapper.properties index ae04661ee..e1bef7e87 100644 --- a/test-lab/gradle/wrapper/gradle-wrapper.properties +++ b/test-lab/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/test-lab/settings.gradle b/test-lab/settings.gradle deleted file mode 100644 index e7b4def49..000000000 --- a/test-lab/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':app' diff --git a/test-lab/settings.gradle.kts b/test-lab/settings.gradle.kts new file mode 100644 index 000000000..6950372e0 --- /dev/null +++ b/test-lab/settings.gradle.kts @@ -0,0 +1,9 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +include(":app")