rns-nativecall 0.2.6 → 0.2.7

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.
@@ -1,43 +1,71 @@
1
+ // 1. Buildscript defines WHERE to get the plugins
2
+ buildscript {
3
+ ext.kotlin_version = project.hasProperty('kotlinVersion') ? project.kotlinVersion : '1.8.10'
4
+ repositories {
5
+ google()
6
+ mavenCentral()
7
+ }
8
+ dependencies {
9
+ classpath "com.android.tools.build:gradle:7.4.2"
10
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11
+ }
12
+ }
13
+
14
+ // 2. Apply the plugins immediately after buildscript
15
+ apply plugin: 'com.android.library'
16
+ apply plugin: 'kotlin-android'
17
+
18
+ // 3. Define helper functions
19
+ def safeExtGet(prop, fallback) {
20
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
21
+ }
22
+
23
+ // 4. The Android block - should now be recognized
1
24
  android {
2
- // 1. MATCH NAMESPACE: Ensure this matches the package in your .kt files
25
+ // Crucial for AGP 7+
3
26
  namespace "com.rnsnativecall"
4
27
 
5
- // 2. TARGET SDK: Android 13 (API 33) is the standard for modern RN apps
6
- // This allows you to use the POST_NOTIFICATIONS permission needed for Android 13+
7
28
  compileSdkVersion safeExtGet('compileSdkVersion', 33)
8
29
 
9
30
  defaultConfig {
10
31
  minSdkVersion safeExtGet('minSdkVersion', 21)
11
32
  targetSdkVersion safeExtGet('targetSdkVersion', 33)
12
33
 
13
- // Ensure your library can handle vector icons if you use them in notifications
14
- vectorDrawables.useSupportLibrary = true
34
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
35
+ }
36
+
37
+ compileOptions {
38
+ sourceCompatibility JavaVersion.VERSION_1_8
39
+ targetCompatibility JavaVersion.VERSION_1_8
15
40
  }
16
41
 
17
- // 3. KOTLIN OPTIONS: Essential for smooth bridge communication
18
42
  kotlinOptions {
19
43
  jvmTarget = '1.8'
20
44
  }
21
45
 
22
- lintOptions {
46
+ // lintOptions is deprecated in newer AGP, using lint instead
47
+ lint {
23
48
  abortOnError false
24
49
  }
25
50
  }
26
51
 
52
+ repositories {
53
+ mavenCentral()
54
+ google()
55
+ }
56
+
27
57
  dependencies {
28
- implementation "com.facebook.react:react-native:+"
29
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
58
+ // Use 'provided' or 'implementation' depending on how you want to link RN
59
+ // For most modules, we use implementation but let the app provide the actual binary
60
+ implementation "com.facebook.react:react-native:+"
30
61
 
31
- // Firebase - Use a stable version that supports Android 13+
62
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
32
63
  implementation "com.google.firebase:firebase-messaging:23.4.0"
33
-
34
- // UI & Design
35
64
  implementation "androidx.appcompat:appcompat:1.6.1"
36
- implementation "androidx.core:core-ktx:1.10.1" // Required for NotificationCompat
65
+ implementation "androidx.core:core-ktx:1.10.1"
37
66
  implementation "com.google.android.material:material:1.9.0"
38
-
39
- // 4. Glide for Profile Pictures
40
- // If you plan to show the caller's face in the notification
67
+
68
+ // Glide for profile pictures
41
69
  implementation "com.github.bumptech.glide:glide:4.15.1"
42
70
  annotationProcessor "com.github.bumptech.glide:compiler:4.15.1"
43
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rns-nativecall",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "RNS nativecall component with native Android/iOS for handling native call ui, when app is not open or open.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",