Android Auto-Version


Source link: https://github.com/alexfu/androidautoversion

Android Auto Version

This is a Gradle plugin, for Android developers, that automates app versioning. You can read more about this plugins inception here: http://alexfu.github.io/2015/11/09/Android-Auto-Versioning

Why

Not having to remember or worry about when to bump version numbers allows you to focus on what's really important (implementing new features or fixing bugs).

Benefits

This plugin comes with 3 simple tasks:

  • releaseMajor
  • releaseMinor
  • releasePatch

All of these tasks will bump the version based on semantic versioning rules ( http://semver.org)

How

To use this plugin...

Step 1

Include the following in your top-level build.gradle file:

buildscript {

repositories {

  maven {
 url 'https://jitpack.io' 
}

}

dependencies {

  classpath 'com.github.alexfu:androidautoversion:1.0.0'

}
 
}

Step 2

Include the following in your app-level build.gradle file:

apply plugin: 'com.github.alexfu.androidautoversion'  androidAutoVersion {

release {

  releaseTask = "assembleRelease"

}
 
}

Step 3

Remove versionCode and versionName from your defaultConfig block!

Usage

Every time you want to make a release, decide if it's a major, minor, or a patch. Use the rules outlined here to make your decision. Then, once you've decided, run the release task that matches your release type ( releaseMajor, releaseMinor, releasePatch). At the end of it all, you'll have release APKs of each app variant.

Beta

This plugin supports releasing betas. To release a beta, you must first specify a beta config block with a releaseTask:

androidAutoVersion {

beta {

  releaseTask = "assembleRelease"

}
 
}

You now have access to the beta variants of the release tasks: releaseBetaMajor, releaseBetaMinor, and releaseBetaPatch. Whenever you run one of these tasks, the version name will have -beta appended to it.

Version File

You will notice that this plugin creates a version file for you in the root level directory of your project. This is how the plugin tracks and updates the version. If you would like this file to live elsewhere, you can specify a custom file location like so:

androidAutoVersion {

versionFile = file("/path/to/version/file") 
}

Post Hooks

Sometimes you want to execute a script or run some command after the release task has completed. You can do this by specifying a list of postHooks:

androidAutoVersion {

postHooks = [
  {
 versionString ->

 println("Hello $versionString"!)
  
}

] 
}

Post hooks are also available in each release flavor:

androidAutoVersion {

postHooks = [
  {
 versionString ->

 println("Hello $versionString!")
  
}

]
 release {

  postHooks = [

 {
 versionString ->

println("Hello from release!")

 
}

  ]

}

 beta {

  postHooks = [

 {
 versionString ->

println("Hello from beta!")

 
}

  ]

}
 
}

Post hooks are nothing more than closures with a single argument, the version string (version name).

Resources

It's just a realtime blurring overlay like iOS UIVisualEffectView.

A cool animated RecyclerView clock face scroller.

Android dependency visualizer. This tool helps to visualize current state of your project. It's really easy to see coupling between classes.

Android Image Viewer inspired by StackOverflow's with swipe-to-dismiss and moving animations.

Android Library to help you with your date & time pickers while retaining the instance of the pickers on orientation change.

Simple, easy and super fast dynamic view creation with awesome animations prebuilt!

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