Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build-and-publish-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: webgpu-bindings-${{ matrix.os_name }}
path: lib/build/webgpu.jar
path: |
lib/build/webgpu.jar
lib/build/webgpu-sources.jar

- name: Publish bindings to GH packages
run: ${{ matrix.gradle_cmd }} "-PwgpuVersion=${{ inputs.wgpuVersion }}" :lib:publish
Expand Down
10 changes: 9 additions & 1 deletion lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,15 @@ task jextract(dependsOn: [invokeJextract, cleanupExtras])

tasks.findByName('compileJava').dependsOn jextract

task bindings(type: Copy, dependsOn: [jextract, jar]){
task sourcesJar(type: Jar, dependsOn: jextract) {
archiveBaseName = 'webgpu'
archiveClassifier = 'sources'
from 'build/bindings'
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hardcoded path instead of using Gradle's file references. Consider using from file('build/bindings') or better yet, referencing the location through a variable or property to make the configuration more explicit and maintainable.

Copilot uses AI. Check for mistakes.
}

task bindings(type: Copy, dependsOn: [jextract, jar, sourcesJar]){
from jar
from sourcesJar
into 'build'
}

Expand All @@ -93,6 +100,7 @@ publishing {
version = "$wgpuVersion"

artifact file("build/webgpu.jar")
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent artifact specification in Maven publication. Line 102 uses file() while line 103 directly references the task. For consistency and to follow Gradle best practices, line 102 should directly reference the jar task instead of using file(\"build/webgpu.jar\"), as the build output path is already defined by the jar task configuration.

Suggested change
artifact file("build/webgpu.jar")
artifact jar

Copilot uses AI. Check for mistakes.
artifact sourcesJar
}
}
repositories {
Expand Down