TP-52884 | Bump com.google.firebase:firebase-bom from 33.2.0 to 33.4.0 (#579)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shivam Goyal <shivam.goyal@navi.com>
This commit is contained in:
@@ -4,7 +4,6 @@ plugins {
|
||||
alias libs.plugins.kotlin.android
|
||||
alias libs.plugins.kotlin.kapt
|
||||
alias libs.plugins.ksp
|
||||
alias libs.plugins.paparazzi
|
||||
}
|
||||
|
||||
def VERSION_CODE = 1
|
||||
@@ -50,11 +49,6 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
benchmark {
|
||||
initWith release
|
||||
signingConfig signingConfigs.debug
|
||||
matchingFallbacks = ['release']
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* * Copyright © 2024 by Navi Technologies Limited
|
||||
* * All rights reserved. Strictly confidential
|
||||
*
|
||||
*/
|
||||
|
||||
package com.navi.uitron
|
||||
|
||||
import com.google.gson.GsonBuilder
|
||||
import com.google.gson.JsonObject
|
||||
import com.google.gson.JsonParser
|
||||
import com.navi.uitron.deserializer.BaseUiTronActionDeserializer
|
||||
import com.navi.uitron.deserializer.BaseUiTronTriggerApiActionDeserializer
|
||||
import com.navi.uitron.deserializer.ComposePropertyDeserializer
|
||||
import com.navi.uitron.deserializer.CustomShapeDeserializer
|
||||
import com.navi.uitron.deserializer.UiTronDataDeserializer
|
||||
import com.navi.uitron.deserializer.UiTronValidationDeserializer
|
||||
import com.navi.uitron.deserializer.VisualTransformationDataDeserializer
|
||||
import com.navi.uitron.model.UiTronResponse
|
||||
import com.navi.uitron.model.action.TriggerApiAction
|
||||
import com.navi.uitron.model.data.UiTronAction
|
||||
import com.navi.uitron.model.data.UiTronData
|
||||
import com.navi.uitron.model.ui.BaseProperty
|
||||
import com.navi.uitron.model.ui.UiTronShape
|
||||
import com.navi.uitron.model.visualtransformation.VisualTransformationData
|
||||
import com.navi.uitron.validation.UiTronBaseValidation
|
||||
import java.io.InputStreamReader
|
||||
|
||||
object TestUtil {
|
||||
|
||||
fun getMock(key: String): UiTronResponse {
|
||||
val dataString = getJsonContent("test_mock.json")
|
||||
val jsonElement = (JsonParser.parseString(dataString) as? JsonObject)?.get(key)
|
||||
|
||||
val customGson =
|
||||
GsonBuilder()
|
||||
.registerTypeAdapter(UiTronData::class.java, UiTronDataDeserializer())
|
||||
.registerTypeAdapter(
|
||||
UiTronBaseValidation::class.java,
|
||||
UiTronValidationDeserializer()
|
||||
)
|
||||
.registerTypeAdapter(BaseProperty::class.java, ComposePropertyDeserializer())
|
||||
.registerTypeAdapter(UiTronAction::class.java, BaseUiTronActionDeserializer())
|
||||
.registerTypeAdapter(
|
||||
TriggerApiAction::class.java,
|
||||
BaseUiTronTriggerApiActionDeserializer()
|
||||
)
|
||||
.registerTypeAdapter(
|
||||
VisualTransformationData::class.java,
|
||||
VisualTransformationDataDeserializer()
|
||||
)
|
||||
.registerTypeAdapter(UiTronShape::class.java, CustomShapeDeserializer())
|
||||
.create()
|
||||
|
||||
return customGson.fromJson(jsonElement, UiTronResponse::class.java)
|
||||
}
|
||||
|
||||
private fun getJsonContent(fileName: String): String {
|
||||
return InputStreamReader(this.javaClass.classLoader!!.getResourceAsStream(fileName)).use {
|
||||
it.readText()
|
||||
}
|
||||
}
|
||||
|
||||
fun getTag(viewType: String, layoutId: String): String {
|
||||
return viewType + "_" + layoutId
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* * Copyright © 2024 by Navi Technologies Limited
|
||||
* * All rights reserved. Strictly confidential
|
||||
*
|
||||
*/
|
||||
|
||||
package com.navi.uitron.render
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import app.cash.paparazzi.Paparazzi
|
||||
import com.navi.uitron.TestUtil
|
||||
import com.navi.uitron.UiTronSdkManager
|
||||
import com.navi.uitron.demo.UiTronDependencyProvider
|
||||
import com.navi.uitron.viewmodel.UiTronViewModel
|
||||
import org.junit.Before
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class TextRendererTest {
|
||||
|
||||
@get:Rule val paparazzi = Paparazzi(maxPercentDifference = 0.01)
|
||||
|
||||
@Before
|
||||
fun setup() {
|
||||
UiTronSdkManager.init(UiTronDependencyProvider())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun test() {
|
||||
val response = TestUtil.getMock("textRenderer")
|
||||
paparazzi.snapshot {
|
||||
Box(modifier = Modifier.background(Color.White)) {
|
||||
UiTronRenderer(response.data, UiTronViewModel())
|
||||
.Render(composeViews = response.parentComposeView!!)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"textRenderer": {
|
||||
"data": {
|
||||
"textId": {
|
||||
"viewType": "Text",
|
||||
"text": "Testing text"
|
||||
}
|
||||
},
|
||||
"view": [
|
||||
{
|
||||
"property": {
|
||||
"viewType": "Text",
|
||||
"layoutId": "textId",
|
||||
"fontSize": 36,
|
||||
"width": "200",
|
||||
"height": "100"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
1
benchmark/.gitignore
vendored
1
benchmark/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
/build
|
||||
@@ -1,50 +0,0 @@
|
||||
plugins {
|
||||
alias libs.plugins.android.test
|
||||
alias libs.plugins.kotlin.android
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.navi.uitron.benchmark'
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
minSdk 23
|
||||
targetSdk 34
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
benchmark {
|
||||
debuggable true
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
matchingFallbacks.add("release")
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '17'
|
||||
}
|
||||
|
||||
targetProjectPath = ":app"
|
||||
experimentalProperties["android.experimental.self-instrumenting"] = true
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation libs.androidx.benchmark.junit4
|
||||
implementation libs.androidx.benchmark.macroJunit4
|
||||
implementation libs.androidx.test.espresso.core
|
||||
implementation libs.androidx.test.junit
|
||||
implementation libs.androidx.uiautomator
|
||||
}
|
||||
|
||||
androidComponents {
|
||||
beforeVariants(selector().all()) {
|
||||
enable = buildType == "benchmark"
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
<manifest />
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* * Copyright © 2024 by Navi Technologies Limited
|
||||
* * All rights reserved. Strictly confidential
|
||||
*
|
||||
*/
|
||||
|
||||
package com.navi.uitron.benchmark
|
||||
|
||||
import androidx.benchmark.macro.FrameTimingMetric
|
||||
import androidx.benchmark.macro.StartupMode
|
||||
import androidx.benchmark.macro.junit4.MacrobenchmarkRule
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import androidx.test.uiautomator.By
|
||||
import androidx.test.uiautomator.Until
|
||||
import java.util.concurrent.TimeUnit
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class UiTronBenchmark {
|
||||
@get:Rule val benchmarkRule = MacrobenchmarkRule()
|
||||
|
||||
@Test
|
||||
fun startup() =
|
||||
benchmarkRule.measureRepeated(
|
||||
packageName = "com.navi.uitron.demo",
|
||||
metrics = listOf(FrameTimingMetric()),
|
||||
iterations = 3,
|
||||
startupMode = StartupMode.COLD,
|
||||
) {
|
||||
pressHome()
|
||||
startActivityAndWait()
|
||||
device.wait(
|
||||
Until.hasObject(By.clazz("$packageName.MockActivity")),
|
||||
TimeUnit.SECONDS.toMillis(1)
|
||||
)
|
||||
}
|
||||
}
|
||||
21
build.gradle
21
build.gradle
@@ -7,7 +7,6 @@ plugins {
|
||||
alias libs.plugins.kotlin.kapt apply false
|
||||
alias libs.plugins.kotlin.parcelize apply false
|
||||
alias libs.plugins.ksp apply false
|
||||
alias libs.plugins.paparazzi apply false
|
||||
alias libs.plugins.spotless
|
||||
}
|
||||
|
||||
@@ -39,23 +38,3 @@ allprojects {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
plugins.withId("app.cash.paparazzi") {
|
||||
// Defer until afterEvaluate so that testImplementation is created by Android plugin.
|
||||
afterEvaluate {
|
||||
dependencies.constraints {
|
||||
add("testImplementation", "com.google.guava:guava") {
|
||||
attributes {
|
||||
attribute(
|
||||
TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
|
||||
objects.named(TargetJvmEnvironment, TargetJvmEnvironment.STANDARD_JVM)
|
||||
)
|
||||
}
|
||||
because("LayoutLib and sdk-common depend on Guava's -jre published variant." +
|
||||
"See https://github.com/cashapp/paparazzi/issues/906.")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,3 +21,4 @@ kotlin.code.style=official
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
org.gradle.configuration-cache=true
|
||||
|
||||
@@ -4,7 +4,6 @@ androidGradlePlugin = "8.6.1"
|
||||
android-material = "1.9.0"
|
||||
androidx-activityCompose = "1.7.2"
|
||||
androidx-appcompat = "1.6.1"
|
||||
androidx-benchmark = "1.2.4"
|
||||
androidx-constraintlayoutCompose = "1.1.0-alpha10"
|
||||
androidx-core-ktx = "1.8.0"
|
||||
androidx-hilt = "1.0.0"
|
||||
@@ -15,12 +14,12 @@ androidx-pagingRuntimeKtx = "3.1.1"
|
||||
androidx-profileinstaller = "1.3.1"
|
||||
androidx-test-espresso = "3.5.1"
|
||||
androidx-test-junit = "1.1.5"
|
||||
androidx-uiautomator = "2.2.0"
|
||||
coil = "2.5.0"
|
||||
compose-bom = "2024.09.02"
|
||||
compose-lib = "1.5.14"
|
||||
firebase-bom = "33.4.0"
|
||||
gson = "2.11.0"
|
||||
firebase-bom = "33.2.0"
|
||||
guava = "33.3.1-android"
|
||||
hilt = "2.48"
|
||||
junit = "4.13.2"
|
||||
kotlin = "1.9.24"
|
||||
@@ -30,7 +29,6 @@ mvel2 = "2.4.15.Final"
|
||||
navi-alfred = "1.14.0"
|
||||
navigation-compose = "2.6.0"
|
||||
okhttp-bom = "4.12.0"
|
||||
paparazzi = "1.3.3"
|
||||
retrofit = "2.11.0"
|
||||
room = "2.5.2"
|
||||
spotless = "6.25.0"
|
||||
@@ -45,9 +43,6 @@ androidx-activity-compose = { module = "androidx.activity:activity-compose", ver
|
||||
|
||||
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
|
||||
|
||||
androidx-benchmark-junit4 = { module = "androidx.benchmark:benchmark-junit4", version.ref = "androidx-benchmark" }
|
||||
androidx-benchmark-macroJunit4 = { module = "androidx.benchmark:benchmark-macro-junit4", version.ref = "androidx-benchmark" }
|
||||
|
||||
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "compose-bom" }
|
||||
androidx-compose-material = { module = "androidx.compose.material:material" }
|
||||
androidx-compose-material3 = { module = "androidx.compose.material3:material3" }
|
||||
@@ -84,8 +79,6 @@ androidx-room-runtime = { module = "androidx.room:room-runtime", version.ref = "
|
||||
androidx-test-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "androidx-test-espresso" }
|
||||
androidx-test-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-test-junit" }
|
||||
|
||||
androidx-uiautomator = { module = "androidx.test.uiautomator:uiautomator", version.ref = "androidx-uiautomator" }
|
||||
|
||||
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
|
||||
coil-svg = { module = "io.coil-kt:coil-svg", version.ref = "coil" }
|
||||
|
||||
@@ -98,6 +91,8 @@ firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics" }
|
||||
|
||||
gson = { module = "com.google.code.gson:gson", version.ref = "gson" }
|
||||
|
||||
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
||||
|
||||
junit = { module = "junit:junit", version.ref = "junit" }
|
||||
|
||||
lottieCompose = { module = "com.airbnb.android:lottie-compose", version.ref = "lottie" }
|
||||
@@ -122,5 +117,4 @@ kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
|
||||
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||
maven-publish = { id = "maven-publish" }
|
||||
paparazzi = { id = "app.cash.paparazzi", version.ref = "paparazzi" }
|
||||
spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
|
||||
|
||||
@@ -98,13 +98,10 @@ publishing {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(libs.androidx.media3.exoplayer) {
|
||||
exclude group: "com.google.guava", module: "guava"
|
||||
}
|
||||
api(libs.androidx.media3.ui) {
|
||||
exclude group: "com.google.guava", module: "guava"
|
||||
}
|
||||
api libs.androidx.media3.exoplayer
|
||||
api libs.androidx.media3.ui
|
||||
api libs.coil.compose
|
||||
api libs.guava
|
||||
|
||||
implementation platform(libs.androidx.compose.bom)
|
||||
implementation libs.accompanist.pager
|
||||
|
||||
@@ -7,8 +7,7 @@ pluginManagement {
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "UiTron"
|
||||
rootProject.name = "uitron"
|
||||
|
||||
include ':app'
|
||||
include ':navi-uitron'
|
||||
include ':benchmark'
|
||||
|
||||
Reference in New Issue
Block a user