uptodate-gradle-plugin


Source link: https://github.com/4finance/uptodate-gradle-plugin

uptodate-gradle-plugin

Gradle plugin that tells you what libs have new versions on Maven Central, so when you come back to a project, you know what you can update.

How it works?

You run the plugin:

gradle uptodate 

And you get for example this:

New versions available: 'com.google.guava:guava:17.0' 'org.hibernate:hibernate-entitymanager:4.3.5.Final' 'org.hibernate:hibernate-core:4.3.5.Final' 

How to install it?

Latest version is . You can change + to some other version to have a concrete one instead of a latest one.

Step 1: Add dependency to JCenter and to the plugin

buildscript {

  repositories {

 jcenter()
  
}

  dependencies {

classpath 'com.ofg:uptodate-gradle-plugin:+'
  
}
 
}
 

Step 2: Add the plugin to your build (gradle.build)

apply plugin: 'com.ofg.uptodate' 

And now you can run the plugin with

gradle uptodate 

How to configure which configurations should be checked for updates?

By default all project configurations are checked for updates but you can exclude any of them.

uptodate {

  excludeConfigurations 'providedCompile', 'providedRuntime' 
}
 

If you want to check only specific configurations it's also possible, simply include those configurations.

uptodate {

  includeConfigurations 'compile' 
}
 

Please note that excludes take precedence over includes.

How to exclude non-final versions from reported updates?

You can also provide patterns of versions that you would like to exclude. There are also some patterns (like BETA, RC, etc.) defined in com.ofg.uptodate.UptodatePluginExtension.VersionPatterns

By default following patterns are excluded: ALPHA, BETA, RC, CR, SNAPSHOT, MILESTONE, RELEASE( i.e. r08)

import static com.ofg.uptodate.VersionPatterns.*  uptodate {

  setExcludedVersionPatterns ALPHA, BETA, '.*-demo-?\\d*$' 
}
 

You can also add your own patterns to the already excluded version patterns.

uptodate {

  addExcludedVersionPatterns '.*-demo-?\\d*$' 
}
 

How to tune HTTP connections?

You can change connection timeout (5000 ms by default) and/or limit simultaneous HTTP connections (8 connections by default) by connectionTimeout and simultaneousHttpConnections properties respectively.

uptodate {

  connectionTimeout 10000
  simultaneousHttpConnections  4 
}
 

How to run the plugin if you are behind an HTTP proxy?

The proxy settings can be configured by using one of the following approaches:

1. Via System properties (recommended)

Make sure to have the following properties configured when running the plugin:

http.proxyHost=localhost http.proxyPort=15000 https.proxyHost=localhost https.proxyPort=15000 

2. Via plugin configuration

Add the proxyHostname, proxyPort (defaults to -1, which is the default port of the scheme) and proxyScheme (defaults to 'http') properties to the plugin configuration.

uptodate {

  proxyHostname 'localhost'
  proxyPort 15000
  proxyScheme 'http' 
}
 

How to print project names along with information about new (or lack of) dependency updates?

By default (sub)project names are not printed so that you can easily operate on uptodate task output (e.g.: sort | uniq) but you can include project names in update headers by:

uptodate {

  reportProjectName true 
}
 

How to break the build if new dependencies have been found?

You can add the possibility to break the build for new versions of dependencies by applying the following closure

uptodate {

  breakTheBuild {

enabled = true
  
}
 
}
 

If turned on the default behaviour is such that if ANY new dependency is found then the build will be broken.

You can customize the inclusion and exclusion patterns by the following methods:

uptodate {

  breakTheBuild {

enabled = true

includePatterns('regex for dependency group or name to break the build if newer version is found', 'another regex')

excludePatterns('regex for dependency group or name NOT to break the build if newer version is found', 'another regex')
  
}
 
}
 

To make the functionality available on demand you can apply for example a project property:

uptodate {

  breakTheBuild {

enabled = project.hasProperty('uptodateBuildBreakingEnabled')
  
}
 
}
 

How to run the plugin on every build?

You can run the plugin automatically on every build, just by adding to your build.gradle

build.dependsOn 'uptodate' 

But be warned, this will slow down the build by a few seconds (required to hit maven remote repo with http), so it is not suggested unless you don't care about build time.

Changelog

To see what has changed in recent versions of Uptodate plugin see the CHANGELOG

Releasing

  1. Update in build.gradle version
  2. Build version locally ./gradlew clean build
  3. Set bintrayUser and bintrayKey in your system properties
  4. Publish changes using ./gradlew bintrayUpload
  5. Tag version using git tag <version>
  6. Push tags to github git push --tags
  7. Update to next version with -SNAPSHOT suffix

Resources

Сode scanner library based on ZXing. Supports portrait and landscape screen orientations, back and front facing cameras, auto focus and flash light control, viewfinder customization.

Jspoon is a Java library that provides parsing HTML into Java objects basing on CSS selectors. It uses jsoup underneath as a HTML parser.

A simple terminal view for old-school rogue-like games.

Speed up your android development by removing boilerplate code.

Current Features:

  • RecyclerUtils - Remove the need to make an adapter everytime, set up recycler adapter in as little as 4 lines.
  • ScrollUtils - Easily hide/show FloationActionButton on scroll when using RecyclerView or NestedScrollView.
  • ToastUtils - Creating toasts are just a function away.
  • SPUtils - Simple DSL for Shared Preferences.
  • ValidatorUtils - Fast and simple text validation.
  • LogUtils - Simple and easy android logging.

This is a compiled working Signalr library for Android. Compile and use for Signalr real-time communication.

A ViewPager with ability to auto scrolling and looping.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes