Bright SDK Update Plugin Integration Guide

Introduction

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.

Benefits

Prerequisites

Getting Started

System Requirements

  1. JDK: Version 17 or higher.
  2. Gradle: Version 6.7 or later.
  3. Supported Platforms: Any platform where Java and Gradle can run (e.g., Windows, macOS, Linux).

Installation Instructions

Step-by-Step Integration into the Application

Step 1: Adding the Plugin to Your Project

  1. 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
    }
  2. Register plugin in app/build.gradle:

    Add the following lines to your app/build.gradle file:

    apply from: 'brightsdk.gradle'

Step 2: Verifying the Integration

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.

Explanation:

Plugin Configuration

Basic Configuration

Advanced Configuration

Modify brightsdk configuration block values to override defaults.

Updating the Plugin

Checking for Updates

The plugin will automatically check for the latest SDK version based on the provided configuration.

Updating the Plugin

If version is set to "latest", and a newer version is available, the plugin will download and replace the existing SDK files.

Backward Compatibility

The plugin supports backward compatibility with older SDK versions, allowing you to switch between versions as needed.

Best Practices

FAQ

Common Questions

  1. How do I switch between SDK versions?

    Modify the version property in your brightsdk configuration block.

  2. What if the SDK download fails?

    Ensure you have a stable internet connection and try again.

Troubleshooting

Support

Full Java Plugin documentation is available here

If you encounter any issues or have any questions, please reach out to our support team:

Conclusion

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!