File tree Expand file tree Collapse file tree 3 files changed +29
-19
lines changed Expand file tree Collapse file tree 3 files changed +29
-19
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,17 @@ apply plugin: 'com.android.application'
19
19
apply plugin : ' kotlin-android'
20
20
apply plugin : ' kotlin-android-extensions'
21
21
22
+ apply plugin : ' com.gladed.androidgitversion'
23
+
22
24
android {
23
- compileSdkVersion 29
25
+ compileSdkVersion project. ext. compileSdkVersion
26
+
24
27
defaultConfig {
25
28
applicationId " com.bq.appupdateshelper" // Fake, replace with your own
26
- minSdkVersion 21
27
- targetSdkVersion 29
29
+ minSdkVersion project . ext . minSdkVersion
30
+ targetSdkVersion project . ext . targetSdkVersion
28
31
versionCode 1
29
- versionName " 1.0.0 "
32
+ versionName androidGitVersion . name()
30
33
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
31
34
}
32
35
buildTypes {
@@ -45,7 +48,7 @@ dependencies {
45
48
implementation project(" :lib" )
46
49
implementation fileTree(dir : ' libs' , include : [' *.jar' ])
47
50
48
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$k otlin_version "
51
+ implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$k otlinVersion "
49
52
50
53
implementation ' androidx.appcompat:appcompat:1.0.2'
51
54
implementation ' androidx.core:core-ktx:1.0.2'
Original file line number Diff line number Diff line change 17
17
// Top-level build file where you can add configuration options common to all sub-projects/modules.
18
18
19
19
buildscript {
20
- ext. kotlin_version = ' 1.3.31'
20
+ ext. kotlinVersion = ' 1.3.40'
21
+
21
22
repositories {
22
23
google()
23
24
jcenter()
24
-
25
+ maven { url " https://plugins.gradle.org/m2/ " }
25
26
}
26
27
dependencies {
27
28
classpath ' com.android.tools.build:gradle:3.4.1'
28
- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version "
29
- classpath " com.github.dcendents:android-maven-gradle-plugin:2.0"
29
+ classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion "
30
+ classpath " com.github.dcendents:android-maven-gradle-plugin:2.1"
31
+ classpath " com.gladed.androidgitversion:gradle-android-git-version:0.4.9"
30
32
31
33
// NOTE: Do not place your application dependencies here; they belong
32
34
// in the individual module build.gradle files
@@ -37,7 +39,12 @@ allprojects {
37
39
repositories {
38
40
google()
39
41
jcenter()
40
-
42
+ }
43
+
44
+ ext {
45
+ compileSdkVersion = 29
46
+ minSdkVersion = 21
47
+ targetSdkVersion = 29
41
48
}
42
49
}
43
50
Original file line number Diff line number Diff line change 1
1
apply plugin : ' com.android.library'
2
2
3
- android {
4
- compileSdkVersion 29
3
+ apply plugin : ' com.gladed.androidgitversion'
5
4
5
+ android {
6
+ compileSdkVersion project. ext. compileSdkVersion
6
7
7
8
defaultConfig {
8
- minSdkVersion 21
9
- targetSdkVersion 29
9
+ minSdkVersion project . ext . minSdkVersion
10
+ targetSdkVersion project . ext . targetSdkVersion
10
11
versionCode 1
11
- versionName " 1.0.0 "
12
+ versionName androidGitVersion . name()
12
13
13
14
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
14
-
15
15
}
16
16
17
17
buildTypes {
@@ -25,11 +25,11 @@ android {
25
25
26
26
dependencies {
27
27
implementation fileTree(dir : ' libs' , include : [' *.jar' ])
28
- implementation " androidx.annotation:annotation:1.1.0"
29
- implementation ' androidx.appcompat:appcompat:1.0.2'
28
+ api " androidx.annotation:annotation:1.1.0"
29
+ api " androidx.appcompat:appcompat:1.0.2"
30
30
31
31
// Needed for the in-app updates API
32
- implementation " com.google.android.play:core:1.6.1"
32
+ api " com.google.android.play:core:1.6.1"
33
33
34
34
testImplementation ' junit:junit:4.12'
35
35
You can’t perform that action at this time.
0 commit comments