Skip to content

Commit 3ca3d4d

Browse files
committed
Moved versioning to build.gradle
1 parent 43183d4 commit 3ca3d4d

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

build.gradle

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
def versionMajor = 1 // incompatible API changes
2+
def versionMinor = 3 // added functionality in a backwards-compatible manner
3+
def versionPatch = 1 // backwards-compatible bug fixes
4+
def versionBuild = 0 // bump for dogfood builds, public betas, etc.
5+
6+
17
buildscript {
28
repositories {
39
mavenCentral()
@@ -13,7 +19,7 @@ repositories {
1319
mavenCentral()
1420
maven {
1521
url 'https://oss.sonatype.org/content/repositories/snapshots/'
16-
}
22+
}
1723
}
1824

1925
apply plugin: 'android'
@@ -27,12 +33,21 @@ android {
2733
buildToolsVersion "19.0.1"
2834

2935
defaultConfig {
36+
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
37+
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
38+
3039
minSdkVersion 8
3140
targetSdkVersion 19
3241
}
3342
lintOptions {
3443
abortOnError false
3544
}
45+
sourceSets {
46+
main {
47+
manifest.srcFile 'AndroidManifest.xml'
48+
}
49+
50+
}
3651
}
3752

3853
dependencies {

0 commit comments

Comments
 (0)