Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

versionCode decreased? #8

Open
IzzySoft opened this issue Dec 3, 2023 · 4 comments
Open

versionCode decreased? #8

IzzySoft opened this issue Dec 3, 2023 · 4 comments

Comments

@IzzySoft
Copy link

IzzySoft commented Dec 3, 2023

Looks like today's release got its versionCode messed up:

package: name='com.puutaro.commandclick' versionCode='14' versionName='1.1.14'

14 < 50, so no update – and downgrades are not allowed. I assume some typo happened, with 14 also being the "patch" part of versionname? Could you please fix?

Looking at the previous versions:

package: name='com.puutaro.commandclick' versionCode='53' versionName='0.0.53'
package: name='com.puutaro.commandclick' versionCode='50' versionName='0.0.50'

… seems to confirm something's wrong with the setup there.

    defaultConfig {
        applicationId = "com.puutaro.commandclick"
        minSdk = 27
        targetSdk = 33
        versionCode = 14
        versionName = "${versionMajor}.${versionMinor}.${versionCode}"

Oof. versionCode must ALWAYS be INCREASED – and can NEVER be DECREASED. Which is why my repo still shows v0.0.53 from September as latest version (all releases after that are considered "older" as they have a lower versionCode). Those having installed that (or any previous one) won't be able to update before you reach some x.x.54 with your current setup.

@puutaro
Copy link
Owner

puutaro commented Dec 4, 2023

Thank you for your pointing out!
I increment versionCode recreate release
By this, I think CommmandClick is satisfied with your and google's specificaton.

val versionMajor = 1
val versionMinor = 2
val versionPatch = 0
val versionCode = 54
.
.
.
defaultConfig {
        applicationId = "com.puutaro.commandclick"
        minSdk = 27
        targetSdk = 33
        versionCode = versionCode
.
.
.

@IzzySoft
Copy link
Author

IzzySoft commented Dec 4, 2023

Well, but the APK seems a bit broken. From aapt d badging:

package: name='com.puutaro.commandclick' versionCode='' versionName='1.2.0' platformBuildVersionName='13' platformBuildVersionCode='33' compileSdkVersion='33' compileSdkVersionCodename='13'

No versionCode at all. No idea what went wrong there, but can you please check?

@puutaro
Copy link
Owner

puutaro commented Dec 4, 2023

Thank you.
I correct versionCode implementation.

Probably due to specifying versionCode by variable like bellow

 versionCode = versionCode

So correct bellow

 versionCode = 54

@IzzySoft
Copy link
Author

IzzySoft commented Dec 4, 2023

That was what I thought as well. I'm no Android or Kotlin developer, so I don't know how to best use variables there. Though I had expected a build error should the assignment not be possible – especially as an APK without versionCode is not valid (unless Android uses some default if not specified). I've seen other projects using some settings.gradle for things like that – but as said, not being an Android/Kotlin developer I never checked how that works.

The new APK looks good so far, thanks! Except for VT, which shows a few false positives by "usual suspects" (Sangfor, TM HouseCall often have that).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants