All Projects → saadfarooq → gradle-common-deps-plugin

saadfarooq / gradle-common-deps-plugin

Licence: Apache-2.0 license
Gradle plugin that provides convenience closure for configuring common dependencies

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to gradle-common-deps-plugin

Sketch Toolbox
DEPRECATED: A plugin manager for Sketch.app
Stars: ✭ 2,159 (+9713.64%)
Mutual labels:  deprecated
Liteaccordion
A lightweight horizontal accordion plugin for jQuery.
Stars: ✭ 234 (+963.64%)
Mutual labels:  deprecated
Ezpublish Legacy
eZ Publish (aka "legacy kernel" + 3 core "legacy extensions") NOTE: Succeeded by eZ Platform, no further feature releases planned.
Stars: ✭ 251 (+1040.91%)
Mutual labels:  deprecated
Box
[DEPRECATED] Official, pre-packaged Vagrant Box
Stars: ✭ 197 (+795.45%)
Mutual labels:  deprecated
Govuk elements
❗️GOV.UK Elements is deprecated, and will only receive major bug fixes and security patches.
Stars: ✭ 226 (+927.27%)
Mutual labels:  deprecated
Angular2 Adminlte
DEPRECATED An Angular 4 version of the AdminLTE theme
Stars: ✭ 239 (+986.36%)
Mutual labels:  deprecated
Let Er
DEPRECATED: Transpile non-ES6 let-blocks into ES6 (or ES3)
Stars: ✭ 183 (+731.82%)
Mutual labels:  deprecated
max-safe-integer
ES2015 Number.MAX_SAFE_INTEGER ponyfill
Stars: ✭ 15 (-31.82%)
Mutual labels:  deprecated
Sphero Ios Sdk
🚫 DEPRECATED: Sphero™ is the amazing robotic ball ( sphero.com ) created by Orbotix, this is the repository for the iOS SDK for Sphero™. Visit dev site for more information:
Stars: ✭ 232 (+954.55%)
Mutual labels:  deprecated
Deep Assign
[DEPRECATED] Recursive Object.assign()
Stars: ✭ 249 (+1031.82%)
Mutual labels:  deprecated
Python Onedrive
Obsolete python/cli module for MS SkyDrive/OneDrive's old API, do not use for new projects
Stars: ✭ 202 (+818.18%)
Mutual labels:  deprecated
Bower Components
[DEPRECATED] Site to discover Bower components
Stars: ✭ 220 (+900%)
Mutual labels:  deprecated
Sabayon
DEPRECATED. DO NOT USE.
Stars: ✭ 240 (+990.91%)
Mutual labels:  deprecated
Terraintoolsamples
Unity has archived the TerrainToolSamples repository. For future development, please use the Terrain Tools package.
Stars: ✭ 195 (+786.36%)
Mutual labels:  deprecated
Rust Everywhere
SUPERSEDED by https://github.com/japaric/trust
Stars: ✭ 253 (+1050%)
Mutual labels:  deprecated
Laravel Angular
(deprecated) Laravel & Angular package
Stars: ✭ 187 (+750%)
Mutual labels:  deprecated
Webview In Coordinatorlayout
Stars: ✭ 238 (+981.82%)
Mutual labels:  deprecated
commerce-cif-api
Adobe Commerce Integration Framework (CIF) API reference and data model documentation files
Stars: ✭ 18 (-18.18%)
Mutual labels:  deprecated
generator-oraclejet
DEPRECATED Yeoman generator for creating Web and Mobile-hybrid Oracle JET based applications
Stars: ✭ 13 (-40.91%)
Mutual labels:  deprecated
Afterglow
HTML5 video player made easy.
Stars: ✭ 244 (+1009.09%)
Mutual labels:  deprecated

Archived: Use refreshVersions instead.

Android Arsenal

Gradle Common Dependencies Plugin

This plugin provides convenient opt-in/opt-outs for commonly used dependencies. Right now it's targeting Android only. Hopefully, we'll expand it over time.

Usage

  1. Add the following to your build.gradle

    buildscript {
       repositories {
          mavenCentral()
       }
    
       dependencies {
          classpath 'com.github.saadfarooq:gradle-common-deps-plugin:{version}'
       }
    }
    
    repositories {
       mavenCentral()
    }
    
    apply plugin: 'com.android.application'
    apply plugin: 'com.github.saadfarooq.commondeps'

    alternatively, you can use the new plugin syntax for gradle 2.1+

    plugins {
       id "com.github.saadfarooq.commondeps" version "<latestVersion>"
    }
  2. Define the dependencies in the commonDeps closure (Following is the complete listing and will serve as documentation of dependencies as they are added.

    // Enable a dependency by either specifying `true` to install the default version 
    // or a version string to include a particular version
    commonDeps {
        support {
            libsVersion '23.1.0`
            support true
            appcompat true
            cardview false
            design false
            palette false
        }
        gps {
             ads true
             analytics true
             base true
             cast true
             games true
             gcm true
             fitness true
             identity true
             location true
             maps true
             nearby true
             panorama true
             plus true
        }
        butterknife '7.0.1' // you can also specify true to use latest version
        picasso true
        timber true
        glide true
        jodatime true // installs joda-time Android
        testing {
            robolectric true
            junit true
        }
    }

The plugin adds the dependencies to the compile configuration

Contributing

The library is pretty simple and contributing should be relatively easy if you follow the steps below:

  1. Think of a dependency you commonly use and that you think is popular enough to merit inclusion

  2. Determine appropriate build.gradle closure level to use for said dependency. Most dependencies will go in the commonDeps top level closure. Others, such as Google support libraries go in sub-levels. Assume you decided to add xyz dependency to the commonDeps top level closure. (Follow the examples for new closure addition in CommonDepsPlugin if you need to create new sub-closure)

  3. Add a method corresponding to the name you want to use in the build file. For xyz add a method named xyz that takes an argument version. This method is called during the build process when the closure is parsed.

  4. Create string field corresponding to the property you want to add in the Extension object. My convention is to name this the same as the method name / build property name, in our assumption xyz.

  5. Add the default version for that property to the DefaultVersions file.

  6. Simply call the Util.setDepProperty with the group name, artifact id, version argument passed to the method and DefaultVersion reference. e.g. xyz = Util.setDepProperty('com.xyz', 'xyz', version, DefaultVersion.XYZ). This method add the appropriate dependency to the project depending on the argument passed.

  7. Following a test pattern from CommonDepsPluginTest to add a test for your newly added dependency.

  8. Add example usage in README.md. This is important so visitors know what dependencies are available. The gradle closure properties are not discoverable at this point.

  9. Make a PR.

  10. Go forth and prosper.

License

Copyright 2015 Saad Farooq

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].