Skip to content

Commit 777daa2

Browse files
authored
Android QuickStart fixes and amplify_outputs.json naming issues. (#7395)
1 parent f49a674 commit 777daa2

File tree

6 files changed

+43
-42
lines changed

6 files changed

+43
-42
lines changed

src/components/MDXComponents/MDXCode.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ const addVersions = (code: string) => {
2727
);
2828
code = code.replace(/ANDROID_SDK_VERSION/g, versions.ANDROID_SDK_VERSION);
2929
code = code.replace(/KOTLIN_SDK_VERSION/g, versions.KOTLIN_SDK_VERSION);
30+
code = code.replace(
31+
/ANDROID_AUTHENTICATOR_VERSION/g,
32+
versions.ANDROID_AUTHENTICATOR_VERSION
33+
);
3034
return code;
3135
};
3236

src/constants/versions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
export const versions = {
2-
ANDROID_VERSION: '2.14.11',
2+
ANDROID_VERSION: '2.16.0',
33
ANDROID_DEVPREVIEW: '1.36.5-dev-preview.0',
44
ANDROID_V1_VERSION: '1.38.8',
55
ANDROID_V1_GEO_VERSION: '1.0.1',
66
ANDROID_V1_KOTLIN_VERSION: '0.22.8',
77
ANDROID_SDK_VERSION: '2.73.0',
8-
KOTLIN_SDK_VERSION: '1.0.44'
8+
KOTLIN_SDK_VERSION: '1.0.44',
9+
ANDROID_AUTHENTICATOR_VERSION: '1.2.0'
910
};

src/pages/[platform]/build-a-backend/auth/set-up-auth/index.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,9 +631,8 @@ Add the following dependencies to your *app*'s `build.gradle` file and click "Sy
631631
<Block name="Kotlin DSL">
632632
```kotlin
633633
dependencies {
634-
implementation("androidx.compose.material3:material3:1.1.0")
635634
implementation("com.amplifyframework.ui:authenticator:1.1.0")
636-
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
635+
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
637636
}
638637
```
639638
</Block>
@@ -644,10 +643,9 @@ dependencies {
644643
dependencies {
645644
// Authenticator dependency
646645
implementation 'com.amplifyframework.ui:authenticator:1.1.0'
647-
implementation 'androidx.compose.material3:material3:1.1.0'
648646
649647
// Support for Java 8 features
650-
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
648+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
651649
}
652650
}
653651
```

src/pages/[platform]/start/quickstart/index.mdx

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -137,18 +137,18 @@ git clone https://github.com/<github-user>/amplify-vite-react-template.git
137137
cd amplify-vite-react-template && npm install
138138
```
139139

140-
Now move the `amplify-outputs.json` file you downloaded above to the root of your project.
140+
Now move the `amplify_outputs.json` file you downloaded above to the root of your project.
141141

142142
```text
143143
├── amplify
144144
├── src
145-
├── amplify-outputs.json <== backend outputs file
145+
├── amplify_outputs.json <== backend outputs file
146146
├── package.json
147147
└── tsconfig.json
148148
```
149149

150-
<Accordion title='amplify-outputs.json' headingLevel='4' eyebrow='Learn more'>
151-
The **amplify-outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend. You can review how the outputs file is imported within the `main.tsx` file and then passed into the `Amplify.configure(...)` function of the Amplify client library.
150+
<Accordion title='amplify_outputs.json' headingLevel='4' eyebrow='Learn more'>
151+
The **amplify_outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend. You can review how the outputs file is imported within the `main.tsx` file and then passed into the `Amplify.configure(...)` function of the Amplify client library.
152152
</Accordion>
153153

154154

