Update grade version and relevant dependencies
ngaruko opened this issue · 3 comments
Device(s) tested
key | value(s) |
---|---|
medic-gateway version | 1.8. |
device make | Any |
device model | Any |
can the problem be recreated on this device? | yes |
Observed behaviour
_Trying to write a unit test for sdk 29 and above using the existing Robolectric framework.
When I set the sdk to 29 I get an error java.lang.UnsupportedOperationException: Robolectric does not support API level 29.
Then I updated the version from 3.8 to the latest 4.5.1
Now run and see another error java.lang.NoClassDefFoundError: org/junit/AssumptionViolatedException
which I believe has to do with the version of Android Gradle Plugin in the project (3.2.0)
Upgraded that to latest 4.2.0 - ("Robolectric works best with Android Studio and Android Gradle Plugin 3.2.1 or newer.")
and this time the build fails with
A problem occurred evaluating root project 'medic-gateway'.
> Failed to apply plugin [id 'com.noveogroup.android.check']
> Could not find method leftShift() for arguments [com.noveogroup.android.check.common.CommonCheck$_apply_closure3@6e0308d2] on task ':androidCheckstyle' of type org.gradle.api.DefaultTask.
That's an issue with the com.noveogroup.android.check
plugin flagging the Left Shift operator << , which has deprecated in 4.x and removed in 5.0 version _
Migration should be similar to the one done for the cht-android app, checkout medic/cht-android@ce90c39 and medic/cht-android@d99f4d3 .
Assigning it to @m5r , he will continue working on #183 with the changes.
Normally build changes, CI changes or test changes don't require to move the ticket to AT, but in this case we made a major upgrade of dependencies and how the app is built, with small refactor in some of the source files to compliant also with Android 10 rules, so we need to perform a full test of the app as when we release a new version.
The alpha version for AT will be provided by the new shiny CI pipeline added by @m5r 😄 , so a good chance also to test that the pipeline is building the app right, and with the right digital signature (therefore, we should test that if the app was installed from the last stable version available, the alpha version can be used to replace it in the phone without loosing the existing data).
CC @jonathanvq