|
1 | 1 | buildscript {
|
2 | 2 | repositories {
|
| 3 | + google() |
3 | 4 | jcenter()
|
4 | 5 | }
|
5 | 6 | dependencies {
|
6 |
| - classpath 'com.android.tools.build:gradle:2.3.2' |
7 |
| - classpath 'org.ajoberstar:grgit:1.9.2' |
| 7 | + classpath 'com.android.tools.build:gradle:3.0.1' |
| 8 | + classpath 'org.ajoberstar:grgit:2.1.0' |
8 | 9 | }
|
9 | 10 | }
|
10 | 11 |
|
11 | 12 | apply plugin: 'com.android.application'
|
12 | 13 |
|
13 | 14 | repositories {
|
| 15 | + google() |
14 | 16 | jcenter()
|
15 | 17 | }
|
16 | 18 |
|
17 | 19 | dependencies {
|
18 |
| - compile 'joda-time:joda-time:2.9.7' |
19 |
| - compile 'com.larswerkman:HoloColorPicker:1.5' |
20 |
| - compile 'com.android.support:appcompat-v7:25.3.1' |
| 20 | + implementation 'joda-time:joda-time:2.9.7' |
| 21 | + implementation 'com.larswerkman:HoloColorPicker:1.5' |
| 22 | + implementation 'com.android.support:appcompat-v7:27.1.0' |
21 | 23 | }
|
22 | 24 |
|
23 | 25 | android {
|
24 | 26 |
|
25 |
| - compileSdkVersion 25 |
26 |
| - buildToolsVersion '25.0.3' |
| 27 | + compileSdkVersion 27 |
27 | 28 |
|
28 | 29 | defaultConfig {
|
29 |
| - versionName '1.10.1' + getVersionNameExtension() |
30 |
| - versionCode getVersionCodeInteger() |
| 30 | + versionName '1.10.1' + "-" + getCommitShortHash() |
| 31 | + versionCode getCommitCount() |
31 | 32 | minSdkVersion 15
|
32 |
| - targetSdkVersion 25 |
| 33 | + targetSdkVersion 27 |
33 | 34 |
|
34 | 35 | testApplicationId "com.plusonelabs.calendar.tests"
|
35 | 36 | testInstrumentationRunner "android.test.InstrumentationTestRunner"
|
@@ -71,18 +72,18 @@ android {
|
71 | 72 | }
|
72 | 73 | }
|
73 | 74 |
|
74 |
| -static getVersionNameExtension() { |
| 75 | +static getCommitShortHash() { |
75 | 76 | try {
|
76 | 77 | def git = org.ajoberstar.grgit.Grgit.open()
|
77 |
| - def versionNameSuffix = "-${git.head().getAbbreviatedId(8)}" |
| 78 | + def versionNameSuffix = "${git.head().getAbbreviatedId(7)}" |
78 | 79 | git.close()
|
79 | 80 | return versionNameSuffix
|
80 | 81 | } catch (ignored) {
|
81 | 82 | return ""
|
82 | 83 | }
|
83 | 84 | }
|
84 | 85 |
|
85 |
| -static getVersionCodeInteger() { |
| 86 | +static getCommitCount() { |
86 | 87 | try {
|
87 | 88 | def git = org.ajoberstar.grgit.Grgit.open()
|
88 | 89 | def versionCode = git.log().size()
|
|
0 commit comments