diff --git a/buildSrc/src/main/java/Config.kt b/buildSrc/src/main/java/Config.kt index 2ab3d996d..6f165bd22 100644 --- a/buildSrc/src/main/java/Config.kt +++ b/buildSrc/src/main/java/Config.kt @@ -109,8 +109,8 @@ object Config { when { base < 0 -> throw RuntimeException("Cannot calculate versionCode. Hours underflow.") - base > pow(2.0, 17.0) -> throw RuntimeException("Cannot calculate versionCode. Hours overflow.") - base > (pow(2.0, 17.0) - (366 * 24)) -> + base > 0x20000 /* 2^17 */ -> throw RuntimeException("Cannot calculate versionCode. Hours overflow.") + base > 0x20000 - (366 * 24) -> // You have one year to update the version scheme... throw RuntimeException("Running out of low order bits calculating versionCode.") }