It's nearly time for #CambridgeBeerFestival 2023 - which is amazing as it's been too long.

Certainly it's been too long between updates to the #android application I hacked together many years past and now try to keep it working.

It's the perfect storm:
- don't do it very often
- don't really know what I'm doing
- tools and technologies changes
- dependencies upgrades

Urgh.

On the plus side, I'm pretty much able to do the whole thing "in the cloud" with #github #codespaces so saving the pain of configuring laptop with everything needed.

Also taking opportunity to get #cicd pipeline setup. Maybe will reduce this pain in future....

It's now building an app, at least in my local repo. Let's see if the ci/cd job will do the same and if it's a valid APK....
I should note that there are basically zero tests in this repo. Certainly no system or integration tests. Installing on my phone has always been the qualification strategy. #ForShame

Well it's building locally and in ci/cd so that's nice.

Now to get it signed.

Then to update android min versions etc so it can be listed in store again. That'll be easier I'm sure....

Woohoo, now signing is working in ci/cd! And it installs and starts on my phone.

#worksonmymachine

Updated the targetSdkVersion to meet Google's requirements. Only one manifest change required to get it to build.... amazing.

But it crashes on start.. hmm

#androiddev #googleplaystore

Ok, so I need some tests to figure this out.

Chatgpt to the rescue?

Chatgpt maaaaybe to the rescue.

Running an instrumentation test is the next challenge and doing it as part of a GitHub action.

This seems possible. hmm

There is, of course, a GitHub action for everything.

Getting it to work for me takes time.

Debug loop for ci/cd is slow.

Caching helps. (Probably until it doesn't)

#githubactions #cicdpipelines #caching

Tests work enough to tell me the runtime exception that was causing the crash on startup, and the app now #worksonmymachine

Not a reliable pipeline (yet)

Green build and (minimal, smoke) test checks so merged to main 😃

I'll take that.

Tests passed on PR branch and failed on main. Lol.

Suspect just a case that emulator takes varying amount of time to be ready and this time it took too long.

#androiddev #cicd #flakytesting

In the end, despite flaky tests, I think there will be a #cbf2023 app for #android . Yay.

Yak shaving:
- updated #gradle from 4.something to 8.1 with associated android plugin update.
- updated java from something to 17
- changed some switch/case to if/else (not sure why I had to do this, but...)
- created a GitHub action pipeline to build the app
- updated the gradle code for signing the app so it fits into a pipeline better, with repository secrets etc.

(1/?)

- updated target SDK version to 31 which Google tells me is the minimum to be discoverable in store.
- fix android manifest
- add a simple instrumentation test to get more information on why it crashes. Use chatgpt to get the basic test code.
- update CI/cd to runs tests (eventually) with an emulator
- fix crash (a missing newly required flag that causes a Runtime exception)

(2/2)