Skip to content

Commit 39440a7

Browse files
Migrate all quickstart apps to most recent AGP and kts syntax (#1493)
* Migrated admob module to most recent AGP and KTS syntax * Removed commented lines * Migrated analytics module to most recent AGP and KTS syntax * Migrated app distro module to most recent AGP and KTS syntax * Migrated auth module to most recent AGP and KTS syntax * Migrated config module to most recent AGP and KTS syntax * Migrated crashlytics module to most recent AGP and KTS syntax * Updating material and Firebase bom to latest version * Auto-update dependencies. (#1489) * Auto-update dependencies. (#1490) * Auto-update dependencies. (#1492) * Migrated admob module to most recent AGP and KTS syntax * Removed commented lines * Migrated config module to most recent AGP and KTS syntax * Migrated crashlytics module to most recent AGP and KTS syntax * Updating material and Firebase bom to latest version * Migrated database module to most recent AGP and KTS syntax * Migrated firestore module to most recent AGP and KTS syntax * Migrated functions module to most recent AGP and KTS syntax * Migrated dynamic links module to most recent AGP and KTS syntax * Migrated in app messaging module to most recent AGP and KTS syntax * Migrated messaging module to most recent AGP and KTS syntax * Migrated perf module to most recent AGP and KTS syntax * Migrated storage module to most recent AGP and KTS syntax * converted main gradle files to kts * configured ktlint tasks * Worked on comments made on PR * chore(dynamiclinks): assembleDebugAndroidTest --> assembleMainFlavorDebugAndroidTest * chore(perf): configure the FirebasePerfExtension * chore(ktlint): input.file() --> input.files() * chore(crash): enable multiDex * Update build.gradle.kts --------- Co-authored-by: rosariopf <[email protected]>
1 parent a028b56 commit 39440a7

File tree

139 files changed

+1940
-1849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+1940
-1849
lines changed

admob/app/build.gradle

-70
This file was deleted.

admob/app/build.gradle.kts

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import com.android.build.gradle.internal.tasks.factory.dependsOn
2+
3+
plugins {
4+
id("com.android.application")
5+
id("kotlin-android")
6+
id("com.google.gms.google-services")
7+
}
8+
9+
tasks {
10+
check.dependsOn("assembleDebugAndroidTest")
11+
}
12+
13+
android {
14+
namespace = "com.google.samples.quickstart.admobexample"
15+
compileSdk = 33
16+
17+
defaultConfig {
18+
applicationId = "com.google.samples.quickstart.admobexample"
19+
minSdk = 19
20+
targetSdk = 33
21+
versionCode = 1
22+
versionName = "1.0"
23+
multiDexEnabled = true
24+
25+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
26+
}
27+
28+
buildTypes {
29+
getByName("release") {
30+
isMinifyEnabled = false
31+
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
32+
}
33+
}
34+
packaging {
35+
resources.excludes += "LICENSE.txt"
36+
}
37+
compileOptions {
38+
sourceCompatibility = JavaVersion.VERSION_17
39+
targetCompatibility = JavaVersion.VERSION_17
40+
}
41+
kotlinOptions {
42+
jvmTarget = "17"
43+
}
44+
buildFeatures {
45+
viewBinding = true
46+
}
47+
}
48+
49+
dependencies {
50+
implementation(project(":internal:lintchecks"))
51+
implementation(project(":internal:chooserx"))
52+
implementation("androidx.appcompat:appcompat:1.6.1")
53+
implementation("com.google.android.material:material:1.9.0")
54+
implementation("androidx.browser:browser:1.5.0")
55+
implementation("androidx.navigation:navigation-fragment-ktx:2.5.3")
56+
implementation("androidx.navigation:navigation-ui-ktx:2.5.3")
57+
58+
implementation("com.google.android.gms:play-services-ads:22.0.0")
59+
60+
// Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom)
61+
implementation(platform("com.google.firebase:firebase-bom:32.0.0"))
62+
63+
// For an optimal experience using AdMob, add the Firebase SDK
64+
// for Google Analytics. This is recommended, but not required.
65+
implementation("com.google.firebase:firebase-analytics")
66+
67+
debugImplementation("androidx.fragment:fragment-testing:1.5.7")
68+
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
69+
androidTestImplementation("androidx.test:rules:1.5.0")
70+
androidTestImplementation("androidx.test:runner:1.5.2")
71+
androidTestImplementation("androidx.test.ext:junit:1.1.5")
72+
}

admob/app/proguard-rules.pro

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# By default, the flags in this file are appended to flags specified
33
# in ${sdk.dir}/tools/proguard/proguard-android.txt
44
# You can edit the include path and order by changing the proguardFiles
5-
# directive in build.gradle.
5+
# directive in build.gradle.kts.
66
#
77
# For more details, see
88
# http://developer.android.com/guide/developing/tools/proguard.html

admob/build.gradle

-22
This file was deleted.

admob/build.gradle.kts

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
plugins {
4+
id("com.android.application") version "8.0.0" apply false
5+
id("com.android.library") version "8.0.0" apply false
6+
id("org.jetbrains.kotlin.android") version "1.8.20" apply false
7+
id("com.google.gms.google-services") version "4.3.15" apply false
8+
}
9+
10+
allprojects {
11+
repositories {
12+
mavenLocal()
13+
google()
14+
mavenCentral()
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
#Tue May 09 14:39:59 BST 2023
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

admob/settings.gradle

-10
This file was deleted.

admob/settings.gradle.kts

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
pluginManagement {
2+
repositories {
3+
google()
4+
mavenCentral()
5+
gradlePluginPortal()
6+
}
7+
}
8+
9+
include(":app")
10+
11+
// Required so that gradle can resolve these dependencies even when
12+
// building only a single project.
13+
include(":internal:lintchecks")
14+
project(":internal:lintchecks").projectDir = file("../internal/lintchecks")
15+
include(":internal:lint")
16+
project(":internal:lint").projectDir = file("../internal/lint")
17+
include(":internal:chooserx")
18+
project(":internal:chooserx").projectDir = file("../internal/chooserx")

analytics/app/build.gradle

-66
This file was deleted.

analytics/app/build.gradle.kts

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import com.android.build.gradle.internal.tasks.factory.dependsOn
2+
3+
plugins {
4+
id("com.android.application")
5+
id("kotlin-android")
6+
id("com.google.gms.google-services")
7+
}
8+
9+
tasks {
10+
check.dependsOn("assembleDebugAndroidTest")
11+
}
12+
13+
android {
14+
namespace = "com.google.firebase.quickstart.analytics"
15+
compileSdk = 33
16+
17+
defaultConfig {
18+
applicationId = "com.google.firebase.quickstart.analytics"
19+
minSdk = 19
20+
targetSdk = 33
21+
versionCode = 1
22+
versionName = "1.0"
23+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
24+
multiDexEnabled = true
25+
}
26+
27+
buildTypes {
28+
getByName("release") {
29+
isMinifyEnabled = false
30+
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
31+
}
32+
}
33+
34+
compileOptions {
35+
sourceCompatibility = JavaVersion.VERSION_17
36+
targetCompatibility = JavaVersion.VERSION_17
37+
}
38+
39+
kotlinOptions {
40+
jvmTarget = "17"
41+
}
42+
43+
buildFeatures {
44+
viewBinding = true
45+
}
46+
}
47+
48+
dependencies {
49+
implementation(project(":internal:lintchecks"))
50+
implementation(project(":internal:chooserx"))
51+
52+
implementation("com.google.android.material:material:1.9.0")
53+
implementation("androidx.appcompat:appcompat:1.6.1")
54+
implementation("androidx.preference:preference-ktx:1.2.0")
55+
// Needed to override the version used by preference-ktx
56+
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1")
57+
58+
// Import the Firebase BoM (see: https://firebase.google.com/docs/android/learn-more#bom)
59+
implementation(platform("com.google.firebase:firebase-bom:32.0.0"))
60+
61+
// Firebase Analytics (Java)
62+
implementation("com.google.firebase:firebase-analytics")
63+
64+
// Firebase Analytics (Kotlin)
65+
implementation("com.google.firebase:firebase-analytics-ktx")
66+
67+
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
68+
androidTestImplementation("androidx.test:rules:1.5.0")
69+
androidTestImplementation("androidx.test:runner:1.5.2")
70+
androidTestImplementation("androidx.test.ext:junit:1.1.5")
71+
}

analytics/app/proguard-rules.pro

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# By default, the flags in this file are appended to flags specified
33
# in ${sdk.dir}/tools/proguard/proguard-android.txt
44
# You can edit the include path and order by changing the proguardFiles
5-
# directive in build.gradle.
5+
# directive in build.gradle.kts.
66
#
77
# For more details, see
88
# http://developer.android.com/guide/developing/tools/proguard.html

0 commit comments

Comments
 (0)