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

Commit e0ecd8f

Browse files
committed
Do some fixes with my last 2 working braincells.
1 parent 876b798 commit e0ecd8f

File tree

3 files changed

+31
-15
lines changed

3 files changed

+31
-15
lines changed

app/build.gradle

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ android {
1515
Properties properties = new Properties()
1616
if (project.rootProject.file('local.properties').exists()) {
1717
properties.load(project.rootProject.file('local.properties').newDataInputStream())
18-
storeFile file(properties.getProperty('keystore.file'))
19-
storePassword properties.getProperty('keystore.password')
20-
keyAlias 'key0'
21-
keyPassword properties.getProperty('keystore.password')
18+
// AndroidStudio generate local.properties, only set values if file is defined.
19+
if (properties.hasProperty('keystore.file')) {
20+
storeFile file(properties.getProperty('keystore.file'))
21+
storePassword properties.getProperty('keystore.password')
22+
keyAlias 'key0'
23+
keyPassword properties.getProperty('keystore.password')
24+
}
2225
}
2326
}
2427
}
@@ -167,6 +170,11 @@ aboutLibraries {
167170
additionalLicenses = ["LGPL_3_0_only", "Apache_2_0"]
168171
}
169172

173+
configurations {
174+
// Access all imported libraries
175+
compileOnly.extendsFrom(runtimeOnly)
176+
}
177+
170178
// "true" is not allowed inside this block, use "hasSentryConfig" instead.
171179
// This is because gradle doesn't allow to enable/disable plugins conditionally
172180
sentry {
@@ -248,7 +256,7 @@ dependencies {
248256
implementation "dev.rikka.rikkax.insets:insets:1.3.0"
249257
implementation 'com.github.Dimezis:BlurView:version-2.0.2'
250258
implementation 'com.github.KieronQuinn:MonetCompat:0.4.1'
251-
implementation 'com.github.Fox2Code:FoxCompat:0.1.6'
259+
implementation 'com.github.Fox2Code:FoxCompat:0.1.7'
252260
// Update the version code in the root build.gradle
253261
implementation "com.mikepenz:aboutlibraries:${latestAboutLibsRelease}"
254262

@@ -319,3 +327,21 @@ android {
319327
}
320328
}
321329
}
330+
331+
// Safeguard (Do not remove)
332+
final File res = new File(projectDir, "src/main/res")
333+
for (String name : res.list()) {
334+
// Character.isDigit is required to make sure
335+
// we don't confuse "values-vi" as "values-v69"
336+
if (name.startsWith("values-v") &&
337+
Character.isDigit(name.charAt(8))) {
338+
final String ext = name + "/strings.xml"
339+
if (new File(res, ext).exists()) {
340+
final String errMessage =
341+
"String should not be defined in " + ext +
342+
" use values/strings.xml instead"
343+
println(errMessage)
344+
throw new GradleException(errMessage)
345+
}
346+
}
347+
}

app/src/main/res/values-v23/strings.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/src/main/res/values-v31/strings.xml

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)