To see the full details on how to integrate the Asgardeo Android SDK, refer to following documentation link.
The full details on the architecture of the Asgardeo Android SDK can be found here.
The Asgardeo Android SDK is developed using Kotlin and is built using the Android SDK. The SDK is developed to be optimized with the MVVM architecture.
- Required versions.
- Android Studio Giraffe (2020.3.1) or later.
- Java 17 or later.
- Clone the repository.
- Open the project in Android Studio, and select the project to open with an
Android view
from the project view selection. - You may require to sync the gradle files again. This can be done using the
Sync project with Gradle files
icon in the top right hand corner of the IDE (or in AppleShift + Command + O
). - Build the project using the following command.
This can also be done using the Gradle side panel in Android Studio.
./gradlew clean build
- Now you can make changes to the SDK. Once you have made the changes, you can build the SDK again using the above command.
- After building the SDK, you can release the SDK to the local Maven repository using the following command.
This will publish the SDK to the local Maven repository. You can find the SDK in the following location.
./gradlew clean assembleRelease ./gradlew publishToMavenLocal
You can also find the SDK in the~/.m2/repository/io/asgardeo/asgardeo-android/<MAIN_VERSION>
External Libraries
section in the project view of Android Studio. - Note the version of the SDK that you have released to the local Maven repository. You can find the version in the
gradle.properties
file in the root of the SDK project, in the variableMAIN_VERSION
.
Caution
When commiting changes to the Github, make sure NOT TO UPDATE the version of the SDK in the gradle.properties
file. This should be updated only when releasing the SDK to the Maven repository using the release Github Action.
You can test the changes by running any Android application and including the SDK as a dependency. But it is recommended to use the sample application provided in wso2/sample-is repository.
- Clone the wso2/sample-is repository.
- Open the
petcare-with-sdk
(/petcare-sample/b2c/mobile-app/petcare-with-sdk) project in Android Studio. - Read this documentation and setup the sample application with the necessary configurations to test your changes.
-
Open the
libs.version.toml
file in the root of the sample application and change the version of the SDK to the version that you have released to the local Maven repository.[versions] ... asgardeoAndroid = "1.0.0-SNAPSHOT" ...
-
Open the
settings.gradle
file in the root of the sample application and includemavenLocal()
in the repositories.pluginManagement { repositories { ... mavenLocal() } } dependencyResolutionManagement { repositories { ... mavenLocal() } }
Tip
There are some reports that the mavenLocal()
repository is not being resolved in the settings.gradle
file. To
resolve this issue, please refer to this StackOverflow thread.
- Build and run the sample application using the above mentioned documentation.
After testing the changes, you can create a pull request to the asgardeo/mobile-ui-sdks repository. For more details about this, refer to the CONTRIBUTING.md file.