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'
1919apply plugin : ' kotlin-android'
2020apply plugin : ' kotlin-android-extensions'
2121
22+ apply plugin : ' com.gladed.androidgitversion'
23+
2224android {
23- compileSdkVersion 29
25+ compileSdkVersion project. ext. compileSdkVersion
26+
2427 defaultConfig {
2528 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
2831 versionCode 1
29- versionName " 1.0.0 "
32+ versionName androidGitVersion . name()
3033 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
3134 }
3235 buildTypes {
@@ -45,7 +48,7 @@ dependencies {
4548 implementation project(" :lib" )
4649 implementation fileTree(dir : ' libs' , include : [' *.jar' ])
4750
48- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$k otlin_version "
51+ implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$k otlinVersion "
4952
5053 implementation ' androidx.appcompat:appcompat:1.0.2'
5154 implementation ' androidx.core:core-ktx:1.0.2'
Original file line number Diff line number Diff line change 1717// Top-level build file where you can add configuration options common to all sub-projects/modules.
1818
1919buildscript {
20- ext. kotlin_version = ' 1.3.31'
20+ ext. kotlinVersion = ' 1.3.40'
21+
2122 repositories {
2223 google()
2324 jcenter()
24-
25+ maven { url " https://plugins.gradle.org/m2/ " }
2526 }
2627 dependencies {
2728 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"
3032
3133 // NOTE: Do not place your application dependencies here; they belong
3234 // in the individual module build.gradle files
@@ -37,7 +39,12 @@ allprojects {
3739 repositories {
3840 google()
3941 jcenter()
40-
42+ }
43+
44+ ext {
45+ compileSdkVersion = 29
46+ minSdkVersion = 21
47+ targetSdkVersion = 29
4148 }
4249}
4350
Original file line number Diff line number Diff line change 11apply plugin : ' com.android.library'
22
3- android {
4- compileSdkVersion 29
3+ apply plugin : ' com.gladed.androidgitversion'
54
5+ android {
6+ compileSdkVersion project. ext. compileSdkVersion
67
78 defaultConfig {
8- minSdkVersion 21
9- targetSdkVersion 29
9+ minSdkVersion project . ext . minSdkVersion
10+ targetSdkVersion project . ext . targetSdkVersion
1011 versionCode 1
11- versionName " 1.0.0 "
12+ versionName androidGitVersion . name()
1213
1314 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
14-
1515 }
1616
1717 buildTypes {
@@ -25,11 +25,11 @@ android {
2525
2626dependencies {
2727 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"
3030
3131 // 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"
3333
3434 testImplementation ' junit:junit:4.12'
3535
You can’t perform that action at this time.
0 commit comments