Could not find method id() for arguments [org.scoverage] on root project 'my-project'

Hi there, I’m trying yo build gradle project, getting

Could not find method id() for arguments [org.scoverage] on root project ‘my-project’’.
Caused by: org.gradle.api.internal.MissingMethodException: Could not find method id() for arguments [org.scoverage] on root project ‘my-project’’.

It fails here:
plugins {
id ‘org.scoverage’ version ‘4.0.0’
}

my .circleci/config.yml is:
version: 2
executorType: machine
jobs:
build:
docker:
- image: circleci/openjdk:8-jdk

    working_directory: ~/repo

    environment:
      # Customize the JVM maximum heap limit
      JVM_OPTS: -Xmx3200m
      TERM: dumb

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
            # This branch if available
            - v1-dep-{{ .Branch }}-
            # Default branch if not
            - v1-dep-develop-
            # Any branch if there are none on the default branch - this should be unnecessary if you have your default branch configured correctly
            - v1-dep-

      - run: gradle dependencies --info --stacktrace

      - save_cache:
          paths:
            - ~/.gradle
            - ~/.m2
          key: v1-dependencies-{{ checksum "build.gradle" }}

      - run: gradle test --info --stacktrace

what do I do wrong?
It works on my macihne btw…

Ok, I’ve found the issue
executorType: machine is the problem. It failes build.

I set executorType: machine in order to use test containers. Following this recommendation:
https://www.testcontainers.org/supported_docker_environment/continuous_integration/circle_ci/

So what can i try next?

Hello! Please change “executorType: machine” to “machine: true”. I think executorType was an older convention that is no longer valid. I’ve submitted a pr to their docs to correct this. That should at least get you past the startup step!

1 Like