Skip to content

Commit 46392de

Browse files
committed
Update gradle dependencies for AndroidStudio 3.x
1 parent 4853a03 commit 46392de

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

app/calendar-widget/build.gradle

+14-13
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
buildscript {
22
repositories {
3+
google()
34
jcenter()
45
}
56
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'
89
}
910
}
1011

1112
apply plugin: 'com.android.application'
1213

1314
repositories {
15+
google()
1416
jcenter()
1517
}
1618

1719
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'
2123
}
2224

2325
android {
2426

25-
compileSdkVersion 25
26-
buildToolsVersion '25.0.3'
27+
compileSdkVersion 27
2728

2829
defaultConfig {
29-
versionName '1.10.1' + getVersionNameExtension()
30-
versionCode getVersionCodeInteger()
30+
versionName '1.10.1' + "-" + getCommitShortHash()
31+
versionCode getCommitCount()
3132
minSdkVersion 15
32-
targetSdkVersion 25
33+
targetSdkVersion 27
3334

3435
testApplicationId "com.plusonelabs.calendar.tests"
3536
testInstrumentationRunner "android.test.InstrumentationTestRunner"
@@ -71,18 +72,18 @@ android {
7172
}
7273
}
7374

74-
static getVersionNameExtension() {
75+
static getCommitShortHash() {
7576
try {
7677
def git = org.ajoberstar.grgit.Grgit.open()
77-
def versionNameSuffix = "-${git.head().getAbbreviatedId(8)}"
78+
def versionNameSuffix = "${git.head().getAbbreviatedId(7)}"
7879
git.close()
7980
return versionNameSuffix
8081
} catch (ignored) {
8182
return ""
8283
}
8384
}
8485

85-
static getVersionCodeInteger() {
86+
static getCommitCount() {
8687
try {
8788
def git = org.ajoberstar.grgit.Grgit.open()
8889
def versionCode = git.log().size()
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Mar 26 12:47:38 MSK 2017
1+
#Thu Jun 01 21:46:48 CEST 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip

0 commit comments

Comments
 (0)