-
Notifications
You must be signed in to change notification settings - Fork 0
Add CI workflow and diagnostics for Gradle HasConvention failure #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Mte90 <403283+Mte90@users.noreply.github.com>
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| ide-plugins/.gradle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot this is the right path gradle is only inside that folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in commit 1d9e255. All gradle commands now run from the ide-plugins directory using working-directory: ide-plugins.
|
@copilot jobs: build-kotlin-plugin: name: Build (matrix: Java ${{ matrix.java-version }}) Check failure on line 11 in .github/workflows/kotlin-ci.yml GitHub Actions / .github/workflows/kotlin-ci.yml Invalid workflow file You have an error in your yaml syntax on line 11 |
Co-authored-by: Mte90 <403283+Mte90@users.noreply.github.com>
Co-authored-by: Mte90 <403283+Mte90@users.noreply.github.com>
Fixed in commit 2adb10e. Added single quotes around the name fields containing template expressions ( |
Co-authored-by: Mte90 <403283+Mte90@users.noreply.github.com>
|
@copilot I don't believe that you fixed it with removing that settings |
Co-authored-by: Mte90 <403283+Mte90@users.noreply.github.com>
Summary
Successfully added GitHub Actions workflow and diagnostic script with fixes based on code review:
Files Modified:
.github/workflows/kotlin-ci.yml- GitHub Actions workflow that:permissions: contents: readfor security best practicesci-diagnostics-java-11andci-diagnostics-java-17gradle-build-log-java-11andgradle-build-log-java-17kotlin-subproject-logs-java-11andkotlin-subproject-logs-java-17Removed
scripts/ci/directory:ide-plugins/inspect_gradle_kotlin_versions.shChanges based on code review:
working-directory: ide-plugins./inspect_gradle_kotlin_versions.shpermissions: contents: readsection for security best practicesPurpose:
These files help diagnose the Gradle HasConvention failure by:
Original prompt
Create a pull request on branch ci/add-kotlin-plugin-ci-and-diagnostics that adds a GitHub Actions workflow and a diagnostic script to help investigate the Gradle HasConvention failure. Commit the files and open a PR against main. Files and exact contents below.
Files to add (exact contents):
File: .github/workflows/kotlin-ci.yml
name: CI — Build Kotlin plugin on PR commits
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [ "main" ]
jobs:
build-kotlin-plugin:
name: Build (matrix: Java ${{ matrix.java-version }})
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [11, 17]
File: scripts/ci/inspect_gradle_kotlin_versions.sh
#!/usr/bin/env bash
set -eu
Print Gradle wrapper distribution URL
if [ -f gradle/wrapper/gradle-wrapper.properties ]; then
echo "== gradle-wrapper.properties =="
grep -i distributionUrl gradle/wrapper/gradle-wrapper.properties || true
echo
fi
Print gradle.properties if present
if [ -f gradle.properties ]; then
echo "== gradle.properties =="
cat gradle.properties || true
echo
fi
Search for Kotlin Gradle plugin references
echo "== Kotlin plugin references (searching for kotlin-gradle-plugin and org.jetbrains.kotlin) =="
grep -R --line-number --color=never "kotlin-gradle-plugin" || true
grep -R --line-number --color=never "org.jetbrains.kotlin" || true
Print build.gradle(.kts) files header lines to show plugin versions where declared
for f in $(git ls-files ".gradle" ".gradle.kts" 2>/dev/null || true); do
echo "---- $f ----"
sed -n '1,200p' "$f" | sed -n '1,60p'
echo
done
Print settings.gradle(.kts)
for f in $(git ls-files "settings.gradle" "settings.gradle.kts" 2>/dev/null || true); do
echo "---- $f ----"
sed -n '1,200p' "$f" | sed -n '1,60p'
echo
done
Print the kotlin plugin versions extracted via a rough regex
echo "== Extracted candidate versions =="
grep -R --line-number --color=never "kotlin-gradle-plugin[:=][^\n]*" || true
Make the script executable and ensure workflow runs it as shown above.
PR description guidance:
Title: CI: build Kotlin plugin on PRs and diagnostics
Body: This PR adds a GitHub Actions workflow (.github/workflows/kotlin-ci...
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.