react-native-expo-moengage 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # 15-04-2026
2
+
3
+ ## 1.1.1
4
+
5
+ - Android
6
+ - Migrating the common gradle configuration to the gradle config
7
+
1
8
  # 09-02-2026
2
9
 
3
10
  ## 1.1.0
@@ -1,46 +1,39 @@
1
- apply plugin: 'com.android.library'
2
- apply plugin: 'kotlin-android'
1
+ import com.moengage.gradle.android.library.plugin.configs.BuildConfigType
2
+ import groovy.json.JsonSlurper
3
3
 
4
4
  buildscript {
5
5
  repositories {
6
6
  google()
7
7
  mavenCentral()
8
+ gradlePluginPortal()
8
9
  }
9
10
 
10
11
  dependencies {
11
12
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
13
+ classpath "com.moengage.android.hybrid.module.config.plugin:com.moengage.android.hybrid.module.config.plugin.gradle.plugin:0.0.4"
12
14
  }
13
15
  }
14
16
 
15
- ext {
16
- minimumVersion = 23
17
- compileVersion = 35
18
- }
19
-
20
- android {
21
- compileSdk compileVersion
22
- namespace "expo.modules.moengage"
23
-
24
- defaultConfig {
25
- minSdk minimumVersion
26
- versionCode 1
27
- versionName "1.0"
28
- }
29
-
30
- compileOptions {
31
- sourceCompatibility JavaVersion.VERSION_1_8
32
- targetCompatibility JavaVersion.VERSION_1_8
33
- }
17
+ apply plugin: 'com.moengage.android.hybrid.module.config.plugin'
34
18
 
19
+ hybridModuleConfig.configurePlugin {
35
20
  kotlinOptions {
36
- freeCompilerArgs = ['-Xjvm-default=all']
21
+ enableJvmTarget = false
22
+ compilerArgs = ['-Xjvm-default=all']
37
23
  }
38
-
39
- buildFeatures {
40
- buildConfig true
24
+ buildFeature {
25
+ buildConfigField(
26
+ BuildConfigType.STRING,
27
+ "MOENGAGE_REACT_EXPO_LIB_VERSION",
28
+ "\"${getExpoPluginVersion().toString()}\""
29
+ )
41
30
  }
42
31
  }
43
32
 
33
+ android {
34
+ namespace "expo.modules.moengage"
35
+ }
36
+
44
37
  dependencies {
45
38
  implementation(project(':expo-modules-core'))
46
39
  implementation(project(':react-native-moengage'))
@@ -50,4 +43,14 @@ dependencies {
50
43
  compileOnly "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
51
44
  }
52
45
 
53
- apply from: file("./user-agent.gradle")
46
+ def getExpoPluginVersion() {
47
+ String libraryVersionName = "UNKNOWN"
48
+ File packageJson = new File(project.projectDir.parentFile, "package.json")
49
+
50
+ if (packageJson.exists()) {
51
+ def parsedJson = new JsonSlurper().parseText(packageJson.text)
52
+ libraryVersionName = parsedJson.version
53
+ }
54
+
55
+ return libraryVersionName
56
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-expo-moengage",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "dependencyVersions": {
5
5
  "firebaseMessaging": "24.1.0"
6
6
  },
@@ -1,15 +0,0 @@
1
- import groovy.json.JsonSlurper
2
-
3
- String libraryVersionName = "UNKNOWN"
4
- File packageJson = new File(project.projectDir.parentFile, "package.json")
5
-
6
- if (packageJson.exists()) {
7
- def parsedJson = new JsonSlurper().parseText(packageJson.text)
8
- libraryVersionName = parsedJson.version
9
- }
10
-
11
- android {
12
- defaultConfig {
13
- buildConfigField 'String', 'MOENGAGE_REACT_EXPO_LIB_VERSION', "\"${libraryVersionName}\""
14
- }
15
- }