Skip to content

Commit ceb8c60

Browse files
authored
Fixed missing gradle imports for Logging category (#7511)
* Fixed missing gradle imports for Logging * Updated fragments to InlineFilter
1 parent d897306 commit ceb8c60

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/fragments/lib/logging/common/setup_logging/setup_logging.mdx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,39 @@ export class RemoteLoggingConstraintsConstruct extends Construct {
7373

7474
The `<log-group-name>` and `<region>` will be printed out in the in the terminal. You can use this information to setup the Amplify library in the next section.
7575

76+
<InlineFilter filters={['android']}>
77+
78+
## Install Amplify Libraries
79+
80+
Add the following dependencies to your `build.gradle (Module :app)` file and click "Sync Now" when prompted:
81+
82+
```
83+
android {
84+
compileOptions {
85+
// Support for Java 8 features
86+
coreLibraryDesugaringEnabled true
87+
sourceCompatibility JavaVersion.VERSION_1_8
88+
targetCompatibility JavaVersion.VERSION_1_8
89+
}
90+
}
91+
92+
dependencies {
93+
// Amplify API dependencies
94+
implementation 'com.amplifyframework:aws-auth-cognito:ANDROID_VERSION'
95+
implementation 'com.amplifyframework:aws-logging-cloudwatch:ANDROID_VERSION'
96+
// ... other dependencies
97+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.3'
98+
}
99+
```
100+
101+
<Callout>
102+
103+
**Note:** The CloudWatch plugin has a dependency on Cognito Auth.
104+
105+
</Callout>
106+
107+
</InlineFilter>
108+
76109
## Initialize Amplify Logging
77110

78111
In this section, we will initialize and setup the Amplify library. The Logger can be configured via a configuration file or in code when your app is initializing.

0 commit comments

Comments
 (0)