File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1+ plugins {
2+ id ' com.gladed.androidgitversion' version ' 0.4.14'
3+ }
14apply plugin : ' com.android.library'
25
36android {
@@ -7,8 +10,8 @@ android {
710 defaultConfig {
811 minSdkVersion 21
912 targetSdkVersion 30
10- versionCode 373
11- versionName " 3.7.3 "
13+ versionName androidGitVersion . name()
14+ versionCode androidGitVersion . code()
1215 buildConfigField(" String" , " VERSION_NAME" , " \" ${ versionName} \" " )
1316
1417 testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
Original file line number Diff line number Diff line change 1919apply plugin : ' maven-publish'
2020apply plugin : ' signing'
2121
22- version = VERSION_NAME
22+ version = android . defaultConfig . buildConfigFields[ " VERSION_NAME" ] . value
2323group = GROUP
2424
2525def isReleaseBuild () {
26- return VERSION_NAME . contains(" SNAPSHOT" ) == false
26+ return version . contains(" SNAPSHOT" ) == false
2727}
2828
2929def getReleaseRepositoryUrl () {
@@ -86,7 +86,7 @@ afterEvaluate { project ->
8686 release(MavenPublication ) {
8787 groupId GROUP
8888 artifactId POM_ARTIFACT_ID
89- version VERSION_NAME
89+ version version
9090 from components. release
9191 }
9292 }
@@ -157,7 +157,7 @@ afterEvaluate { project ->
157157
158158 publishing. publications. all { publication ->
159159 publication. groupId = GROUP
160- publication. version = VERSION_NAME
160+ publication. version = version
161161
162162 publication. artifact androidSourcesJar
163163 publication. artifact androidJavadocsJar
@@ -176,4 +176,4 @@ afterEvaluate { project ->
176176 sign publication
177177 }
178178 }
179- }
179+ }
Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ org.gradle.jvmargs=-Xmx1024m
1212# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1313# org.gradle.parallel=true
1414
15- VERSION_NAME =3.7.2
16- VERSION_CODE =372
1715GROUP =com.github.backtrace-labs.backtrace-android
1816
1917POM_DESCRIPTION =Backtrace's integration with Android applications written in Java allows customers to capture and report handled and unhandled java exceptions.
You can’t perform that action at this time.
0 commit comments