The Bright SDK Update Plugin is designed to automate the process of updating the Bright SDK within your project. By integrating this plugin, developers can effortlessly switch between SDK versions, ensuring they are always working with the latest features and fixes. This plugin also simplifies debugging by allowing easy transitions between different versions of the SDK.
build.gradle
file.Create a brightsdk.gradle
File in the app/
Directory:
Add a file named brightsdk.gradle
in your app/
directory with the following content:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'io.github.vladislavs-luminati:bright-sdk-gradle:1+'
}
}
apply plugin: com.brightdata.BrightSdkPlugin
// this configuration contains default values and can be modified
brightsdk {
useLocalCache = false // set to true to use dedicated local cache for sdk files in the current directory
ext = 'brightsdk' // override extension name for sdk files in case you need to share it with other plugins
dir = 'libs' // specify directory where sdk files will be stored, relative to this file
version = 'latest' // specify sdk version, e.g. 1.482.706
}
tasks.named("preBuild").configure {
dependsOn updateBrightSdk
}
Register plugin in app/build.gradle
:
Add the following lines to your app/build.gradle
file:
apply from: 'brightsdk.gradle'
Run your Gradle build process as usual (./gradlew build
). The updateBrightSdk
task will automatically execute before the preBuild
task, ensuring that the latest version of the Bright SDK is used in your project.
brightsdk.gradle
in app/
Directory: This file contains the configuration and application of the Bright SDK Update Plugin.app/build.gradle
, you ensure that the SDK update runs before the preBuild
task, which is an early stage in the build process."libs"
)."latest"
)."brightsdk"
).false
).Modify brightsdk
configuration block values to override defaults.
The plugin will automatically check for the latest SDK version based on the provided configuration.
If version is set to "latest", and a newer version is available, the plugin will download and replace the existing SDK files.
The plugin supports backward compatibility with older SDK versions, allowing you to switch between versions as needed.
--refresh-dependencies
to keep your plugins up-to-date with the latest features and bugfixes.Modify the version
property in your brightsdk
configuration block.
Ensure you have a stable internet connection and try again.
build.gradle
file includes the necessary dependencies.Full Java Plugin documentation is available here
If you encounter any issues or have any questions, please reach out to our support team:
Thank you for integrating the Bright SDK Update Plugin. We hope this guide has made the process straightforward and easy. If you have any feedback or suggestions for improvement, don't hesitate to let us know.
Happy coding!