From 20eada62669060ac04cdabc6ca1d73530392f83b Mon Sep 17 00:00:00 2001 From: Chintan Soni Date: Wed, 10 Jan 2024 19:26:57 +0000 Subject: [PATCH] PIMOB:2284: Download AAR file from s3Bucket --- .github/workflows/codeql-analysis.yml | 17 +++++++++++++++-- cardmanagement/build.gradle | 1 + cardnetwork/build.gradle | 2 ++ settings.gradle | 1 + 4 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 cardnetwork/build.gradle diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index eacb8a7..dcc21bd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -8,6 +8,7 @@ on: branches: [ "main", "bugfix/*", "feature/*", "release/*" ] paths: - 'cardmanagement/**' + - 'cardnetwork/**' - 'build.gradle' - 'settings.gradle' schedule: @@ -63,8 +64,20 @@ jobs: languages: ${{ matrix.language }} queries: security-and-quality - - name: Build with Gradle - run: ./gradlew :cardmanagement:build + - name: Cache checkout-sdk-card-network-android.aar + id: cache-checkout-sdk-card-network-android-aar + uses: actions/cache@v3 + with: + path: ./cardnetwork/ + key: ${{ runner.os }}-cache-checkout-sdk-card-network-android + + - name: Download checkout-sdk-card-network-android.aar from s3 bucket + # if there is no cache hit, download the aar from s3 bucket + if: steps.cache-checkout-sdk-card-network-android-aar.outputs.cache-hit != 'true' + run: aws s3api get-object --bucket cko-mobile-s3 --key checkout-sdk-card-network-android.aar ./cardnetwork/checkout-sdk-card-network-android.aar + + - name: Build Assemble cardmanagement + run: ./gradlew :cardmanagement:assembleDebug - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v2 \ No newline at end of file diff --git a/cardmanagement/build.gradle b/cardmanagement/build.gradle index 1b8593a..33456dc 100644 --- a/cardmanagement/build.gradle +++ b/cardmanagement/build.gradle @@ -41,6 +41,7 @@ android { dependencies { // Add `checkout-sdk-card-management-android` + implementation project(':cardnetwork') // for Kotlin flow implementation 'androidx.appcompat:appcompat:1.6.1' diff --git a/cardnetwork/build.gradle b/cardnetwork/build.gradle new file mode 100644 index 0000000..8c94233 --- /dev/null +++ b/cardnetwork/build.gradle @@ -0,0 +1,2 @@ +configurations.maybeCreate("default") +artifacts.add("default", file('checkout-sdk-card-network-android.aar')) \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 936c401..df55571 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,3 +13,4 @@ dependencyResolutionManagement { } } include ':cardmanagement' +include ':cardnetwork'