Skip to content

feat(sam): sam codelen to support java gradle kts project#8609

Open
roger-zhangg wants to merge 1 commit intoaws:masterfrom
roger-zhangg:codelen_fix
Open

feat(sam): sam codelen to support java gradle kts project#8609
roger-zhangg wants to merge 1 commit intoaws:masterfrom
roger-zhangg:codelen_fix

Conversation

@roger-zhangg
Copy link
Member

Problem

The SAM Lambda CodeLens "Add Debug Configuration" does not appear for Java projects that use custom-named Gradle build scripts (e.g., brazil.gradle.kts). The extension hardcoded build.gradle as the only recognized Gradle build filename in both the file watcher glob pattern and the project root detection regex.

Solution

Broadened the Gradle file detection patterns to match any *.gradle or *.gradle.kts file instead of only build.gradle:

  • File watcher glob (gradleBasePattern): '**/build.gradle''**/*.gradle{,.kts}'
  • Project root regex (getLambdaHandlerCandidates): /^.*build.gradle$//^.*.gradle(.kts)?$/

This allows the CodeLens to work with custom-named Gradle build scripts like *.gradle.kts, build.gradle.kts, and the standard build.gradle.


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@roger-zhangg roger-zhangg requested a review from a team as a code owner February 24, 2026 23:48
@amazon-inspector-ohio
Copy link

⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done

@amazon-inspector-ohio
Copy link

✅ I finished the code review, and didn't find any security or code quality issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant