Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit f07627d

Browse files
Fix tests
Signed-off-by: androidacy-user <opensource@androidacy.com>
1 parent 4fa978b commit f07627d

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

app/build.gradle

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@ android {
4747
"java.util.Arrays.asList(\"magisk_alt_repo\", \"androidacy_repo\")",)
4848
// Get the androidacy client ID from the androidacy.properties
4949
Properties properties = new Properties()
50-
properties.load(project.rootProject.file('androidacy.properties').newDataInputStream())
50+
// If androidacy.properties doesn't exist, use the default client ID (an empty string
51+
// - won't work, but it's better than failing to build)
52+
if (project.rootProject.file('androidacy.properties').exists()) {
53+
properties.load(project.rootProject.file('androidacy.properties').newDataInputStream())
54+
} else {
55+
properties.setProperty('client_id', '""')
56+
}
5157
buildConfigField("String", "ANDROIDACY_CLIENT_ID", properties.getProperty('client_id'))
5258
}
5359

@@ -71,7 +77,13 @@ android {
7177

7278
// Get the androidacy client ID from the androidacy.properties
7379
Properties properties = new Properties()
74-
properties.load(project.rootProject.file('androidacy.properties').newDataInputStream())
80+
// If androidacy.properties doesn't exist, use the default client ID (an empty string
81+
// - won't work, but it's better than failing to build)
82+
if (project.rootProject.file('androidacy.properties').exists()) {
83+
properties.load(project.rootProject.file('androidacy.properties').newDataInputStream())
84+
} else {
85+
properties.setProperty('client_id', '""')
86+
}
7587
buildConfigField("String", "ANDROIDACY_CLIENT_ID", properties.getProperty('client_id'))
7688
}
7789
}

0 commit comments

Comments
 (0)