@@ -274,7 +274,7 @@ To start your cloud sandbox, run the following command in a **new Terminal windo
274274
npx amplify sandbox
275275
```
276276

277-
Once the cloud sandbox has been fully deployed (~5 min), you'll see the `amplify-outputs.json` file updated with connection information to a new isolated authentication and data backend.
277+
Once the cloud sandbox has been fully deployed (~5 min), you'll see the `amplify_outputs.json` file updated with connection information to a new isolated authentication and data backend.
278278

279279
<Callout info>
280280

@@ -474,18 +474,18 @@ git clone https://github.com/<github-user>/amplify-vue-template.git
474474
cd amplify-vue-template && npm install
475475
```
476476

477-
Now move the `amplify-output.json` file you downloaded above to the root of your project.
477+
Now move the `amplify_outputs.json` file you downloaded above to the root of your project.
478478

479479
```text
480480
├── amplify
481481
├── src
482-
├── amplify-outputs.json <== backend outputs file
482+
├── amplify_outputs.json <== backend outputs file
483483
├── package.json
484484
└── tsconfig.json
485485
```
486486

487-
<Accordion title='amplify-outputs.json' headingLevel='4' eyebrow='Learn more'>
488-
The **amplify-outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend. You can review how the outputs file is imported within the `main.tsx` file and then passed into the `Amplify.configure(...)` function of the Amplify client library.
487+
<Accordion title='amplify_outputs.json' headingLevel='4' eyebrow='Learn more'>
488+
The **amplify_outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend. You can review how the outputs file is imported within the `main.tsx` file and then passed into the `Amplify.configure(...)` function of the Amplify client library.
489489
</Accordion>
490490

491491

@@ -618,7 +618,7 @@ To start your cloud sandbox, run the following command in a **new Terminal windo
618618
npx amplify sandbox
619619
```
620620

621-
Once the cloud sandbox has been fully deployed (~5 min), you'll see the `amplify-outputs.json` file updated with connection information to a new isolated authentication and data backend.
621+
Once the cloud sandbox has been fully deployed (~5 min), you'll see the `amplify_outputs.json` file updated with connection information to a new isolated authentication and data backend.
622622

623623
<Callout info>
624624

@@ -807,18 +807,18 @@ git clone https://github.com/<github-user>/amplify-vite-react-template.git
807807
cd amplify-vite-react-template && npm install
808808
```
809809

810-
Now move the `amplify-output.json` file you downloaded above to the root of your project.
810+
Now move the `amplify_outputs.json` file you downloaded above to the root of your project.
811811

812812
```text
813813
├── amplify
814814
├── src
815-
├── amplify-outputs.json <== backend outputs file
815+
├── amplify_outputs.json <== backend outputs file
816816
├── package.json
817817
└── tsconfig.json
818818
```
819819

820-
<Accordion title='amplify-outputs.json' headingLevel='4' eyebrow='Learn more'>
821-
The **amplify-outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend. You can review how the outputs file is imported within the `main.tsx` file and then passed into the `Amplify.configure(...)` function of the Amplify client library.
820+
<Accordion title='amplify_outputs.json' headingLevel='4' eyebrow='Learn more'>
821+
The **amplify_outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend. You can review how the outputs file is imported within the `main.tsx` file and then passed into the `Amplify.configure(...)` function of the Amplify client library.
822822
</Accordion>
823823

824824

@@ -966,7 +966,7 @@ To start your cloud sandbox, run the following command in a **new Terminal windo
966966
npx amplify sandbox
967967
```
968968

969-
Once the cloud sandbox has been fully deployed (~5 min), you'll see the `amplify-outputs.json` file updated with connection information to a new isolated authentication and data backend.
969+
Once the cloud sandbox has been fully deployed (~5 min), you'll see the `amplify_outputs.json` file updated with connection information to a new isolated authentication and data backend.
970970

971971
<Callout info>
972972

@@ -1523,7 +1523,7 @@ To deploy your backend use Amplify's per-developer cloud sandbox. This feature p
15231523
npx amplify sandbox
15241524
```
15251525

