From a41e6c2f3599daf7d6affb0a20b32f9570368582 Mon Sep 17 00:00:00 2001 From: Murat Yener Date: Tue, 20 Jun 2023 16:22:31 -0700 Subject: [PATCH 1/2] Baseline Profiles API change 'collectStableBaselineProfile()' is changed to 'collect()' --- .../nowinandroid/baselineprofile/BaselineProfileGenerator.kt | 2 +- gradle/libs.versions.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/baselineprofile/BaselineProfileGenerator.kt b/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/baselineprofile/BaselineProfileGenerator.kt index 5abf7db4a..c4343bbba 100644 --- a/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/baselineprofile/BaselineProfileGenerator.kt +++ b/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/baselineprofile/BaselineProfileGenerator.kt @@ -37,7 +37,7 @@ class BaselineProfileGenerator { @Test fun generate() = - baselineProfileRule.collectBaselineProfile(PACKAGE_NAME) { + baselineProfileRule.collect(PACKAGE_NAME) { // This block defines the app's critical user journey. Here we are interested in // optimizing for app startup. But you can also navigate and scroll // through your most important UI. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fd37438cb..b0046ff66 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,7 @@ androidxDataStore = "1.0.0" androidxEspresso = "3.5.0" androidxHiltNavigationCompose = "1.0.0" androidxLifecycle = "2.6.0-alpha05" -androidxMacroBenchmark = "1.1.1" +androidxMacroBenchmark = "1.2.0-alpha16" androidxMetrics = "1.0.0-alpha03" androidxNavigation = "2.5.3" androidxProfileinstaller = "1.2.1" From 93f94017c7f0ff09b29880610d564ab93e214d6d Mon Sep 17 00:00:00 2001 From: Murat Yener Date: Tue, 20 Jun 2023 16:22:31 -0700 Subject: [PATCH 2/2] Baseline Profiles API change 'collectStableBaselineProfile()' is changed to 'collect()' --- .../nowinandroid/baselineprofile/BaselineProfileGenerator.kt | 4 +--- gradle/libs.versions.toml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/baselineprofile/BaselineProfileGenerator.kt b/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/baselineprofile/BaselineProfileGenerator.kt index 5abf7db4a..b544fbde1 100644 --- a/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/baselineprofile/BaselineProfileGenerator.kt +++ b/benchmarks/src/main/java/com/google/samples/apps/nowinandroid/baselineprofile/BaselineProfileGenerator.kt @@ -16,7 +16,6 @@ package com.google.samples.apps.nowinandroid.baselineprofile -import androidx.benchmark.macro.ExperimentalBaselineProfilesApi import androidx.benchmark.macro.junit4.BaselineProfileRule import com.google.samples.apps.nowinandroid.PACKAGE_NAME import com.google.samples.apps.nowinandroid.bookmarks.goToBookmarksScreen @@ -31,13 +30,12 @@ import org.junit.Test /** * Generates a baseline profile which can be copied to `app/src/main/baseline-prof.txt`. */ -@ExperimentalBaselineProfilesApi class BaselineProfileGenerator { @get:Rule val baselineProfileRule = BaselineProfileRule() @Test fun generate() = - baselineProfileRule.collectBaselineProfile(PACKAGE_NAME) { + baselineProfileRule.collect(PACKAGE_NAME) { // This block defines the app's critical user journey. Here we are interested in // optimizing for app startup. But you can also navigate and scroll // through your most important UI. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fd37438cb..b0046ff66 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,7 @@ androidxDataStore = "1.0.0" androidxEspresso = "3.5.0" androidxHiltNavigationCompose = "1.0.0" androidxLifecycle = "2.6.0-alpha05" -androidxMacroBenchmark = "1.1.1" +androidxMacroBenchmark = "1.2.0-alpha16" androidxMetrics = "1.0.0-alpha03" androidxNavigation = "2.5.3" androidxProfileinstaller = "1.2.1"