Added version plugin.

This commit is contained in:
Erik C. Thauvin 2015-04-15 12:44:59 -07:00
parent e77ccb2105
commit b379fc2acc
5 changed files with 13 additions and 2 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@
.DS_Store .DS_Store
/build /build
/captures /captures
/versions.properties

View file

@ -196,6 +196,6 @@
</codeStyleSettings> </codeStyleSettings>
</value> </value>
</option> </option>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" /> <option name="PREFERRED_PROJECT_CODE_STYLE" value="Erik's Code Style" />
</component> </component>
</project> </project>

View file

@ -84,7 +84,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/outputs" /> <excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" /> <excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content> </content>
<orderEntry type="jdk" jdkName="Android API 22 Platform (1)" jdkType="Android SDK" /> <orderEntry type="jdk" jdkName="Android API 22 Platform (3)" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="gson-2.1" level="project" /> <orderEntry type="library" exported="" name="gson-2.1" level="project" />
<orderEntry type="library" exported="" name="protobuf-java-2.2.0" level="project" /> <orderEntry type="library" exported="" name="protobuf-java-2.2.0" level="project" />

View file

@ -1,4 +1,5 @@
apply plugin: 'com.android.application' apply plugin: 'com.android.application'
apply plugin: 'versionPlugin'
android { android {
compileSdkVersion 22 compileSdkVersion 22
@ -11,6 +12,7 @@ android {
versionCode 2 versionCode 2
versionName "1.1b10" versionName "1.1b10"
} }
buildTypes { buildTypes {
release { release {
minifyEnabled true minifyEnabled true
@ -23,6 +25,13 @@ android {
exclude 'META-INF/NOTICE' exclude 'META-INF/NOTICE'
exclude 'META-INF/ASL2.0' exclude 'META-INF/ASL2.0'
} }
versionPlugin {
buildTypesMatcher = 'release'
supportBuildNumber = false
fileNameFormat = '$projectName'
}
} }
dependencies { dependencies {

View file

@ -6,6 +6,7 @@ buildscript {
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.1.0' classpath 'com.android.tools.build:gradle:1.1.0'
classpath 'com.github.hamsterksu:android-appversion-gradle-plugin:1.2.+'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files