From 66d04a26d28402056a5da3a044ceb757033cf3be Mon Sep 17 00:00:00 2001 From: Yuichiro Kinoshita Date: Tue, 17 Sep 2024 12:30:50 +0900 Subject: [PATCH] =?UTF-8?q?benchmark.properties=E3=81=8C=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E3=81=97=E3=81=AA=E3=81=8F=E3=81=A6=E3=82=82=E5=8B=95=E4=BD=9C?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- benchmark/build.gradle | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/benchmark/build.gradle b/benchmark/build.gradle index 0887229073..25551e91df 100644 --- a/benchmark/build.gradle +++ b/benchmark/build.gradle @@ -23,11 +23,14 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" def properties = new Properties() - properties.load(project.rootProject.file('benchmark.properties').newDataInputStream()) - def REMOTE_ID = properties.getProperty('account.remote_id') - def INSTANCE_DOMAIN = properties.getProperty('account.instance_domain') - def USERNAME = properties.getProperty('account.username') - def TOKEN = properties.getProperty('account.token') + def propertyFile = project.rootProject.file('benchmark.properties') + if (propertyFile.exists()) { + properties.load(project.rootProject.file('benchmark.properties').newDataInputStream()) + } + def REMOTE_ID = properties.getProperty('account.remote_id', '') + def INSTANCE_DOMAIN = properties.getProperty('account.instance_domain', '') + def USERNAME = properties.getProperty('account.username', '') + def TOKEN = properties.getProperty('account.token', '') buildConfigField('String', 'ACCOUNT_REMOTE_ID', "\"${REMOTE_ID}\"") buildConfigField('String', 'INSTANCE_DOMMAIN', "\"${INSTANCE_DOMAIN}\"") buildConfigField('String', 'USERNAME', "\"${USERNAME}\"") @@ -51,8 +54,8 @@ android { } dependencies { - implementation 'androidx.test.ext:junit:1.2.1' - implementation 'androidx.test.espresso:espresso-core:3.6.1' + implementation libs.androidx.test.ext.junit + implementation libs.androidx.test.espresso.core implementation 'androidx.test.uiautomator:uiautomator:2.3.0' implementation 'androidx.benchmark:benchmark-macro-junit4:1.3.0'