1526-
Once the sandbox environment is deployed, it will create an `amplify-outputs.json`. However, Xcode won't be able to recognize them. For recognizing the files, you need to drag and drop the generated files to your project.
1526+
Once the sandbox environment is deployed, it will create an `amplify_outputs.json`. However, Xcode won't be able to recognize them. For recognizing the files, you need to drag and drop the generated files to your project.
15271527

15281528
<video autoPlay={true} muted={true} loop={true} width="100%" playsInline={true}>
15291529
<source src="/images/gen2/getting-started/ios/ios-getting-started-2.mp4" />
@@ -1945,31 +1945,30 @@ In **Select a Project Template**, select **Empty Activity** or **Empty Compose A
19451945

19461946
</Accordion>
19471947

1948-
On the **Deployed backend resources**, choose **Download outputs file** to download the `amplify-output.json` file that contains identifiers for all the deployed backend resources.
1948+
On the **Deployed backend resources**, choose **Download outputs file** to download the `amplify_outputs.json` file that contains identifiers for all the deployed backend resources.
19491949

19501950
![outputs](/images/gen2/getting-started/react/amplify-outputs-download.png)
19511951

19521952

1953-
Now move the `amplify-output.json` file you downloaded above to `app/src/main/res/raw` in your Android project. You will now be able to connect to this backend.
1953+
Now move the `amplify_outputs.json` file you downloaded above to `app/src/main/res/raw` in your Android project. You will now be able to connect to this backend.
19541954

1955-
<Accordion title='amplify-outputs.json' headingLevel='4' eyebrow='Learn more'>
1956-
The **amplify-outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend. You can review how the outputs file is imported within the `main.tsx` file and then passed into the `Amplify.configure(...)` function of the Amplify client library.
1955+
<Accordion title='amplify_outputs.json' headingLevel='4' eyebrow='Learn more'>
1956+
The **amplify_outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend.
19571957
</Accordion>
19581958

19591959

19601960
### 5. Implement login UI
19611961

1962-
The deployed backend application already has a pre-configured auth backend defined in the `amplify/auth/resource.ts` file. We've configured it to support email and password login but you can extend it to support a variety of login mechanisms, including Google, Amazon, Sign In With Apple, and Facebook.
1962+
The deployed backend application already has a pre-configured auth backend defined in the `amplify/auth/resource.ts` file.
19631963

19641964
The fastest way to get your login experience up and running is to use our Authenticator UI component. To use the Authenticator UI component, you need to add the following dependencies to your app/build.gradle file:
19651965

19661966
<Callout warning>Be sure to have compileSdk version as 34 or higher.</Callout>
19671967

19681968
```kotlin title="app/build.gradle"
19691969
dependencies {
1970-
implementation("androidx.compose.material3:material3:1.1.0")
1971-
implementation("com.amplifyframework.ui:authenticator:1.1.0")
1972-
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
1970+
implementation("com.amplifyframework.ui:authenticator:ANDROID_AUTHENTICATOR_VERSION")
1971+
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.3")
19731972
}
19741973
```
19751974

@@ -2071,7 +2070,7 @@ In the command below, replace the APP-ID with your Amplify app ID. Find this in
20712070
20722071
```bash title="Terminal" showLineNumbers={false}
20732072
cd my-android-app
2074-
npx @aws-amplify/backend-cli graphql-client-code --format modelgen --model-target java --out app/src/main/java --app-id <your-amplify-app-id> --branch-name main
2073+
npx @aws-amplify/backend-cli generate graphql-client-code --format modelgen --model-target java --out app/src/main/java --app-id <your-amplify-app-id> --branch main
20752074
```
20762075
20772076
Once you are done, add the following dependencies to your project:
@@ -2080,8 +2079,7 @@ Once you are done, add the following dependencies to your project:
20802079
dependencies {
20812080
// Amplify API dependencies
20822081
// highlight-start
2083-
implementation("com.amplifyframework:aws-api:2.14.11")
2084-
implementation("com.amplifyframework:core:2.14.11")
2082+
implementation("com.amplifyframework:aws-api:ANDROID_VERSION")
20852083
// highlight-end
20862084
// ... other dependencies
20872085
}
@@ -2296,7 +2294,7 @@ In the command below, replace the APP-ID with your Amplify app ID. Find this in
22962294
</Accordion>
22972295
22982296
```bash showLineNumbers={false}
2299-
npx @aws-amplify/backend-cli generate outputs --format modelgen --model-target java --out app/src/main/java --app-id <your-amplify-app-id> --branch-name main
2297+
npx @aws-amplify/backend-cli generate graphql-client-code --format modelgen --model-target java --out app/src/main/java --app-id <your-amplify-app-id> --branch main
23002298
```
23012299
23022300
Also update your `amplify_outputs` file with the latest outputs information.

