Closed baksansk closed 1 year ago
Facing the issue, using the 3.2.0 version of this library. When is the above committed fix expected to be released? Currently we have rollbacked AGP version to 4.2.2 for this to work. Thanks.
@baksansk can you please try to merge the branches and push a stable a version , we really need that gradle 7 fix
I cannot get appsync working with my amplify app due to this problem. I've tried AGP 4.2.2, gradle 6.7.1 and gone back to appsync 2.11.0. I can build OK but it will not run. I'm getting a gradle build exception caused by a FileNotFoundException for "/Users/steve/.gradle/daemon/6.7.1/amplify/backend/api" which is just wrong... I've got this working fine on an iOS version of my app. Just the Android version which seems to be broken!
The PR was merged and waiting for the next release.
After merging the previous PR to fix a compile issue with Gradle 7, I encountered a different error regarding private NullableValueType nullableValueType
in ApolloGenTask
.
I don't have the specific error here but it is about a missing annotation on a private property. It's missing Input/Output annotation. Adding @Internal
would fix this.
These PRs have been released as part of version 3.2.1.
The issue is persisting in 3.2.1 as well. I just tested it. Please reopen. The build error is:
Some problems were found with the configuration of task ':app:generateDebugApolloIR' (type 'ApolloIRGenTask').
- In plugin 'com.amazonaws.appsync' type 'com.apollographql.apollo.gradle.ApolloIRGenTask' field 'extension' without corresponding getter has been annotated with @Internal.
Reason: Annotations on fields are only used if there's a corresponding getter for the field.
Possible solutions:
1. Add a getter for field 'extension'.
2. Remove the annotations on 'extension'.
extension does have a getter method: https://github.com/awslabs/aws-mobile-appsync-sdk-android/blob/b59540b12db962ede72e6ff5b8c861707d6a53f1/aws-android-sdk-appsync-gradle-plugin/src/main/java/com/apollographql/apollo/gradle/ApolloIRGenTask.java#L273
need to reproduce this with a minimal project to expose all related errors to Gradle 7. When I applied the fix (adding @Internal
annotation to extension
), it seems to work with Gradle 7.3.
Seems to be working for me with gradle plugin 7.0.3 and gradle 7.0.2
Thanks @baksansk
I am not sure whether I am missing something, I am pointing to 3.2.1 version, AGP is set to 7.0.2 and Gradle is set to 7.3 (I tried 7.0.2 also). To be sure, I also invalidated my caches and restarted, and I also did a build clean. Its the same error. Also note its just not extensions, my previous error message was incomplete:
* What went wrong:
Some problems were found with the configuration of task ':app:generateDebugApolloIR' (type 'ApolloIRGenTask').
- In plugin 'com.amazonaws.appsync' type 'com.apollographql.apollo.gradle.ApolloIRGenTask' field 'extension' without corresponding getter has been annotated with @Internal.
Reason: Annotations on fields are only used if there's a corresponding getter for the field.
Possible solutions:
1. Add a getter for field 'extension'.
2. Remove the annotations on 'extension'.
Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
- In plugin 'com.amazonaws.appsync' type 'com.apollographql.apollo.gradle.ApolloIRGenTask' field 'sourceSets' without corresponding getter has been annotated with @Internal.
Reason: Annotations on fields are only used if there's a corresponding getter for the field.
Possible solutions:
1. Add a getter for field 'sourceSets'.
2. Remove the annotations on 'sourceSets'.
Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
- In plugin 'com.amazonaws.appsync' type 'com.apollographql.apollo.gradle.ApolloIRGenTask' field 'variant' without corresponding getter has been annotated with @Internal.
Reason: Annotations on fields are only used if there's a corresponding getter for the field.
Possible solutions:
1. Add a getter for field 'variant'.
2. Remove the annotations on 'variant'.
Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
I tried the latest 3.3.0 version of the library and the issue still persists. Please can this be looked into? We are having to hold off on Gradle plugin updates just because of this issue
at app level add in build.gradle this: classpath 'com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.3.0' Fixed with this PR: https://github.com/awslabs/aws-mobile-appsync-sdk-android/pull/361
I think, It is same issue on my project. So I was add @Internal annotation from original source code. Gradle 7 has annotation issue from internal variance without @Internal annotation.
So, I was change the original code from https://github.com/noamt/rest-gradle-plugin to https://github.com/melchi/rest-gradle-plugin. adding the @Internal annotation in original code like for me when you have same issues.
@melchi45 which version of sdk are you using?
When you update to Gradle 7.1.1 and Android Gradle plugin 7.0.0 you get the following build error: