diffplug / spotless-changelog

The changelog is cast, let the versions fall where they may.
Apache License 2.0
45 stars 2 forks source link

Cannot create a proxy class for abstract class 'PrintTask' #8

Closed plmarcelo closed 4 years ago

plmarcelo commented 4 years ago

I'm trying to use this plugin in one of our projects and I configured build.gradle as you suggest but always get this error:

A problem occurred evaluating root project 'myproject'.

Failed to apply plugin [id 'net.saliman.properties'] Could not create task ':changelogPrint'. Cannot create a proxy class for abstract class 'PrintTask'.

net.saliman.properties this library is also used in our project. Do you know what could be happening?

Thanks

nedtwigg commented 4 years ago

What version of gradle? Can you post a stacktrace (--stacktrace). I haven't seen this error before, so I don't have any guesses, but I bet the stacktrace will lead us to a solution.

plmarcelo commented 4 years ago

The issue has been fixed after switching to legacy plugin way

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "com.diffplug.spotless:spotless-plugin-gradle:3.28.0"
  }
}

apply plugin: "com.diffplug.gradle.spotless"

But still: A problem occurred evaluating root project 'myProject'.

Could not find method spotlessChangelog() for arguments [build_cot0lf6jliotxjk8aus24krz5$_run_closure8@2db69b0b] on root project 'myProject' of type org.gradle.api.Project.

plmarcelo commented 4 years ago

Was using gradle 5.X. After upgrading to 6.3, everything was fixed. Thanks

nedtwigg commented 4 years ago

Hm. We claim to work on Gradle 5.2, and we run our unit tests on Gradle 5.2+, but glad you've got a solution!