-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Add configurable Android dependency versions #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: Add configurable Android dependency versions #28
Conversation
- Add DependencyVersions interface for Android dependency overrides - Implement deep merge logic for user configuration with defaults - Add smart plugin directory detection for local development scenarios - Create comprehensive documentation with examples and troubleshooting - Add TypeScript support with full IntelliSense Features: - Override any Android dependency version via app.json - Backwards compatible - existing configurations continue to work - Type-safe configuration with validation Benefits: - Resolve Android dependency version conflicts with other packages - Future-proof version management without plugin updates - Comprehensive testing across multiple override scenarios Note: iOS version overrides have known limitations (documented in README)
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ✅ code/snyk check is complete. No issues have been found. (View Details) |
| return defaults; | ||
| } | ||
|
|
||
| return { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yasicmd Can you make this function dynamics, for example
function mergeDependencyVersions(defaults: Dependencies, overrides?: DependencyVersions): Dependencies {
if (!overrides) {
return defaults;
}
const result = {} as Dependencies;
// Iterate through all keys in defaults
for (const key in defaults) {
result[key] = {
...defaults[key],
...(overrides[key] || {})
};
}
return result;
}
|
|
||
| const versionProperties = createVersionProperties(CLEVERTAP_DEPENDENCIES_DEFAULT_VERSIONS); | ||
| // Merge user dependency version overrides with defaults | ||
| const mergedVersions = mergeDependencyVersions(CLEVERTAP_DEPENDENCIES_DEFAULT_VERSIONS, dependencyVersions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yasicmd avoid merging if dependencyVersions is not passed by user
| - **Media Support:** | ||
| Enable `android.features.enableMediaForInAppsInbox` for video content in in-app messages and app inbox. | ||
|
|
||
| ## 🚧 Known Limitations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yasicmd Remove this section.
|
|
||
| The CleverTap Expo Plugin supports overriding Android dependency versions and iOS constants directly from your `app.json`, solving compatibility issues and providing version control flexibility. | ||
|
|
||
| ### Key Benefits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yasicmd Remove key benefits section.
| | iOS.notifications.iosPushAppGroup | string | This value should be set to to enable logging Push Impressions to dashboard. The user profile details should be saved in specified "app group". When push notification is received, the saved profile details will be used to log Push Impression to correct profile. | Default is null. (Should be set to log Push Impressions) | | ||
| | iOS.versions | IOSVersions | Optional. Override iOS constants like deployment target, device family, and bundle versions. See [Dependency Versions Guide](docs/DEPENDENCY_VERSIONS.md) for detailed configuration. | Default uses plugin-defined constants. | | ||
|
|
||
| ## 🔧 Configurable Dependency Versions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yasicmd Keep the formatting same, use #### Heading level 4
|
|
||
| The CleverTap Expo Plugin supports configurable dependency versions, allowing you to override any Android dependency version or iOS constant from your `app.json` configuration. This feature solves compatibility issues between CleverTap and other packages and provides complete control over dependency versions. | ||
|
|
||
| ## Current Status |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yasicmd Delete text from Line 7 to Line 24
| |----------|---------------|-------------| | ||
| | `googleAdId.playServicesAdsVersion` | `18.2.0` | Google Play Services Ads Identifier version | | ||
|
|
||
| ### Tested Examples |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yasicmd Delete text from Line 116 to Line 160
| 3. **No Action Required**: The plugin includes fallback logic for local development | ||
| 4. **Extensions Created**: iOS extensions should still be created successfully despite the different path resolution | ||
|
|
||
| ### Common Error Messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yasicmd Delete text from Line 346 to Line 479
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left few comments. Also raise PR to develop branch.
| // await nseUpdater.updateNSEEntitlements(`group.${config.ios?.bundleIdentifier}.clevertap`) | ||
| await nseUpdater.updateNEBundleVersion(config.ios?.buildNumber ?? DEFAULT_BUNDLE_VERSION); | ||
| await nseUpdater.updateNEBundleShortVersion(config?.version ?? DEFAULT_BUNDLE_SHORT_VERSION); | ||
| await nseUpdater.updateNEBundleVersion(config.ios?.buildNumber ?? getDefaultBundleVersion(clevertapProps.ios?.versions?.defaultBundleVersion)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yasicmd I tested the logic, but doesn't work fine if I don't provide config.version or config.ios?.buildNumber values
|
Any updates of this? |
This PR solves issue #26 by allowing users to override the media3Version from 1.1.1 to 1.4.1 via app.json configuration, resolving Kotlin compilation errors when using CleverTap with react-native-video.
Features:
Benefits:
Note: iOS version overrides have known limitations (documented in README)