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

Support Apple Silicon #355

Closed timfreiheit closed 9 months ago

timfreiheit commented 3 years ago

Currently it is not supported to use the AppSync gradle plugin on a device running Apple Silicon (M1)

Execution failed for task ':data:nodeSetup'.
> Could not resolve all files for configuration ':data:detachedConfiguration9'.
   > Could not find org.nodejs:node:6.7.0.
     Searched in the following locations:
       - https://nodejs.org/dist/v6.7.0/node-v6.7.0-darwin-arm64.tar.gz
     Required by:
         project :data

This is due to using node in version 6.7.0 which does not have support for darwin-arm64 Node.js does support Apple Silicon since version 16.0.0

Updating to a newer node version works by using

node {
  version = "16.2.0"
}

It would be great to have official support for this.

div5yesh commented 3 years ago

These changes would be required here: https://github.com/awslabs/aws-mobile-appsync-sdk-android/blob/0435eb2b99d2233e5184d66c588e69596b104360/aws-android-sdk-appsync-gradle-plugin/src/main/groovy/com/apollographql/apollo/gradle/ApolloPlugin.groovy#L33

Currently Node.js v14.17.3 is LTS which does not support Apple Silicon. We should probably wait for v16 LTS release before making this change.

danielulrik commented 3 years ago

Is there any work around for this to work with Apple Silicon?

msimic-dev commented 2 years ago

According to this v16 will hit LTS in about 3 weeks. Can we expect any changes this month?

msimic-dev commented 2 years ago

Node.js v16.13.0 has finally LTS. And with more new M1 Macs coming this should be taken care of.

damian-lee-km commented 2 years ago

Any plans for a fix for this issue?

DanOxlade commented 2 years ago

Really need a fix for this as many more of my colleagues are upgrading to M1 Macs and no longer able to use this plugin.

keco1249 commented 9 months ago

did this ever get fixed?

tylerjroach commented 9 months ago

Thank you for reaching out. Will look to publish the plugin to use a newer version of node compatible with Apple Silicon chips.

keco1249 commented 9 months ago

awesome, thank you!

tylerjroach commented 9 months ago

version 3.4.1 has been released which should allow the gradle plugin to work with Apple Silicon devices!

keco1249 commented 9 months ago

That worked, thanks for the quick turnaround!