src/pages/[platform]/start/quickstart/nextjs-app-router-client-components/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ Now move the `amplifyconfiguration.json` file you downloaded above to the root o
130130
```text
131131
├── amplify
132132
├── src
133-
├── amplify-outputs.json <== backend outputs file
133+
├── amplify_outputs.json <== backend outputs file
134134
├── package.json
135135
└── tsconfig.json
136136
```
137137

138-
<Accordion title='amplify-outputs.json' headingLevel='4' eyebrow='Learn more'>
139-
The **amplify-outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend. You can review how the outputs file is imported within the `main.tsx` file and then passed into the `Amplify.configure(...)` function of the Amplify client library.
138+
<Accordion title='amplify_outputs.json' headingLevel='4' eyebrow='Learn more'>
139+
The **amplify_outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend. You can review how the outputs file is imported within the `main.tsx` file and then passed into the `Amplify.configure(...)` function of the Amplify client library.
140140
</Accordion>
141141

142142
### 5. Implement delete functionality
@@ -302,7 +302,7 @@ To start your cloud sandbox, run the following command in a **new Terminal windo
302302
npx amplify sandbox
303303
```
304304

305-
Once the cloud sandbox has been fully deployed (~5 min), you'll see the `amplify-outputs.json` file updated with connection information to a new isolated authentication and data backend.
305+
Once the cloud sandbox has been fully deployed (~5 min), you'll see the `amplify_outputs.json` file updated with connection information to a new isolated authentication and data backend.
306306

307307
<Callout info>
308308

src/pages/[platform]/start/quickstart/nextjs-pages-router/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,13 @@ Now move the `amplifyconfiguration.json` file you downloaded above to the root o
131131
```text
132132
├── amplify
133133
├── src
134-
├── amplify-outputs.json <== backend outputs file
134+
├── amplify_outputs.json <== backend outputs file
135135
├── package.json
136136
└── tsconfig.json
137137
```
138138

139-
<Accordion title='amplify-outputs.json' headingLevel='4' eyebrow='Learn more'>
140-
The **amplify-outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend. You can review how the outputs file is imported within the `main.tsx` file and then passed into the `Amplify.configure(...)` function of the Amplify client library.
139+
<Accordion title='amplify_outputs.json' headingLevel='4' eyebrow='Learn more'>
140+
The **amplify_outputs.json** file contains backend endpoint information, publicly-viewable API keys, authentication flow information, and more. The Amplify client library uses this outputs file to connect to your Amplify Backend. You can review how the outputs file is imported within the `main.tsx` file and then passed into the `Amplify.configure(...)` function of the Amplify client library.
141141
</Accordion>
142142

143143
### 5. Implement delete functionality
@@ -349,7 +349,7 @@ To start your cloud sandbox, run the following command in a **new Terminal windo
349349
npx amplify sandbox
350350
```
351351

352-
Once the cloud sandbox has been fully deployed (~5 min), you'll see the `amplify-outputs.json` file updated with connection information to a new isolated authentication and data backend.
352+
Once the cloud sandbox has been fully deployed (~5 min), you'll see the `amplify_outputs.json` file updated with connection information to a new isolated authentication and data backend.
353353

354354
<Callout info>
355355

0 commit comments

Comments
 (0)