awslabs / aws-mobile-appsync-sdk-android

Android SDK for AWS AppSync.
https://docs.amplify.aws/sdk/api/graphql/q/platform/android/
Apache License 2.0
105 stars 58 forks source link

Type 'ApolloIRGenTask' field 'extension' without corresponding getter has been annotated with @Internal. #345

Closed jtn-devecto closed 2 years ago

jtn-devecto commented 3 years ago

Describe the bug

FAILURE: Build failed with an exception.

* What went wrong:
Some problems were found with the configuration of task ':XXX:generateXXXApolloIR' (type 'ApolloIRGenTask').
  - Type '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.0-rc-1/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
  - Type '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.0-rc-1/userguide/validation_problems.html#ignored_annotations_on_field for more details about this problem.
  - Type '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.0-rc-1/userguide/validation_problems.html#ignored_annotations_on_field 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 16s
11 actionable tasks: 11 executed

To Reproduce Steps to reproduce the behavior:

  1. Build the project
  2. See error

Expected behavior The project is built and the generated source files will be available to use within the app.

Environment

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext.kotlin_version = '1.4.32'
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.0.0-alpha14'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.5'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.2'
        classpath 'com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.1.4'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven {
            url "https://plugins.gradle.org/m2/"
        }
        google()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
kelvinharron commented 3 years ago

This is preventing us from adopting Gradle 7. Is there any timeline on resolving this issue that seems to stem from the usage of Apollo?

using com.amazonaws:aws-android-sdk-appsync:3.1.4 and com.amazonaws:aws-android-sdk-core:2.23.0 with gradle distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip.

DmyMi commented 3 years ago

Having the same problem that stops us from adopting Gradle 7.0. Any ETA for a fix would be great.

rly73 commented 3 years ago

Having this issue as well.

juandiana commented 3 years ago

Gradle 7.1 was released today and AWS AppSync plugin still faces this issue

lolucosmin commented 3 years ago

Hi, I have same issue: "Some problems were found with the configuration of task ':app:generateBfanteamQaApolloIR' (type 'ApolloIRGenTask').

My Config: compileSdkVersion 30 buildToolsVersion '30.0.3'

classpath 'com.android.tools.build:gradle:7.0.0' classpath 'com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.1.4'

TomBell-Trove commented 3 years ago

Keen on seeing a fix for this so we can update to the latest AS plugin

ghost commented 2 years ago

Waiting for a fix to be able to use Gradle 7.++

wafel82 commented 2 years ago

I'm struggling with the same issue. I've downgraded gradle version to 4.2.2 (jsut to verify if it will help) - no luck. Still getting this error :/

Here's my build.gradle :

buildscript {
  repositories {
    google()
    mavenCentral()
    maven {url "https://plugins.gradle.org/m2/"}
  }
  dependencies {
    classpath "com.android.tools.build:gradle:4.2.2"
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
    classpath 'com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.2.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
  }
}

allprojects {
  repositories {
    google()
    mavenCentral()
    jcenter()
    maven {url "https://plugins.gradle.org/m2/"}
  }
}

task clean(type: Delete) {
  delete rootProject.buildDir
}

And here's the error:

Some problems were found with the configuration of task ':app:generateDebugApolloIR' (type 'ApolloIRGenTask').
  - Type 'com.apollographql.apollo.gradle.ApolloIRGenTask' field 'extension' without corresponding getter has been annotated with @Internal.
somq commented 2 years ago

Closed by https://github.com/awslabs/aws-mobile-appsync-sdk-android/pull/361?

sebsto commented 2 years ago

Nope, same error as described above :

Some problems were found with the configuration of task ':app:generateDebugApolloIR' (type 'ApolloIRGenTask').
  - Type 'com.apollographql.apollo.gradle.ApolloIRGenTask' field 'extension' without corresponding getter has been annotated with @Internal.
sasam0502 commented 2 years ago

Hi all,

I still get the error. Has anyone a solution?


    implementation 'com.amazonaws:aws-android-sdk-core:2.40.0'
    implementation 'com.amazonaws:aws-android-sdk-appsync:3.3.0'
    implementation 'com.amazonaws:aws-android-sdk-s3:2.40.0'
    implementation ('com.amazonaws:aws-android-sdk-mobile-client:2.40.0@aar') { transitive = true }
    implementation ('com.amazonaws:aws-android-sdk-auth-userpools:2.40.0@aar') { transitive = true }
    implementation 'com.amplifyframework:core:1.31.3'
    implementation 'com.amplifyframework:aws-storage-s3:1.31.3'
lolucosmin commented 2 years ago

Hi all,

I still get the error. Has anyone a solution?


    implementation 'com.amazonaws:aws-android-sdk-core:2.40.0'
    implementation 'com.amazonaws:aws-android-sdk-appsync:3.3.0'
    implementation 'com.amazonaws:aws-android-sdk-s3:2.40.0'
    implementation ('com.amazonaws:aws-android-sdk-mobile-client:2.40.0@aar') { transitive = true }
    implementation ('com.amazonaws:aws-android-sdk-auth-userpools:2.40.0@aar') { transitive = true }
    implementation 'com.amplifyframework:core:1.31.3'
    implementation 'com.amplifyframework:aws-storage-s3:1.31.3'

Hey, at app level add in build.gradle this: classpath 'com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.3.0' and will works, I did same mistake I update exactly like you but I forgot to update the plugin.

sasam0502 commented 2 years ago

Hi all, I still get the error. Has anyone a solution?


    implementation 'com.amazonaws:aws-android-sdk-core:2.40.0'
    implementation 'com.amazonaws:aws-android-sdk-appsync:3.3.0'
    implementation 'com.amazonaws:aws-android-sdk-s3:2.40.0'
    implementation ('com.amazonaws:aws-android-sdk-mobile-client:2.40.0@aar') { transitive = true }
    implementation ('com.amazonaws:aws-android-sdk-auth-userpools:2.40.0@aar') { transitive = true }
    implementation 'com.amplifyframework:core:1.31.3'
    implementation 'com.amplifyframework:aws-storage-s3:1.31.3'

Hey, at app level add in build.gradle this: classpath 'com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.3.0' and will works, I did same mistake I update exactly like you but I forgot to update the plugin.

sasam0502 commented 2 years ago

Hi all, I still get the error. Has anyone a solution?


    implementation 'com.amazonaws:aws-android-sdk-core:2.40.0'
    implementation 'com.amazonaws:aws-android-sdk-appsync:3.3.0'
    implementation 'com.amazonaws:aws-android-sdk-s3:2.40.0'
    implementation ('com.amazonaws:aws-android-sdk-mobile-client:2.40.0@aar') { transitive = true }
    implementation ('com.amazonaws:aws-android-sdk-auth-userpools:2.40.0@aar') { transitive = true }
    implementation 'com.amplifyframework:core:1.31.3'
    implementation 'com.amplifyframework:aws-storage-s3:1.31.3'

Hey, at app level add in build.gradle this: classpath 'com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.3.0' and will works, I did same mistake I update exactly like you but I forgot to update the plugin.

Perfect, that solved the issue. Thanks, Iolucosmin!

poojamat commented 2 years ago

Solution: 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