Analyze with CodeQL on a JDK that can run Gradle 9

CodeQL's autobuild derives the JDK it launches Gradle on from the project's
sourceCompatibility, which is Java 8 here. Gradle 9 requires JDK 17+ to start,
so since the AGP 9 / Gradle 9 / Kotlin 2.4 upgrade landed, every "Analyze
(java-kotlin)" run fails before compiling anything:

```
[autobuild] > ./gradlew ... -Dorg.gradle.java.home=/usr/lib/jvm/temurin-8-jdk-amd64 clean
[autobuild] Gradle requires JVM 17 or later to run. Your build is currently configured to use JVM 8.
```

Replace the repository's CodeQL default setup with an advanced setup workflow
that builds the project itself on JDK 17, the same JDK the Main workflow uses.
CodeQL 2.26.0 supports Kotlin 2.4.0, so the JDK is the only thing standing in
the way of the analysis.

Merging this requires switching the repository from default to advanced setup
under Settings > Advanced Security, otherwise CodeQL rejects the uploads.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 file changed
tree: e3f39e1475c2ac1a07f3d419271c498caf633dd0
  1. .github/
  2. config/
  3. docs/
  4. gradle/
  5. leakcanary/
  6. object-watcher/
  7. plumber/
  8. samples/
  9. shark/
  10. .editorconfig
  11. .gitattributes
  12. .gitignore
  13. build.gradle.kts
  14. gradle.properties
  15. gradlew
  16. LICENSE.txt
  17. mkdocs.yml
  18. README.md
  19. settings.gradle
  20. shark-cli.sh
README.md

LeakCanary 🐤

A memory leak detection library for Android.

square.github.io/leakcanary

🙏 If you like LeakCanary you can show support by starring ⭐ this repository.

License

Copyright 2015 Square, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.