Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firebase-sessions-bugbash release #5069

Open
wants to merge 18 commits into
base: releases/firebase-sessions-bugbash
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions appcheck/firebase-appcheck-interop/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Unreleased


3 changes: 3 additions & 0 deletions encoders/firebase-decoders-json/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Unreleased


3 changes: 3 additions & 0 deletions encoders/firebase-encoders-json/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Unreleased


3 changes: 3 additions & 0 deletions encoders/firebase-encoders-processor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Unreleased


3 changes: 3 additions & 0 deletions encoders/firebase-encoders-proto/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Unreleased


3 changes: 3 additions & 0 deletions encoders/firebase-encoders-reflective/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Unreleased


3 changes: 3 additions & 0 deletions encoders/firebase-encoders/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Unreleased


3 changes: 3 additions & 0 deletions encoders/protoc-gen-firebase-encoders/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Unreleased


9 changes: 9 additions & 0 deletions firebase-common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Unreleased

# 20.3.3
* [fixed] Addressed issue with C++ being absent in user agent.

## Kotlin
The Kotlin extensions library transitively includes the updated
`firebase-common` library. The Kotlin extensions library has no additional
updates
4 changes: 2 additions & 2 deletions firebase-common/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=20.3.3
latestReleasedVersion=20.3.2
version=20.3.4
latestReleasedVersion=20.3.3
android.enableUnitTestBinaryResources=true
3 changes: 3 additions & 0 deletions firebase-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Unreleased


Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Unreleased


77 changes: 31 additions & 46 deletions firebase-crashlytics/ktx/ktx.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,44 @@
// limitations under the License.

plugins {
id 'firebase-library'
id 'kotlin-android'
id "firebase-library"
id "kotlin-android"
}

firebaseLibrary {
libraryGroup "crashlytics"
testLab.enabled = true
publishJavadoc = true
publishSources = true
libraryGroup "crashlytics"
testLab.enabled = true
publishJavadoc = true
publishSources = true
}

android {
compileSdkVersion 33
defaultConfig {
minSdk 16
multiDexEnabled true
targetSdk 33
versionName version
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java {
srcDir 'src/test/kotlin'
}
androidTest.java.srcDirs += 'src/androidTest/kotlin'
}
testOptions.unitTests.includeAndroidResources = true
compileSdk 33
defaultConfig {
minSdk 16
multiDexEnabled true
targetSdk 33
versionName version
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
testOptions.unitTests.includeAndroidResources = true
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"

implementation 'com.google.firebase:firebase-common:20.3.1'
implementation 'com.google.firebase:firebase-components:17.1.0'
implementation 'com.google.firebase:firebase-common-ktx:20.3.1'
implementation project(':firebase-crashlytics')
implementation 'androidx.annotation:annotation:1.1.0'

testImplementation "org.robolectric:robolectric:$robolectricVersion"
testImplementation 'junit:junit:4.12'
testImplementation "com.google.truth:truth:$googleTruthVersion"
testImplementation 'org.mockito:mockito-core:2.25.0'

androidTestImplementation 'junit:junit:4.12'
androidTestImplementation "com.google.truth:truth:$googleTruthVersion"
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test:core:1.2.0'
implementation "com.google.firebase:firebase-common-ktx:20.3.2"
implementation "com.google.firebase:firebase-common:20.3.2"
implementation "com.google.firebase:firebase-components:17.1.0"
implementation(libs.androidx.annotation)
implementation project(":firebase-crashlytics")

androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation(libs.truth)
}

// ==========================================================================
// Copy from here down if you want to use the google-services plugin in your
// androidTest integration tests.
// ==========================================================================
ext.packageName = "com.google.firebase.crashlytics.ktx"
apply from: '../../gradle/googleServices.gradle'
30 changes: 22 additions & 8 deletions firebase-crashlytics/ktx/src/androidTest/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
<!--
~ Copyright 2023 Google LLC
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.firebase.crashlytics.ktx">
<!--Although the *SdkVersion is captured in gradle build files, this is required for non gradle builds-->
<!--<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="23" />-->
<uses-permission android:name="android.permission.INTERNET"/>
package="com.google.firebase.crashlytics.ktx"
android:versionCode="1"
android:versionName="1.0.0">

<application>
<uses-library android:name="android.test.runner" />

</application>

<instrumentation
android:name="androidx.test.runner.AndroidJUnitRunner"
android:targetPackage="com.google.firebase.crashlytics.ktx" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,38 @@

package com.google.firebase.crashlytics.ktx

import androidx.test.InstrumentationRegistry
import androidx.test.runner.AndroidJUnit4
import androidx.test.core.app.ApplicationProvider
import androidx.test.ext.junit.runners.AndroidJUnit4
import com.google.common.truth.Truth.assertThat
import com.google.firebase.FirebaseApp
import com.google.firebase.FirebaseOptions
import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.google.firebase.ktx.Firebase
import com.google.firebase.ktx.app
import com.google.firebase.ktx.initialize
import com.google.firebase.platforminfo.UserAgentPublisher
import org.junit.AfterClass
import org.junit.BeforeClass
import org.junit.After
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith

@RunWith(AndroidJUnit4::class)
class CrashlyticsTests {
companion object {
lateinit var app: FirebaseApp

@BeforeClass
@JvmStatic
fun setup() {
app = Firebase.initialize(InstrumentationRegistry.getContext())!!
}
@Before
fun setUp() {
Firebase.initialize(
ApplicationProvider.getApplicationContext(),
FirebaseOptions.Builder()
.setApplicationId(APP_ID)
.setApiKey(API_KEY)
.setProjectId(PROJECT_ID)
.build()
)
}

@AfterClass
@JvmStatic
fun cleanup() {
app.delete()
}
@After
fun cleanUp() {
FirebaseApp.clearInstancesForTest()
}

@Test
Expand All @@ -52,32 +54,14 @@ class CrashlyticsTests {
}

@Test
fun testDataCall() {
assertThat("hola").isEqualTo("hola")
fun libraryRegistrationAtRuntime() {
val publisher = Firebase.app.get(UserAgentPublisher::class.java)
assertThat(publisher.userAgent).contains(FirebaseCrashlyticsKtxRegistrar.LIBRARY_NAME)
}
}

@RunWith(AndroidJUnit4::class)
class LibraryVersionTest {
companion object {
lateinit var app: FirebaseApp

@BeforeClass
@JvmStatic
fun setup() {
app = Firebase.initialize(InstrumentationRegistry.getContext())!!
}

@AfterClass
@JvmStatic
fun cleanup() {
app.delete()
}
}

@Test
fun libraryRegistrationAtRuntime() {
val publisher = Firebase.app.get(UserAgentPublisher::class.java)
assertThat(publisher.userAgent).contains(LIBRARY_NAME)
private const val APP_ID = "1:1:android:1a"
private const val API_KEY = "API-KEY-API-KEY-API-KEY-API-KEY-API-KEY"
private const val PROJECT_ID = "PROJECT-ID"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ fun FirebaseCrashlytics.setCustomKeys(init: KeyValueBuilder.() -> Unit) {
builder.init()
}

internal const val LIBRARY_NAME: String = "fire-cls-ktx"

/** @suppress */
@Keep
class FirebaseCrashlyticsKtxRegistrar : ComponentRegistrar {
internal class FirebaseCrashlyticsKtxRegistrar : ComponentRegistrar {
override fun getComponents(): List<Component<*>> =
listOf(LibraryVersionComponent.create(LIBRARY_NAME, BuildConfig.VERSION_NAME))

companion object {
internal const val LIBRARY_NAME: String = "fire-cls-ktx"
}
}
Loading