`ForkOptions` is now abstract in Gradle 8.0

This repository was archived by the owner on Nov 6, 2025. It is now read-only.

This repository was archived by the owner on Nov 6, 2025. It is now read-only.

@jarohen

Description

Expected Behavior

ClojureNRepl should start on Gradle 8+

Current Behavior

It fails with the following:

* What went wrong:
An exception occurred applying plugin request [id: 'dev.clojurephant.clojure', version: '0.7.0']
> Failed to apply plugin class 'dev.clojurephant.plugin.common.internal.ClojureCommonPlugin'.
   > Could not create task ':clojureRepl'.
      > Could not create task of type 'ClojureNRepl'.
         > org.gradle.api.tasks.compile.ForkOptions
Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'ClojureNRepl'.
        ... 239 more
Caused by: java.lang.InstantiationError: org.gradle.api.tasks.compile.ForkOptions
        at dev.clojurephant.plugin.clojure.tasks.ClojureNRepl.<init>(ClojureNRepl.java:30)

It looks like the offending call is here - ForkOptions is an abstract class now.

Looking at the 8.0 release notes, there's a section on some classes being made abstract, if that helps.

Steps to reproduce

  1. Clone sample-clojurephant-clj-app
  2. ./gradlew wrapper --gradle-version 8
  3. ./gradlew clojureRepl

Environment

  • Build scan URL: N/A
  • clojurephant version: 0.7.0
  • Gradle version: 8.0
  • Java version: java-17-openjdk
  • OS version: Manjaro