From 2a8a205f7b52ea3fd08b5350dabcd692325bce7a Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 09:18:19 +0530 Subject: [PATCH 01/17] build: add PR builder for the project --- .github/workflows/pr-builder.yml | 85 +++++++++++++++++++ .../scripts/android/android_sdk_build.sh | 77 +++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 .github/workflows/pr-builder.yml create mode 100644 .github/workflows/scripts/android/android_sdk_build.sh diff --git a/.github/workflows/pr-builder.yml b/.github/workflows/pr-builder.yml new file mode 100644 index 0000000..6b91fbd --- /dev/null +++ b/.github/workflows/pr-builder.yml @@ -0,0 +1,85 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +# This workflow will run the build for PRs to check for any build related issues. + +name: 👷 PR Builder + +on: + pull_request: + types: [ opened, synchronize, labeled ] + branches: [ main ] + paths-ignore: + - "**/*.md" + - "**/LICENSE" + +concurrency: + group: pr-builder-${{ github.ref }} + cancel-in-progress: true + +env: + GH_TOKEN: ${{ secrets.RELEASE_BOT_TOKEN }} + +jobs: + check_for_android_changes: + name: 🤖 🔄 Check for Android Changes + runs-on: ubuntu-latest + outputs: + android_changed: ${{ steps.validate_android_changes.outputs.android_changed }} + steps: + - name: ⬇️ Checkout + id: checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + # token: ${{ env.GH_TOKEN }} + + - name: ✅ Validate Android Changes + id: validate_android_changes + run: | + echo "Checking for Android changes" + android_changed=false + if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -q "android"; then + android_changed=true + fi + echo "android_changed=${android_changed}" >> $GITHUB_OUTPUT + + asgardeo-android-sdk-builder: + name: 🤖 🚧 Asgardeo Android SDK Builder + needs: check_for_android_changes + if: needs.check_for_android_changes.outputs.android_changed == 'true' + runs-on: ubuntu-latest + steps: + - name: ⬇️ Checkout + id: checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + # token: ${{ env.GH_TOKEN }} + + - name: ☕️ Set up Adopt JDK 17 + uses: actions/setup-java@v3 + with: + java-version: "17" + distribution: "adopt" + + - name: 🚧 Build Asgardeo Android SDK + working-directory: .github/workflows/scripts/android + run: bash ./android_sdk_build.sh diff --git a/.github/workflows/scripts/android/android_sdk_build.sh b/.github/workflows/scripts/android/android_sdk_build.sh new file mode 100644 index 0000000..8c01b98 --- /dev/null +++ b/.github/workflows/scripts/android/android_sdk_build.sh @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------------- +# +# Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). +# +# WSO2 LLC. licenses this file to you under the Apache License, +# Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +# -------------------------------------------------------------------------------------- + +#!/bin/bash + +# Go to android sdk directory +go_to_android_sdk_dir() { + cd ../../../../android +} + +# Function to regenerate Gradle wrapper +regenerate_gradle_wrapper() { + echo + ./gradlew wrapper +} + +# Function to check Gradle wrapper +check_gradle_wrapper() { + echo + if [ ! -f "./gradlew" ]; then + echo "Gradle wrapper (./gradlew) not found. Please regenerate using './gradlew wrapper'" + exit 1 + fi + + echo "Gradle Wrapper - OK" + + if [ ! -f "./gradlew.bat" ]; then + echo "Gradle wrapper (./gradlew.bat) not found. Please regenerate using './gradlew wrapper'" + exit 1 + fi + + echo "Gradle Wrapper (Windows) - OK" + + ./gradlew --version + if [ $? -ne 0 ]; then + echo "Error: Gradle wrapper execution failed. Please check Gradle installation and configuration." + exit 1 + fi + echo "Gradle Wrapper - OK" +} + +# Function to build with Gradle +gradle_build() { + echo + ./gradlew clean build +} + +# run gradle tasks to build Android SDKs +build_android_sdks() { + # Go to android sdk directory + go_to_android_sdk_dir + + # Functions to release Android SDKs + regenerate_gradle_wrapper + check_gradle_wrapper + gradle_build +} + +# Call the functions in sequence +build_android_sdks From 7838bd20f50d830116bba4734252d1ebe073935e Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 13:28:43 +0530 Subject: [PATCH 02/17] Update README.md --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 70fc470..7303e93 100644 --- a/docs/README.md +++ b/docs/README.md @@ -8,7 +8,7 @@ Setup development environment for the Documentation Site for Mobile UI SDKs for - Node.js version 18 or higher. - Text Editor with Markdown syntax support. - - VSCode is recommended. + - VSCode is recommended ## File Structure From d9bafb5f3826d4a6d0042a93a741e90df9588ee7 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 13:29:47 +0530 Subject: [PATCH 03/17] Update README.md --- android/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/README.md b/android/README.md index 9c0d55e..6869311 100644 --- a/android/README.md +++ b/android/README.md @@ -18,7 +18,7 @@ # Asgardeo Android SDK -To see the full details on how to integrate the Asgardeo Android SDK, refer to following documentation link. +To see the full details on how to integrate the Asgardeo Android SDK, refer to following documentation link ## Architecture of the Asgardeo Android SDK From 23ac67b65fb90c07eb87b78ed50d5cd94dbb30a8 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 13:50:57 +0530 Subject: [PATCH 04/17] Update README.md --- android/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/README.md b/android/README.md index 6869311..113ead5 100644 --- a/android/README.md +++ b/android/README.md @@ -18,7 +18,7 @@ # Asgardeo Android SDK -To see the full details on how to integrate the Asgardeo Android SDK, refer to following documentation link +To see the full details on how to integrate the Asgardeo Android SDK, refer to following documentation link.. ## Architecture of the Asgardeo Android SDK From a38df0a3e99267616c166c88308b4ca313c5f1a7 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 13:54:42 +0530 Subject: [PATCH 05/17] Update README.md --- android/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/README.md b/android/README.md index 113ead5..4ec7e48 100644 --- a/android/README.md +++ b/android/README.md @@ -18,7 +18,7 @@ # Asgardeo Android SDK -To see the full details on how to integrate the Asgardeo Android SDK, refer to following documentation link.. +To see the full details on how to integrate the Asgardeo Android SDK, refer to following documentation link... ## Architecture of the Asgardeo Android SDK From b390134b0b9026ee83d0c2505ce88a8fba3a2323 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 13:56:50 +0530 Subject: [PATCH 06/17] Update README.md --- android/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/README.md b/android/README.md index 4ec7e48..113ead5 100644 --- a/android/README.md +++ b/android/README.md @@ -18,7 +18,7 @@ # Asgardeo Android SDK -To see the full details on how to integrate the Asgardeo Android SDK, refer to following documentation link... +To see the full details on how to integrate the Asgardeo Android SDK, refer to following documentation link.. ## Architecture of the Asgardeo Android SDK From 396a4c01215096c6c59696e30aaae305e34201f9 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 14:02:54 +0530 Subject: [PATCH 07/17] Update README.md --- android/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/README.md b/android/README.md index 113ead5..4ec7e48 100644 --- a/android/README.md +++ b/android/README.md @@ -18,7 +18,7 @@ # Asgardeo Android SDK -To see the full details on how to integrate the Asgardeo Android SDK, refer to following documentation link.. +To see the full details on how to integrate the Asgardeo Android SDK, refer to following documentation link... ## Architecture of the Asgardeo Android SDK From 0225a732f65e152e2708d66cc739c12f02a3f6da Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 14:08:04 +0530 Subject: [PATCH 08/17] Update index.md --- docs/website/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/website/index.md b/docs/website/index.md index 8b05e45..2df379b 100644 --- a/docs/website/index.md +++ b/docs/website/index.md @@ -20,7 +20,7 @@ layout: home hero: name: "Mobile SDKs for Asgardeo" - tagline: "Welcome to our comprehensive documentation site for Mobile SDKs for Asgardeo! \nHere, you'll find everything you need to seamlessly integrate Asgardeo's authentication and identity management solutions into your mobile applications." + tagline: "Welcome to our comprehensive documentation site for Mobile SDKs for Asgardeo! \nHere, you'll find everything you need to seamlessly integrate Asgardeo's authentication and identity management solutions into your mobile applications..." image: dark: /phone.svg light: /phone_white.svg From e96d26e3dd5eaeda8bad425dd7198c1ead138096 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 14:12:23 +0530 Subject: [PATCH 09/17] Update index.md --- docs/website/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/website/index.md b/docs/website/index.md index 2df379b..a63b27d 100644 --- a/docs/website/index.md +++ b/docs/website/index.md @@ -20,7 +20,7 @@ layout: home hero: name: "Mobile SDKs for Asgardeo" - tagline: "Welcome to our comprehensive documentation site for Mobile SDKs for Asgardeo! \nHere, you'll find everything you need to seamlessly integrate Asgardeo's authentication and identity management solutions into your mobile applications..." + tagline: "Welcome to our comprehensive documentation site for Mobile SDKs for Asgardeo! \nHere, you'll find everything you need to seamlessly integrate Asgardeo's authentication and identity management solutions into your mobile applications.." image: dark: /phone.svg light: /phone_white.svg From 06de309dd98b815b8420ebd9bb2b045220fea818 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 14:19:08 +0530 Subject: [PATCH 10/17] Update settings.gradle.kts --- android/settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index 85efd63..40c68bf 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -13,7 +13,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License. + * under the License... */ pluginManagement { From fffc7efa95a28b3e0fb887d91dec6ed074431068 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 14:21:35 +0530 Subject: [PATCH 11/17] Update settings.gradle.kts --- android/settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index 40c68bf..e8e6c24 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -13,7 +13,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License... + * under the License.. */ pluginManagement { From 13a51415ea2ff82865b588051e8d19a0e98234ac Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 14:25:21 +0530 Subject: [PATCH 12/17] Update settings.gradle.kts --- android/settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index e8e6c24..40c68bf 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -13,7 +13,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License.. + * under the License... */ pluginManagement { From f5c7f6b121559d616b57e48b4796c1b3294834d9 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 14:31:27 +0530 Subject: [PATCH 13/17] Update settings.gradle.kts --- android/settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index 40c68bf..e8e6c24 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -13,7 +13,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License... + * under the License.. */ pluginManagement { From 889a3e5558da0072201d89b22eb432086845cd98 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 14:34:45 +0530 Subject: [PATCH 14/17] Update settings.gradle.kts --- android/settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index e8e6c24..40c68bf 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -13,7 +13,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License.. + * under the License... */ pluginManagement { From 36c9a76c6ba800674766b4ecbb3d69fb639423c7 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 14:36:43 +0530 Subject: [PATCH 15/17] Update settings.gradle.kts --- android/settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index 40c68bf..e8e6c24 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -13,7 +13,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License... + * under the License.. */ pluginManagement { From b2250481302879a3e3a9ff4b4e151ead5bceec31 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 14:39:54 +0530 Subject: [PATCH 16/17] Update settings.gradle.kts --- android/settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index e8e6c24..40c68bf 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -13,7 +13,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License.. + * under the License... */ pluginManagement { From 253a5ab39a9d4b23b480d1b8ce9fe2f10ae2cd65 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 20 Aug 2024 14:49:51 +0530 Subject: [PATCH 17/17] Update settings.gradle.kts --- android/settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts index 40c68bf..e8e6c24 100644 --- a/android/settings.gradle.kts +++ b/android/settings.gradle.kts @@ -13,7 +13,7 @@ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations - * under the License... + * under the License.. */ pluginManagement {