Adding Plugin
Android
In Android, we have made a Gradle plugin which integrates seamlessly with the Android Gradle Plugin
NOTE
Minimum supported Android Gradle Plugin version is 3.6.0. Please get in touch with your Juspay POC or the Support Team if you are on an older version.
- Add a build dependency in your root build.gradle file
buildscript {
repositories {
google()
maven {
url "https://maven.juspay.in/jp-build-packages/hypersdk-asset-download/releases/"
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0' // ← 3.6.0 is minimum version
classpath 'in.juspay:hypersdk-asset-plugin:1.0.3'
}
}
- Apply the plugin to the application module (not any library modules)
apply plugin: 'hypersdk-asset-plugin'
- Add file MerchantConfig.txt in the same directory as app/build.gradle file. The content of the file should be as below
clientId = clientId shared by Juspay Team
iOS
- Add below post_install script in the Podfile
post_install do |installer|
fuse_path = "./Pods/HyperSDK/Fuse.rb"
clean_assets = false # Pass true to re-download all the assets
if File.exist?(fuse_path)
if system("ruby", fuse_path.to_s, clean_assets.to_s)
end
end
end
- Place the MerchantConfig.txt file inside the folder where the Podfile is present. This file doesn't need to be added to the project. The content of the file should be as below
clientId = clientId shared by Juspay Team
- Use command - pod install
The Output of pod install should give below logs in addition to other logs.
[HyperSDK] Client ID - clientId shared by Juspay Team
[HyperSDK] Downloading assets...
[HyperSDK] XX file(s) downloaded/updated.
[HyperSDK] Adding the required URL Schemes & Queries Schemes in plist files
[HyperSDK] Plist file path: ./{Project Name}/Info.plist
[HyperSDK] Done.
Updated 2 months ago