File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ object Versions {
40
40
41
41
// When updating COMPILE_SDK, please also update BUILD_TOOLS_VERSION
42
42
const val COMPILE_SDK = 36
43
+
43
44
@Suppress(" unused" )
44
45
private const val BUILD_TOOLS_VERSION = " 36.0.0"
45
46
const val TARGET_SDK = 36
@@ -51,4 +52,11 @@ object Versions {
51
52
private const val JAVA_VERSION = 21
52
53
val javaVersion: JavaVersion = JavaVersion .toVersion(JAVA_VERSION )
53
54
val javaLanguageVersion: JavaLanguageVersion = JavaLanguageVersion .of(JAVA_VERSION )
55
+
56
+ // Perform some checks on the values to avoid releasing with bad values
57
+ init {
58
+ require(versionMonth in 1 .. 12 ) { " versionMonth must be in [1,12]" }
59
+ require(versionReleaseNumber in 0 .. 99 ) { " versionReleaseNumber must be in [0,99]" }
60
+ require(BUILD_TOOLS_VERSION .startsWith(COMPILE_SDK .toString())) { " When updating COMPILE_SDK, please also update BUILD_TOOLS_VERSION" }
61
+ }
54
62
}
You can’t perform that action at this time.
0 commit comments