All Projects → fkorotkov → gradle-libraries-plugin

fkorotkov / gradle-libraries-plugin

Licence: MIT License
No description or website provided.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to gradle-libraries-plugin

Click Debounce
Using ASM to handle Android's click debounce, specially a quick double click.
Stars: ✭ 175 (+503.45%)
Mutual labels:  gradle, gradle-plugin
Gradle Testsets Plugin
A plugin for the Gradle build system that allows specifying test sets (like integration or acceptance tests).
Stars: ✭ 182 (+527.59%)
Mutual labels:  gradle, gradle-plugin
Gradle Launch4j
A gradle-plugin to create windows executables with launch4j
Stars: ✭ 177 (+510.34%)
Mutual labels:  gradle, gradle-plugin
RocketXPlugin
🔥🔥 android 端编译加速插件🚀 自动识别未改动 module 并在编译流程中替换为 aar ,只编译改动模块,加速 Android apk 的编译速度。
Stars: ✭ 408 (+1306.9%)
Mutual labels:  gradle, gradle-plugin
gradle-localization-plugin
Gradle plugin for automating the download process of localization files.
Stars: ✭ 19 (-34.48%)
Mutual labels:  gradle, gradle-plugin
Gradle Android Plugin
[Deprecated] Gradle Android Plugin 中文版使用手册,如有纰漏,望斧正
Stars: ✭ 155 (+434.48%)
Mutual labels:  gradle, gradle-plugin
SetupBuilder
Gradle plugin for building setups for different platforms.
Stars: ✭ 75 (+158.62%)
Mutual labels:  gradle, gradle-plugin
Kotlin Gradle Plugin Template
🐘 A template to let you started with custom Gradle Plugins + Kotlin in a few seconds
Stars: ✭ 141 (+386.21%)
Mutual labels:  gradle, gradle-plugin
sphinx-gradle-plugin
Sphinx site generation plugin for Gradle
Stars: ✭ 19 (-34.48%)
Mutual labels:  gradle, gradle-plugin
gradle-cleaner-intellij-plugin
Force clear delaying & no longer needed Gradle tasks.
Stars: ✭ 26 (-10.34%)
Mutual labels:  gradle, gradle-plugin
sonatype-publish-plugin
Gradle Plugin for publishing artifacts to Sonatype and Nexus
Stars: ✭ 17 (-41.38%)
Mutual labels:  gradle, gradle-plugin
gatling-gradle-plugin-demo
Showcase of the Gatling Plugin for Gradle
Stars: ✭ 17 (-41.38%)
Mutual labels:  gradle, gradle-plugin
Gradle Aem Plugin
Swiss army knife for Adobe Experience Manager related automation. Environment setup & incremental AEM application build which takes seconds, not minutes.
Stars: ✭ 145 (+400%)
Mutual labels:  gradle, gradle-plugin
Versioning
Gradle plug-in to generate version information from the SCM branch (Git or Svn)
Stars: ✭ 157 (+441.38%)
Mutual labels:  gradle, gradle-plugin
Gradle Pitest Plugin
Gradle plugin for PIT Mutation Testing
Stars: ✭ 144 (+396.55%)
Mutual labels:  gradle, gradle-plugin
Maven Git Versioning Extension
This extension will virtually set project versions, based on current git branch or tag.
Stars: ✭ 178 (+513.79%)
Mutual labels:  gradle, gradle-plugin
Forma
Meta build system with Android and Gradle support.
Stars: ✭ 127 (+337.93%)
Mutual labels:  gradle, gradle-plugin
Gson Plugin
辅助 Gson 库的 gradle 插件,防止 Json 数据解析类型异常。
Stars: ✭ 133 (+358.62%)
Mutual labels:  gradle, gradle-plugin
Badass Jlink Plugin
Create a custom runtime image of your modular application
Stars: ✭ 216 (+644.83%)
Mutual labels:  gradle, gradle-plugin
gradle-build-info-plugin
Gradle plugin to include build information such as Git commit ID to your JAR. It can be used to show Git commit information with Spring Boot Actuator.
Stars: ✭ 33 (+13.79%)
Mutual labels:  gradle, gradle-plugin

Gradle Libraries Plugin

Build Status

This plugin allows to specify versions of external libraries in a centralized place and use them across the project. It's specifically useful for Gradle multi-projects.

This plugin also uses com.github.ben-manes.versions plugin to automatically update libraries once new releases are available.

Usage

After applying the plugin:

plugins {
  id("com.github.fkorotkov.libraries") version "1.1"
}

Run ./gradlew syncLibraries to create $rootDir/dependencies.json file with all currently known dependencies.

dependencies.json file format is pretty straightforward. It contains an alphabetically sorted list of dependencies in the following format:

{
  "libraries": [
    {
      "group": "com.google.guava",
      "name": "guava",
      "version": "22.0"
    }
  ]
}  

Once dependencies.json file is in place by generating via syncLibraries task or just by manually creating it, all declared in dependencies.json libraries can be used in project files as showed below:

dependencies {
  compile libraries['com.google.guava:guava']
}

Using aliases

There is also an option to specify an alias for a library to override the default <group>:<name> key. Simply add alias property in depepndencies.json:

{
  "libraries": [
    {
      "group": "com.google.guava",
      "name": "guava",
      "version": "22.0",
      "alias": "google-guava"
    }
  ]
}  

And now it can be used like this:

dependencies {
  compile libraries['google-guava']
}

Updating Libraries Automatically

It's not a secret that it's really hard keep libraries up to date especially when there are dozens and sometimes hundreds of them. For that purpose this plugin has updateLibraries task that will automatically check for available new versions of libraries. This functionality is based on an awesome com.github.ben-manes.versions plugin(this plugin brings com.github.ben-manes.versions plugin on the classpath). See com.github.ben-manes.versions plugin docs for more details on how to customize resolutionStrategy to alert you only on updates you are interested.

Here is an example of a resolutionStrategy that rejects versions that contain dev or eap.

updateLibraries {
  resolutionStrategy {
    componentSelection { rules ->
      rules.all { ComponentSelection selection ->
        boolean rejected = ['dev', 'eap'].any { qualifier ->
          selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
        }
        if (rejected) {
          selection.reject('dev version')
        }
      }
    }
  }
}
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].