Skip to content

Commit baec04a

Browse files
authored
Remove application-id from macrobenchmark config file. (#2683)
1 parent a4d2ee4 commit baec04a

File tree

7 files changed

+12
-32
lines changed

7 files changed

+12
-32
lines changed

ci/fireci/fireciplugins/macrobenchmark.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,7 @@ async def run(self):
148148

149149
async def _create_benchmark_projects(self):
150150
app_name = self.test_app_config['name']
151-
app_id = self.test_app_config['application-id']
152-
self.logger.info(f'Creating test app "{app_name}" with application-id "{app_id}"...')
151+
self.logger.info(f'Creating test app "{app_name}"...')
153152

154153
mustache_context = await self._prepare_mustache_context()
155154

@@ -197,10 +196,8 @@ async def _execute_benchmark_tests(self):
197196

198197
async def _prepare_mustache_context(self):
199198
app_name = self.test_app_config['name']
200-
app_id = self.test_app_config['application-id']
201199

202200
mustache_context = {
203-
'application-id': app_id,
204201
'plugins': [],
205202
'dependencies': [],
206203
}

macrobenchmark/config.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,64 @@
11
baseline:
22
name: baseline
3-
application-id: com.google.firebase.benchmark.baseline
43

54
firebase-config:
65
name: config
7-
application-id: com.google.firebase.benchmark.config
86
dependencies:
97
- com.google.firebase:firebase-config-ktx
108

119
firebase-common:
1210
name: common
13-
application-id: com.google.firebase.benchmark.baseline
1411
dependencies:
1512
- com.google.firebase:firebase-common
1613

1714
firebase-crashlytics:
1815
name: crash
19-
application-id: com.google.firebase.benchmark.crash
2016
dependencies:
2117
- com.google.firebase:firebase-crashlytics-ktx
2218
plugins:
2319
- com.google.firebase.crashlytics
2420

2521
firebase-database:
2622
name: database
27-
application-id: com.google.firebase.benchmark.database
2823
dependencies:
2924
- com.google.firebase:firebase-database-ktx
3025

3126
firebase-dynamic-links:
3227
name: dynamiclinks
33-
application-id: com.google.firebase.benchmark.dynamiclinks
3428
dependencies:
3529
- com.google.firebase:firebase-dynamic-links-ktx
3630

3731
firebase-firestore:
3832
name: firestore
39-
application-id: com.google.firebase.benchmark.firestore
4033
dependencies:
4134
- com.google.firebase:firebase-firestore-ktx
4235

4336
firebase-functions:
4437
name: functions
45-
application-id: com.google.firebase.benchmark.functions
4638
dependencies:
4739
- com.google.firebase:firebase-functions-ktx
4840

4941
firebase-inappmessaging-display:
5042
name: inappmessaging
51-
application-id: com.google.firebase.benchmark.inappmessaging
5243
dependencies:
5344
- com.google.firebase:[email protected]
5445
- com.google.firebase:firebase-inappmessaging-ktx
5546
- com.google.firebase:firebase-inappmessaging-display-ktx
5647

5748
firebase-messaging:
5849
name: messaging
59-
application-id: com.google.firebase.benchmark.messaging
6050
dependencies:
6151
- com.google.firebase:firebase-messaging-ktx
6252

6353
firebase-perf:
6454
name: perf
65-
application-id: com.google.firebase.benchmark.perf
6655
dependencies:
6756
- com.google.firebase:firebase-perf-ktx
6857
plugins:
6958
- com.google.firebase.firebase-perf
7059

7160
firebase-storage:
7261
name: storage
73-
application-id: com.google.firebase.benchmark.storage
7462
dependencies:
7563
- com.google.firebase:firebase-storage-ktx
7664

macrobenchmark/template/app/build.gradle.mustache

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ android {
2525
buildToolsVersion '30.0.3'
2626
2727
defaultConfig {
28-
applicationId '{{application-id}}'
28+
applicationId 'com.google.firebase.macrobenchmark'
2929
minSdkVersion 29
3030
targetSdkVersion 30
3131
versionCode 1
@@ -65,8 +65,8 @@ dependencies {
6565
{{/dependencies}}
6666

6767
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
68-
implementation 'androidx.core:core-ktx:1.3.1'
69-
implementation 'androidx.appcompat:appcompat:1.2.0'
68+
implementation 'androidx.core:core-ktx:1.5.0'
69+
implementation 'androidx.appcompat:appcompat:1.3.0'
7070
implementation 'com.google.android.material:material:1.3.0'
7171
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
7272
testImplementation 'junit:junit:4.13.2'

macrobenchmark/template/benchmark/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ android {
4848
}
4949

5050
dependencies {
51-
androidTestImplementation 'androidx.benchmark:benchmark-macro-junit4:1.1.0-SNAPSHOT'
51+
androidTestImplementation 'androidx.benchmark:benchmark-macro-junit4:1.1.0-alpha02'
5252

5353
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
54-
implementation 'androidx.core:core-ktx:1.3.2'
55-
implementation 'androidx.appcompat:appcompat:1.2.0'
54+
implementation 'androidx.core:core-ktx:1.5.0'
55+
implementation 'androidx.appcompat:appcompat:1.3.0'
5656
implementation 'com.google.android.material:material:1.3.0'
5757
testImplementation 'junit:junit:4.13.2'
5858
androidTestImplementation 'androidx.test.ext:junit:1.1.2'

macrobenchmark/template/benchmark/src/androidTest/java/com/google/firebase/benchmark/BenchmarkTest.kt.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ class BenchmarkTest(private val startupMode: StartupMode) {
3131
3232
@Test
3333
fun startup() = benchmarkRule.measureRepeated(
34-
packageName = "{{application-id}}",
34+
packageName = "com.google.firebase.macrobenchmark",
3535
metrics = listOf(StartupTimingMetric()),
3636
iterations = 20,
3737
startupMode = startupMode
3838
) {
3939
pressHome()
4040
val intent = Intent()
41-
intent.setPackage("{{application-id}}")
41+
intent.setPackage("com.google.firebase.macrobenchmark")
4242
intent.setAction("com.google.firebase.benchmark.STARTUP_ACTIVITY")
4343
startActivityAndWait(intent)
4444
}

macrobenchmark/template/benchmark/src/main/AndroidManifest.xml.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
package="com.google.firebase.benchmark">
1919

2020
<queries>
21-
<package android:name="{{application-id}}" />
21+
<package android:name="com.google.firebase.macrobenchmark" />
2222
</queries>
2323
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
2424
tools:ignore="ScopedStorage" />

macrobenchmark/template/build.gradle

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
// limitations under the License.
1414

1515
buildscript {
16-
ext.kotlin_version = "1.4.32"
16+
ext.kotlin_version = "1.5.0"
1717
repositories {
1818
google()
1919
mavenCentral()
2020
}
2121
dependencies {
22-
classpath "com.android.tools.build:gradle:4.2.0-rc01"
22+
classpath "com.android.tools.build:gradle:4.2.0"
2323
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
2424

2525
// NOTE: Do not place your application dependencies here; they belong
@@ -40,11 +40,6 @@ allprojects {
4040
google()
4141
mavenCentral()
4242

43-
// snapshot repository for androidx - not necessary once alpha is public
44-
maven {
45-
url uri('https://androidx.dev/snapshots/builds/7205390/artifacts/repository')
46-
}
47-
4843
maven {
4944
url rootProject.file('../../../build/m2repository')
5045
}

0 commit comments

Comments
 (0)