From dee1a8101f5add72135f7c2c4d8ccca5e3cbf2b5 Mon Sep 17 00:00:00 2001 From: Matt Creaser Date: Tue, 13 Dec 2022 17:40:29 -0400 Subject: [PATCH] chore: Upgrade Gradle, AGP, and KtLint (#2172) * Remove deprecated maven project * Fix task name grep * Upgrade Gradle to 7.5.1 * Upgrade AGP * Add VERSION_NAME back to BuildConfig This was removed for library projects in AGP 4.1. We may consider renaming this in the future to disambiguate the Amplify version and the application version. * Update KtLint and fix all new lint errors * Use JDK11 on codebuild * Use JDK11 in workflows * Upgrade compileSdkVersion to 31 * Try using custom commands to install Android SDK 31 * Update device farm buildspec with manual Android SDK install * Fix additional ktlint errors * Upgrade Desugar to JDK11-compatible version * Upgrade Robolectric * Set locale explicitly to match expectation --- .github/workflows/codecov_code_coverage.yml | 2 +- .github/workflows/gradle.yml | 4 +- .idea/codeStyles/Project.xml | 3 + .../pinpoint/models/PinpointEventTest.kt | 5 +- .../auth/cognito/KotlinAuthFacadeInternal.kt | 40 +++--- .../auth/cognito/RealAWSCognitoAuthPlugin.kt | 27 ++-- .../cognito/helpers/HostedUIHttpHelper.kt | 58 ++++---- .../cognito/helpers/SignInChallengeHelper.kt | 4 +- .../SignUpTestCaseGenerator.kt | 43 +++--- .../AWSS3StoragePluginConfiguration.kt | 11 +- build.gradle | 12 +- .../kotlin/api/KotlinApiFacade.kt | 64 ++++----- .../kotlin/auth/KotlinAuthFacade.kt | 18 +-- .../kotlin/datastore/KotlinDataStoreFacade.kt | 22 +-- .../kotlin/storage/KotlinStorageFacade.kt | 130 +++++++++--------- core/build.gradle | 5 - .../api/graphql/PaginatedResult.java | 11 +- core/src/main/res/values/dev_menu_strings.xml | 5 +- gradle/wrapper/gradle-wrapper.jar | Bin 54708 -> 59203 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- gradlew | 53 ++++--- gradlew.bat | 43 +++--- .../src/main/res/values/colors.xml | 5 +- .../src/main/res/values/dimens.xml | 5 +- scripts/devicefarm-test-runner-buildspec.yml | 22 ++- scripts/maven-release-publisher.yml | 6 +- scripts/pr-builder-buildspec.yml | 16 ++- 27 files changed, 324 insertions(+), 293 deletions(-) diff --git a/.github/workflows/codecov_code_coverage.yml b/.github/workflows/codecov_code_coverage.yml index 515284cdab..64263d90b0 100644 --- a/.github/workflows/codecov_code_coverage.yml +++ b/.github/workflows/codecov_code_coverage.yml @@ -29,7 +29,7 @@ jobs: - name: Setup Java uses: actions/setup-java@v3 with: - java-version: '8' + java-version: '11' distribution: 'corretto' - name: Run test and generate jacoco report diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index ac5602a728..c5228ec6af 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -16,10 +16,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 1.8 + - name: Set up JDK 11 uses: actions/setup-java@v1 with: - java-version: 1.8 + java-version: 11 - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index bb3923b2db..42cc79e213 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -131,6 +131,9 @@