Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchMethodError on gradle 7.1 #43

Open
joprice opened this issue Aug 19, 2021 · 0 comments
Open

NoSuchMethodError on gradle 7.1 #43

joprice opened this issue Aug 19, 2021 · 0 comments

Comments

@joprice
Copy link

joprice commented Aug 19, 2021

When trying to use the plugin with gradle 7.1, I get the following error:

java.lang.NoSuchMethodError: 'void org.gradle.api.plugins.JavaBasePlugin.configureForSourceSet(org.gradle.api.tasks.SourceSet, org.gradle.api.tasks.compile.AbstractCompile)'

I saw a change that commented out this line a few months back, so I tried to build the plugin from source to validate it using the following config:

In settings.gradle:

  sourceControl {
      gitRepository("https://github.com/Frege/frege-gradle-plugin.git") {
          producesModule("org.frege-lang:frege-gradle-plugin")
      }
  }

In build.gradle:

 buildscript {
    repositories {
      maven {
        url "https://plugins.gradle.org/m2/"
      }
    }
    dependencies {
      classpath ("org.frege-lang:frege-gradle-plugin") {
        version {
          branch "master"
        }
      }
    }
  }

When I run ./gradlew fregeNativeGen I get the following error

./gradlew fregeNativeGen
> Task :fregeNativeGen FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the configuration of task ':fregeNativeGen' (type 'FregeNativeGen').
  - In plugin 'frege.gradle.plugins.FregeBasePlugin' type 'frege.gradle.tasks.FregeNativeGen' property 'className' doesn't have a configured value.

    Reason: This property isn't marked as optional and no value has been configured.

    Possible solutions:
      1. Assign a value to 'className'.
      2. Mark property 'className' as optional.

    Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#value_not_set for more details about this problem.
  - In plugin 'frege.gradle.plugins.FregeBasePlugin' type 'frege.gradle.tasks.FregeNativeGen' property 'help' is missing an input or output annotation.

    Reason: A property without annotation isn't considered during up-to-date checking.

    Possible solutions:
      1. Add an input or output annotation.
      2. Mark it as @Internal.

    Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#missing_annotation for more details about this problem.
  - In plugin 'frege.gradle.plugins.FregeBasePlugin' type 'frege.gradle.tasks.FregeNativeGen' property 'typesFile' specifies file '/Users/josephprice/dev/frege-scratch/types.properties' which doesn't exist.

    Reason: An input file was expected to be present but it doesn't exist.

    Possible solutions:
      1. Make sure the file exists before the task is called.
      2. Make sure that the task which produces the file is declared as an input.

    Please refer to https://docs.gradle.org/7.1/userguide/validation_problems.html#input_file_does_not_exist for more details about this problem.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1/userguide/command_line_interface.html#sec:command_line_warnings

Is there some extra configuration required, or is this a compatibility issue with gradle 7?

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

No branches or pull requests

1 participant