2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,11 @@ android {
48
48
viewBinding = true
49
49
}
50
50
51
- val localProps = Properties ().apply { file(" ../local.properties" ).inputStream().use { load(it) } }
51
+ val localProps = Properties ()
52
+ val localProperties = File (rootProject.rootDir, " local.properties" )
53
+ if (localProperties.exists() && localProperties.isFile) {
54
+ localProperties.inputStream().use { localProps.load(it) }
55
+ }
52
56
53
57
buildTypes {
54
58
debug {
@@ -72,7 +76,7 @@ android {
72
76
buildConfigField(" String" , " AD_UNIT_ID_B" , localProps.getProperty(" ad.unitIdB" , " " ))
73
77
buildConfigField(" String" , " AD_UNIT_ID_C" , localProps.getProperty(" ad.unitIdC" , " " ))
74
78
}
75
- create(" firebaseFree " ) {
79
+ create(" firebasefree " ) {
76
80
manifestPlaceholders + = mapOf (" adMobPubId" to " " )
77
81
configure< com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension > {
78
82
mappingFileUploadEnabled = false
@@ -126,5 +130,5 @@ dependencies {
126
130
127
131
project.tasks.configureEach {
128
132
if (name.startsWith(" injectCrashlyticsMappingFileIdFirebaseFree" )) enabled = false
129
- if (name.startsWith(" processFirebaseFree " ) && name.endsWith(" GoogleServices" )) enabled = false
133
+ if (name.startsWith(" processFirebasefree " ) && name.endsWith(" GoogleServices" )) enabled = false
130
134
}
Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ android {
23
23
viewBinding = true
24
24
}
25
25
26
- val localProps = Properties ().apply { file(" ../local.properties" ).inputStream().use { load(it) } }
26
+ val localProps = Properties ()
27
+ val localProperties = File (rootProject.rootDir, " local.properties" )
28
+ if (localProperties.exists() && localProperties.isFile) {
29
+ localProperties.inputStream().use { localProps.load(it) }
30
+ }
27
31
28
32
buildTypes {
29
33
debug {
0 commit comments