Skip to content

Commit

Permalink
Update benchmark app (#6527)
Browse files Browse the repository at this point in the history
The old version stop working due to a combination of gradle version and
outdated deps
  • Loading branch information
rlazo authored Nov 20, 2024
1 parent 1f9e582 commit 6a03d4c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _copy_template_project(self):
self.logger.debug(f'Copied project template files into "{self.project_dir}"')

def _download_gradle_wrapper(self):
args = ['wrapper', '--gradle-version', '7.5.1', '--project-dir', str(self.project_dir)]
args = ['wrapper', '--gradle-version', '8.4', '--project-dir', str(self.project_dir)]
execute('./gradlew', *args, logger=self.logger)
self.logger.debug(f'Created gradle wrapper in "{self.project_dir}"')

Expand Down
4 changes: 3 additions & 1 deletion health-metrics/benchmark/template/app/build.gradle.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ plugins {
android {
compileSdkVersion 32
namespace "com.google.firebase.benchmark"
defaultConfig {
applicationId 'com.google.firebase.benchmark'
minSdkVersion 29
Expand Down Expand Up @@ -70,7 +72,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.5.0'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation libs.junit
testImplementation 'junit:junit:4.13.2'
androidTestImplementation "androidx.test.ext:junit:1.1.5"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.google.firebase.benchmark">
xmlns:tools="http://schemas.android.com/tools">

<application
android:allowBackup="true"
Expand Down
10 changes: 5 additions & 5 deletions health-metrics/benchmark/template/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
// limitations under the License.

plugins {
id 'com.android.application' version '7.2.2' apply false
id 'com.android.library' version '7.2.2' apply false
id 'com.android.application' version '8.2.1' apply false
id 'com.android.library' version '8.2.1' apply false
id 'com.android.test' version '7.2.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.22' apply false

id 'com.google.gms.google-services' version '4.3.15' apply false
id 'com.google.firebase.crashlytics' version '2.9.1' apply false
id 'com.google.firebase.firebase-perf' version '1.4.1' apply false
id 'com.google.gms.google-services' version '4.4.2' apply false
id 'com.google.firebase.crashlytics' version '3.0.2' apply false
id 'com.google.firebase.firebase-perf' version '1.4.2' apply false
}

task clean(type: Delete) {
Expand Down
6 changes: 4 additions & 2 deletions health-metrics/benchmark/template/macrobenchmark/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ plugins {
}

android {
compileSdkVersion 32
compileSdkVersion 34

namespace "com.google.firebase.macrobenchmark"

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down Expand Up @@ -51,7 +53,7 @@ android {
dependencies {
implementation 'androidx.benchmark:benchmark-macro-junit4:1.1.0'
implementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation libs.androidx.test.junit
implementation 'androidx.test.ext:junit:1.1.5'
implementation 'androidx.test.uiautomator:uiautomator:2.2.0'
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.firebase.macrobenchmark">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<queries>
<package android:name="com.google.firebase.benchmark" />
Expand Down

0 comments on commit 6a03d4c

Please sign in to comment.