Skip to content

Fix JitPack builds and Gradle-version-dependent buildSrc imports - #634

Merged
Saloed merged 1 commit into
UnitTestBot:mainfrom
dolmatovDan:fix/jitpack-and-buildsrc-accessors
Nov 1, 2026
Merged

Saloed merged 1 commit into
UnitTestBot:mainfrom
dolmatovDan:fix/jitpack-and-buildsrc-accessors

Conversation

@dolmatovDan

Copy link
Copy Markdown
Contributor

JitPack currently fails to build recent commits. Its default command runs assemble, which pulls in the distZip/distTar/startScripts tasks of usvm-ts-fast-check and usvm-ts-calls; these depend on buildFastCheckAdapter, which runs npm ci and npm run build. The JitPack image has no npm, so the build stops with A problem occurred starting process 'command 'npm'' before any artifact is published. Neither TS module has a Maven publication, so assemble is not needed to publish anything.

Add an install command to jitpack.yml that keeps the default group/version arguments and runs only -xtest publishToMavenLocal. The JDK setting is unchanged.

Three buildSrc files (DetektConfiguration.kt, usvmpython/tasks/JNIHeaderTask.kt, usvmpython/tasks/PythonSamplesTasks.kt) import Kotlin DSL accessors from the generated package gradle.kotlin.dsl.accessors._466a692754d3da37fc853e1c7ad8ae1e. The hash in that name depends on the Gradle version and the applied plugins, so compiling buildSrc with another Gradle version (for example, when usvm is used as an included build) fails with Unresolved reference '_466a...'. Replace these accessors with the equivalent public API: extensions.configure<DetektExtension>, extensions.getByType<DetektExtension>().toolVersion, dependencies.add("detektPlugins", ...) and extensions.getByType<SourceSetContainer>().getByName("main"/"test"). Build behavior is unchanged.

Validation:

  • JitPack build of this branch in a fork succeeds on Gradle 8.11 (BUILD SUCCESSFUL, 13 published artifacts including usvm-core and usvm-util); the log contains no npm invocation.
  • ./gradlew -m -xtest publishToMavenLocal plans 130 tasks with no fast-check adapter tasks, while the current assemble publishToMavenLocal plans 245 tasks including installFastCheckAdapter and buildFastCheckAdapter. Both publish the same 13 publications.
  • detektPlugins resolves to detekt-formatting:1.23.5 for :usvm-core, and additionally to project :usvm-detekt-rules for :usvm-ts. :usvm-ts:detekt reports the same 217 weighted issues on main and on this branch.
  • With Gradle 9.8.2, buildSrc fails to compile on main and compiles on this branch.

The Python tasks that use sourceSets were compiled and configured but not executed, since they require a CPython build. This PR does not make usvm build on Gradle 9: configuration then fails in usvm-jvm/build.gradle.kts (resolvedConfiguration.files), which is a separate migration.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dolmatovDan
dolmatovDan force-pushed the fix/jitpack-and-buildsrc-accessors branch from 784a70d to 64b6acd Compare November 1, 2026 10:25
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.

2 participants