titanium-sdk icon indicating copy to clipboard operation
titanium-sdk copied to clipboard

chore(android): update cmake, checkstyle

Open m1ga opened this issue 5 months ago • 3 comments

  • update cmake to 3.22.1 (as it looks like that is available on all systems), Short note: https://www.kitware.com/cmake-3-22-1-available-for-download/ - Full notes: https://cmake.org/cmake/help/latest/release/3.22.html
  • update checkstyle to 10.11.0: https://checkstyle.org/releasenotes.html (next version will currently fail)
  • updating all Java files to full-fill checkstyles rules (no code changes, just linting!)
  • update allowed venderVersions in android/package.json

Note:

  • all Java file changes are just automatic linting in Android Studio! While updating checkstyle from 8 to 10 some rules changed so I had to manually open each file and run Android Studio lint (ctrl + shift + alt + L).

Tests:

  • SDK builds fine
  • java module builds fine
  • kotlin module builds fine
  • app with existing modules builds find and works

Tested on Fedora Linux

m1ga avatar Jan 18 '24 22:01 m1ga

Interesting. The build script returns:

[CXX1300] CMake '3.27.7' was not found in SDK, PATH, or by cmake.dir property.
[CXX1301] - CMake '3.28.1' found in PATH did not satisfy requested version.
[CXX1301] - CMake '3.10.2' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.18.1' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.22.1' found in SDK did not satisfy requested version.

[CXX1300] CMake '3.27.7' was not found in SDK, PATH, or by cmake.dir property.
[CXX1301] - CMake '3.28.1' found in PATH did not satisfy requested version.
[CXX1301] - CMake '3.10.2' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.18.1' found in SDK did not satisfy requested version.
[CXX1301] - CMake '3.22.1' found in SDK did not satisfy requested version.

I'll check that

edit: going back to 3.22.1 as that is available here too.

m1ga avatar Jan 18 '24 22:01 m1ga

Is this PR ready for review? Is there any specific steps to test?

cb1kenobi avatar Feb 17 '24 05:02 cb1kenobi

yes, you can review/test it. The tests I did are the one in the first post: build sdk, build a module (java and kotlin), build an app, build an app with 12.2.1 modules.

If you build with this PR it should download cmake and checkstyle during the first build if they are not installed already. Then you shouldn't see any lint error during the build (that's why there are the java file changes). checkstyle will run during the build process and throw an error if the java files aren't in the correct style.

So to summarize: if you can build the SDK and modules + app: everything works fine after this PR :smile:

m1ga avatar Feb 17 '24 07:02 m1ga