Skip to content

a gradle plugin for auto add versionCode when release.

Notifications You must be signed in to change notification settings

4dhk/AutoAddVersionCode

 
 

Repository files navigation

This a gradle plugin for auto add versionCode when release.

How to use

The first way to use it with jitpack.

apply plugin: 'com.android.application'
apply plugin: 'addversioncode'

//add this at top of your app's build.gradle.
buildscript{
    repositories{
        maven { url 'https://jitpack.io' }
    }
    dependencies{
        classpath 'com.github.stanhe:AutoAddVersionCode:1.0.3'
    }
}

when you use the default settings,this plugin will add versionCode in build.grale only when release.so there are some optional filds to benefit your.

  • 'gradle' or (default no) --- this will only add versionCode in build.gradle when release.
  • 'manifest' --- this will only add versionCode in manifest.xml when release.
  • 'all' --- add versionCode in buid.gradle and manifest.xml when release.
apply plugin: 'com.android.application'
apply plugin: 'addversioncode'

//add this at top of your app's build.gradle.
buildscript{
    repositories{
        maven { url 'https://jitpack.io' }
    }
    dependencies{
        classpath 'com.github.stanhe:AutoAddVersionCode:1.0.3'
    }
}
//optional Fild
versionFile{
    desFile = 'manifest'
}

release log

v 1.0.3

refactor Judgment logic . fix release can't handle versionCode with productFlavors.

About

a gradle plugin for auto add versionCode when release.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Groovy 74.2%
  • Java 25.8%