Skip to content

Commit 9e98698

Browse files
committed
Dependency segregation
1 parent 03a72cb commit 9e98698

File tree

5 files changed

+36
-16
lines changed

5 files changed

+36
-16
lines changed

app/build.gradle

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ apply plugin: 'com.google.devtools.ksp'
5353

5454

5555
println "Gradle uses Java ${Jvm.current()}"
56-
56+
// apply MoEngage SDK for NMC
57+
apply from: "$rootProject.projectDir/nmc_moengage-dependencies.gradle"
5758
configurations {
5859
configureEach {
5960
exclude group: 'org.jetbrains', module: 'annotations-java5' // via prism4j, already using annotations explicitly
@@ -108,8 +109,6 @@ android {
108109
targetSdkVersion 34
109110
compileSdk 34
110111

111-
// NMC Customization
112-
buildConfigField "String", "MOENGAGE_APP_ID", "${MOENGAGE_APP_ID}"
113112
buildConfigField 'boolean', 'CI', ciBuild.toString()
114113
buildConfigField 'boolean', 'RUNTIME_PERF_ANALYSIS', perfAnalysis.toString()
115114

@@ -425,19 +424,11 @@ dependencies {
425424

426425
implementation "io.coil-kt:coil:2.6.0"
427426

428-
// NMC: MoEngage Dependencies
429-
// core moengage features
430-
implementation(moengage.core)
431-
// optionally add this to use the Push Templates feature
432-
implementation(moengage.richNotification)
433-
// optionally add this to use the InApp feature
434-
implementation(moengage.inapp)
435-
// Required for MoEngage to provide accurate analytics based on Advertising Identifier
436-
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
437-
// NMC: end
438-
439427
// splash screen dependency ref: https://developer.android.com/develop/ui/views/launch/splash-screen/migrate
440428
implementation 'androidx.core:core-splashscreen:1.0.1'
429+
430+
// NMC: dependency required to capture Advertising ID for Adjust & MoEngage SDK
431+
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
441432
}
442433

443434
configurations.configureEach {

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
<intent-filter>
149149
<action android:name="android.intent.action.SEARCH" />
150150
</intent-filter>
151-
<intent-filter>
151+
<intent-filter android:autoVerify="true">
152152
<action android:name="android.intent.action.VIEW" />
153153

154154
<category android:name="android.intent.category.DEFAULT" />

app/src/main/java/com/nmc/android/marketTracking/MoEngageSdkUtils.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@ object MoEngageSdkUtils {
9595
.configureNotificationMetaData(
9696
NotificationConfig(
9797
R.drawable.notification_icon,
98-
R.drawable.notification_icon
98+
R.drawable.notification_icon,
99+
R.color.primary,
100+
false
99101
)
100102
)
101103
.build()

app/src/main/java/com/owncloud/android/ui/dialog/ChooseRichDocumentsTemplateDialogFragment.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import com.nextcloud.client.network.ClientFactory
2828
import com.nextcloud.client.network.ClientFactory.CreationException
2929
import com.nextcloud.utils.extensions.getParcelableArgument
3030
import com.owncloud.android.MainApp
31+
import com.nmc.android.marketTracking.MoEngageSdkUtils
3132
import com.owncloud.android.R
3233
import com.owncloud.android.databinding.ChooseTemplateBinding
3334
import com.owncloud.android.datamodel.FileDataStorageManager
@@ -384,6 +385,11 @@ class ChooseRichDocumentsTemplateDialogFragment :
384385
putExtra(ExternalSiteWebView.EXTRA_TEMPLATE, template)
385386
}
386387

388+
// NMC: track create office file event
389+
file?.let {
390+
MoEngageSdkUtils.trackCreateFileEvent(MainApp.getAppContext(), it, template.type)
391+
}
392+
387393
fragment.run {
388394
startActivity(intent)
389395
dismiss()

nmc_moengage-dependencies.gradle

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Nextcloud - Android Client
3+
*
4+
* SPDX-FileCopyrightText: 2024 Your Name <your@email.com>
5+
* SPDX-License-Identifier: AGPL-3.0-or-later
6+
*/
7+
8+
android {
9+
buildTypes.each {
10+
it.buildConfigField "String", "MOENGAGE_APP_ID", "${MOENGAGE_APP_ID}"
11+
}
12+
}
13+
14+
dependencies {
15+
// core moengage features
16+
implementation(moengage.core)
17+
// optionally add this to use the Push Templates feature
18+
implementation(moengage.richNotification)
19+
// optionally add this to use the InApp feature
20+
implementation(moengage.inapp)
21+
}

0 commit comments

Comments
 (0)