diff options
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/build.gradle b/build.gradle index 2a25c70..2dfd140 100644 --- a/build.gradle +++ b/build.gradle @@ -7,8 +7,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() @@ -26,8 +44,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 { @@ -65,6 +83,7 @@ subprojects { // Treat all Kotlin warnings as errors allWarningsAsErrors = true + freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi" // Set JVM target to 1.8 jvmTarget = "1.8" } @@ -90,4 +109,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') |