Hi, I am trying ```versionCode = majorVersion * 10...
# gradle
n
Hi, I am trying
Copy code
versionCode = majorVersion * 10000 + minorVersion * 100 + patchVersion
in build.gradle.kts
b
Copy code
versionCode = majorVersion * 10000L + minorVersion * 100L + patchVersion
n
i have the same error
n
what is the type of majorVersion, minorVersion and patchVersion?
n
Copy code
val versionProps = Properties()
versionProps.load(FileInputStream(versionPropsFile))
val majorVersion = versionProps["MAJOR_VERSION"]
val minorVersion = versionProps["MINOR_VERSION"]
val patchVersion = versionProps["PATCH_VERSION"]
@no ^
n
in that case are they strings?
does it work if you convert them to integers?
n
ok will try that
Copy code
val majorVersion = versionProps.getProperty("MAJOR_VERSION").toInt()
val minorVersion = versionProps.getProperty("MINOR_VERSION").toInt()
val patchVersion = versionProps.getProperty("PATCH_VERSION").toInt()
This fixed the issue, thanks