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 'com.brightdata:bright-sdk-gradle:1+'
        }
    }
    
    // default values kept for reference
    ext.brightsdk = [
        dir: "libs",
        version: "latest",
        ext: "brightsdk",
        consumerProjects: "app",
        useLocalCache: false,
        useMavenLocal: false,
    ]
    
    apply plugin: com.brightdata.BrightSdkPlugin
    
    tasks.named("preBuild").configure {
        dependsOn installBrightSdk
    }
  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, e.g:

./gradlew build

The installBrightSdk 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

Modify brightsdk configuration block values to override defaults:

Using the Plugin

Checking for Bright SDK Updates

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

Updating Bright SDK

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.

Documentation

For more detailed information, please refer to the Bright SDK Gradle Plugin Documentation.

Best Practices

FAQ

Common Questions

Here are some common questions and answers about the Bright SDK Update Plugin:

Support

If you need further assistance, please contact our support team at sdk@brightdata.com.

Conclusion

We hope this guide has helped you integrate the Bright SDK Update Plugin into your project. By following the steps outlined, you can ensure that your project always uses the latest version of the Bright SDK. If you have any questions or need further assistance, please refer to the documentation or contact our support team.