summaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle26
1 files changed, 23 insertions, 3 deletions
diff --git a/build.gradle b/build.gradle
index 8dba9aa..f4952ba 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,8 +4,26 @@ buildscript {
'compileSdk': 30,
'minSdk' : 24,
'targetSdk' : 30,
+ 'version': [
+ 'major': 1,
+ 'minor': 0,
+ 'patch': 0,
+ 'build': "alpha",
+ ],
]
+ ext.buildConfig.version['name'] = "${buildConfig.version.major}.${buildConfig.version.minor}.${buildConfig.version.patch}"
+ ext.buildConfig.version['fullName'] = "${buildConfig.version.name}.${buildConfig.version.build}"
+ def buildNumber
+ if(buildConfig.version.build == 'alpha') {
+ buildNumber = -2
+ } else if (buildConfig.version.build == 'beta') {
+ buildNumber = -1
+ } else {
+ buildNumber = 0
+ }
+ ext.buildConfig.version['code'] = buildConfig.version.major * 1000000 + buildConfig.version.minor * 10000 + buildConfig.version.patch * 100 + buildNumber
+
apply from: rootProject.file('dependencies.gradle')
repositories {
google()
@@ -23,8 +41,8 @@ buildscript {
}
plugins {
- id 'com.diffplug.spotless' version '5.12.1'
- id 'com.github.ben-manes.versions' version '0.36.0'
+ id 'com.diffplug.spotless' version '5.12.4'
+ id 'com.github.ben-manes.versions' version '0.38.0'
}
allprojects {
@@ -87,4 +105,6 @@ tasks.named("dependencyUpdates").configure {
Object propOrDef(String propertyName, Object defaultValue) {
def propertyValue = project.properties[propertyName]
return propertyValue != null ? propertyValue : defaultValue
-} \ No newline at end of file
+}
+
+apply from: file('gradle/dependencyGraph.gradle')