Skip to content

Commit

Permalink
Dependency segregation
Browse files Browse the repository at this point in the history
  • Loading branch information
surinder-tsys committed Jul 17, 2024
1 parent 03a72cb commit eb1e29b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 14 deletions.
19 changes: 5 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ apply plugin: 'com.google.devtools.ksp'


println "Gradle uses Java ${Jvm.current()}"

// apply MoEngage SDK for NMC
apply from: "$rootProject.projectDir/nmc_moengage-dependencies.gradle"
configurations {
configureEach {
exclude group: 'org.jetbrains', module: 'annotations-java5' // via prism4j, already using annotations explicitly
Expand Down Expand Up @@ -108,8 +109,6 @@ android {
targetSdkVersion 34
compileSdk 34

// NMC Customization
buildConfigField "String", "MOENGAGE_APP_ID", "${MOENGAGE_APP_ID}"
buildConfigField 'boolean', 'CI', ciBuild.toString()
buildConfigField 'boolean', 'RUNTIME_PERF_ANALYSIS', perfAnalysis.toString()

Expand Down Expand Up @@ -425,19 +424,11 @@ dependencies {

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

// NMC: MoEngage Dependencies
// core moengage features
implementation(moengage.core)
// optionally add this to use the Push Templates feature
implementation(moengage.richNotification)
// optionally add this to use the InApp feature
implementation(moengage.inapp)
// Required for MoEngage to provide accurate analytics based on Advertising Identifier
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
// NMC: end

// splash screen dependency ref: https://developer.android.com/develop/ui/views/launch/splash-screen/migrate
implementation 'androidx.core:core-splashscreen:1.0.1'

// NMC: dependency required to capture Advertising ID for Adjust & MoEngage SDK
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
}

configurations.configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import com.nextcloud.client.network.ClientFactory
import com.nextcloud.client.network.ClientFactory.CreationException
import com.nextcloud.utils.extensions.getParcelableArgument
import com.owncloud.android.MainApp
import com.nmc.android.marketTracking.MoEngageSdkUtils
import com.owncloud.android.R
import com.owncloud.android.databinding.ChooseTemplateBinding
import com.owncloud.android.datamodel.FileDataStorageManager
Expand Down Expand Up @@ -384,6 +385,11 @@ class ChooseRichDocumentsTemplateDialogFragment :
putExtra(ExternalSiteWebView.EXTRA_TEMPLATE, template)
}

// NMC: track create office file event
file?.let {
MoEngageSdkUtils.trackCreateFileEvent(MainApp.getAppContext(), it, template.type)
}

fragment.run {
startActivity(intent)
dismiss()
Expand Down
21 changes: 21 additions & 0 deletions nmc_moengage-dependencies.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2024 Your Name <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

android {
buildTypes.each {
it.buildConfigField "String", "MOENGAGE_APP_ID", "${MOENGAGE_APP_ID}"
}
}

dependencies {
// core moengage features
implementation(moengage.core)
// optionally add this to use the Push Templates feature
implementation(moengage.richNotification)
// optionally add this to use the InApp feature
implementation(moengage.inapp)
}

0 comments on commit eb1e29b

Please sign in to comment.