Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
linphone-android
Commits
a9d11543
Commit
a9d11543
authored
5 months ago
by
Sylvain Berfini
Browse files
Options
Download
Patches
Plain Diff
Fixed build without google_services.json file
parent
0e451dcc
master
feature/show_unsecure_conversation_event_at_top
feature/use_theme_main_color_for_icon_and_splashscreen
fix/insistent_notification
fix/restore_previous_release_ringtone_player
fix/telecom_default_audio_endpoint
release/6.0
6.1.0-alpha
6.0.0
6.0.0-beta
1 merge request
!1534
Fixed build without google_services.json file
Pipeline
#83495
passed with stages
in 17 minutes and 41 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/build.gradle.kts
+24
-2
app/build.gradle.kts
app/src/main/java/org/linphone/core/CoreContext.kt
+4
-3
app/src/main/java/org/linphone/core/CoreContext.kt
with
28 additions
and
5 deletions
app/build.gradle.kts
+
24
−
2
View file @
a9d11543
import
com.android.build.gradle.internal.tasks.factory.dependsOn
import
com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension
import
com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsPlugin
import
com.google.gms.googleservices.GoogleServicesPlugin
import
java.io.ByteArrayOutputStream
import
java.io.FileInputStream
import
java.util.Properties
...
...
@@ -10,8 +12,8 @@ plugins {
alias
(
libs
.
plugins
.
ktlint
)
alias
(
libs
.
plugins
.
jetbrainsKotlinAndroid
)
alias
(
libs
.
plugins
.
navigation
)
alias
(
libs
.
plugins
.
googleGmsServices
)
alias
(
libs
.
plugins
.
crashlytics
)
alias
(
libs
.
plugins
.
googleGmsServices
)
apply
false
alias
(
libs
.
plugins
.
crashlytics
)
apply
false
}
val
packageName
=
"org.linphone"
...
...
@@ -21,8 +23,22 @@ val sdkPath = providers.gradleProperty("LinphoneSdkBuildDir").get()
val
googleServices
=
File
(
projectDir
.
absolutePath
+
"/google-services.json"
)
val
linphoneLibs
=
File
(
"$sdkPath/libs/"
)
val
linphoneDebugLibs
=
File
(
"$sdkPath/libs-debug/"
)
val
firebaseCloudMessagingAvailable
=
googleServices
.
exists
()
val
crashlyticsAvailable
=
googleServices
.
exists
()
&&
linphoneLibs
.
exists
()
&&
linphoneDebugLibs
.
exists
()
if
(
firebaseCloudMessagingAvailable
)
{
println
(
"google-services.json found, enabling CloudMessaging feature"
)
apply
<
GoogleServicesPlugin
>()
}
else
{
println
(
"google-services.json not found, disabling CloudMessaging feature"
)
}
if
(
crashlyticsAvailable
)
{
println
(
"google-services.json, libs & libs-debug found, enabling Crashlytics feature"
)
apply
<
CrashlyticsPlugin
>()
}
else
{
println
(
"google-services.json, libs & libs-debug not found, disabling Crashlytics feature"
)
}
var
gitBranch
=
ByteArrayOutputStream
()
var
gitVersion
=
"6.0.0"
...
...
@@ -151,6 +167,9 @@ android {
nativeSymbolUploadEnabled
=
true
unstrippedNativeLibsDir
=
File
(
"$sdkPath/libs-debug/"
).
toString
()
}
resValue
(
"bool"
,
"crashlytics_enabled"
,
"true"
)
}
else
{
resValue
(
"bool"
,
"crashlytics_enabled"
,
"false"
)
}
}
...
...
@@ -171,6 +190,9 @@ android {
nativeSymbolUploadEnabled
=
true
unstrippedNativeLibsDir
=
File
(
"$sdkPath/libs-debug/"
).
toString
()
}
resValue
(
"bool"
,
"crashlytics_enabled"
,
"true"
)
}
else
{
resValue
(
"bool"
,
"crashlytics_enabled"
,
"false"
)
}
}
}
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/org/linphone/core/CoreContext.kt
+
4
−
3
View file @
a9d11543
...
...
@@ -375,9 +375,10 @@ class CoreContext @UiThread constructor(val context: Context) : HandlerThread("C
Log
.
i
(
"$TAG Creating Core"
)
Looper
.
prepare
()
Factory
.
instance
().
loggingService
.
addListener
(
loggingServiceListener
)
Log
.
i
(
"$TAG Crashlytics enabled, register logging service listener"
)
if
(
context
.
resources
.
getBoolean
(
org
.
linphone
.
R
.
bool
.
crashlytics_enabled
))
{
Factory
.
instance
().
loggingService
.
addListener
(
loggingServiceListener
)
Log
.
i
(
"$TAG Crashlytics enabled, register logging service listener"
)
}
Log
.
i
(
"========================================="
)
Log
.
i
(
"==== Linphone-android information dump ===="
)
Log
.
i
(
"VERSION=${BuildConfig.VERSION_NAME} / ${BuildConfig.VERSION_CODE}"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets