artemis-odb icon indicating copy to clipboard operation
artemis-odb copied to clipboard

[Question] is the fluid plugin not support for gradle 7?

Open xhaimxd opened this issue 2 years ago • 3 comments

I just startup a project in jdk 17 and gradle 7.3.3. when i tried to compile project, it shows:

FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the configuration of task ':core:fluid' (type 'FluidApiGenerationTask').
  - In plugin 'artemis-fluid' type 'net.onedaybeard.gradle.FluidApiGenerationTask' field 'preferences' without corresponding getter has been annotated with @Input.
    
    Reason: Annotations on fields are only used if there's a corresponding getter for the field.
    
    Possible solutions:
      1. Add a getter for field 'preferences'.
      2. Remove the annotations on 'preferences'.
    
    Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
  - In plugin 'artemis-fluid' type 'net.onedaybeard.gradle.FluidApiGenerationTask' property 'classpath' has @Input annotation used on property of type 'FileCollection'.
    
    Reason: A property of type 'FileCollection' annotated with @Input cannot determine how to interpret the file.
    
    Possible solutions:
      1. Annotate with @InputFile for regular files.
      2. Annotate with @InputDirectory for directories.
      3. If you want to track the path, return File.absolutePath as a String and keep @Input.
    
    Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#incorrect_use_of_input_annotation for more details about this problem.
  - In plugin 'artemis-fluid' type 'net.onedaybeard.gradle.FluidApiGenerationTask' property 'generatedSourcesDirectory' has @Input annotation used on property of type 'File'.
    
    Reason: A property of type 'File' annotated with @Input cannot determine how to interpret the file.
    
    Possible solutions:
      1. Annotate with @InputFile for regular files.
      2. Annotate with @InputDirectory for directories.
      3. If you want to track the path, return File.absolutePath as a String and keep @Input.
    
    Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#incorrect_use_of_input_annotation 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

BUILD FAILED in 111ms

i found some games on github and try to compile them, all works. but those gradle version are low. just want to know it is my fault or it not support for gradle 7?

xhaimxd avatar Apr 27 '22 04:04 xhaimxd

update: I had copied the plugin's source code, and modified code from @Input to @OutputDirectory and @InputFiles on generatedDirectory and classpath. it worked but, it throwed some ClassNotFoundException like JsonSerializer or ServletContext. I found it scanned all dependencies which i implemented. How to solved it?

xhaimxd avatar Apr 28 '22 02:04 xhaimxd

I have the same problem

aluminais avatar Nov 03 '22 02:11 aluminais

update: I had copied the plugin's source code, and modified code from @input to @OutputDirectory and @InputFiles on generatedDirectory and classpath. it worked but, it throwed some ClassNotFoundException like JsonSerializer or ServletContext. I found it scanned all dependencies which i implemented. How to solved it?

I was able to run this project using gralde6.9.4

ChinQingl avatar May 04 '24 02:05 ChinQingl