Code Monkey home page Code Monkey logo

android-sdk-versions-plugin's Introduction

CircleCI

Persist Mapbox SDK Versions

About android-sdk-versions-plugin

This plugin persists Mapbox android SDK version information in a file at compile time for further access at run time. This plugin also validates the version to be compliant with https://semver.org/ . This file is persisted in assets/sdk-versions folder. The persisted file is named after applicationId(for e.g. com.mapbox.andorid.core) and the file contents are in the following format.

SDK Module Name/Version
Version Code

This plugin is inspired from https://github.com/google/play-services-plugins/tree/master/oss-licenses-plugin

All Mapbox android SDK modules that incorporate the Telemetry SDK and meant to be released as libraries(artifacts) should apply this plugin to facilitate the Telemetry SDK access all Mapbox library versions at run time.

Add the Gradle plugin

In your root-level build.gradle, make sure you are using the Maven Central Repository and add android-sdk-versions-plugin to your dependencies


  dependencies {
    // ...
        // Add this line:
        classpath 'com.mapbox.mapboxsdk:mapbox-android-sdk-versions:X.X.X'
        
    }

Apply the Gradle plugin

In all your module (library) level build.gradle files, apply the plugin.

apply plugin: 'com.mapbox.android.sdk.versions'

or

If all modules in your project are libraries, add this in project's root build.gradle file.

subprojects { subProject ->
 afterEvaluate {
     subProject.apply plugin: 'com.mapbox.android.sdk.versions'
 }
}

Using Snapshots

If you want to test recent bug fixes or features that have not been packaged in an official release yet, you can use a -SNAPSHOT release of the current development version, available on Sonatype.


    repositories {
        mavenCentral()
        maven { url "http://oss.sonatype.org/content/repositories/snapshots/" }
    }

  dependencies {
    // ...
        // Add this line:
        classpath 'com.mapbox.mapboxsdk:mapbox-android-sdk-versions:X.X.X-SNAPSHOT'
        
    }

Note:

A new folder sdk_versions with a new file will be generated inside assets folder if built locally. This is a build generated folder and can be safely added to .gitignore if not required to be seen inside the remote repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.