Open vshwnth2 opened 7 years ago
stacktrace:
should be the gradle version issue, if you use gradle 4.0, it will be fine, good luck!
@vshwnth2 This is quite a delayed follow-up, but this was resolved, yeah?
The quick-start seems to be broken again. When I go the /api
folder and do a gradle build
I see the following error:
FAILURE: Build failed with an exception.
* Where:
Build file '/rest.li-master/examples/quickstart/build.gradle' line: 12
* What went wrong:
A problem occurred evaluating root project 'quickstart'.
> Cannot add task 'wrapper' as a task with that name already exists.
* 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 436ms
When I change the following in the /rest.li-master/examples/quickstart/build.gradle
task wrapper(type: Wrapper) {
gradleVersion = '4.6'
}
to
wrapper {
gradleVersion = '4.6'
}
and then try gradle build
in the /api
folder I see the following error:
> Task :api:changedFilesReport FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':api:changedFilesReport'.
> You must declare outputs or use `TaskOutputs.upToDateWhen()` when using the incremental task API
* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 637ms
6 actionable tasks: 1 executed, 5 up-to-date
any ideas as to what could be going wrong?
@venkyvb Yeah, my guess is that this is something we forgot to clean up when upgrading to Gradle 5. See how we removed the wrapper
task for the root build script in linkedin#242. I'm inferring that the guy who did the work didn't try building these sample projects (people often forget they're there). Could you try removing the wrapper task definition altogether? If it works, feel free to open a PR to fix this.
@evanw555 I tried removing the wrapper task (line 12 - 14 in build.gradle) and it builds successfully. So, your suggestion works!
Task :api:generateDataTemplate FAILED
FAILURE: Build failed with an exception.
What went wrong: Some problems were found with the configuration of task ':api:generateDataTemplate' (type 'GenerateDataTemplateTask').
Reason: Input/Output annotations are ignored if they are placed on something else than a getter.
Possible solutions:
Please refer to https://docs.gradle.org/7.4.2/userguide/validation_problems.html#ignored_annotations_on_method for more details about this problem.
Reason: Input/Output annotations are ignored if they are placed on something else than a getter.
Possible solutions:
Please refer to https://docs.gradle.org/7.4.2/userguide/validation_problems.html#ignored_annotations_on_method 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.4.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 4s 1 actionable task: 1 executed
I am facing this issue when i tried to build in api gradle file //Content of build file in api folder api/build.gradle apply plugin: 'pegasus'
Trying to follow https://github.com/linkedin/rest.li/wiki/Quickstart:-A-Tutorial-Introduction-to-Rest.li
On the first gradle build command inside /api folder, i get the following error:
FAILURE: Build failed with an exception.
If it helps, these are the versions I have installed locally: gradle --version
Gradle 4.3.1
Build time: 2017-11-08 08:59:45 UTC Revision: e4f4804807ef7c2829da51877861ff06e07e006d
Groovy: 2.4.12 Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015 JVM: 1.8.0_121 (Oracle Corporation 25.121-b13) OS: Mac OS X 10.12.4 x86_64