Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Setting up the sample project

kalemontes edited this page Nov 13, 2015 · 3 revisions

Clone

Start by cloning the repo down to your computer

Git Clone

Set Up

Create the project

Create a new AndroidStudio Project and follow the default wizzard.

AndroidStudio New Project AndroidStudio Wizard Target Devices AndroidStudio Wizard Start Activity

Set project modules

I think that the easiest way to set the modules is by moving the cloned repo to the project location. You can also start by creating the project then cloning directly to the project location.

Project Directory Structure showing the moved repo

Next, open the project modules settings from the contextual menu or using the Ctrl + Alt + Maj + S shortcut.

AndroidStudio Module Settings

Remove de default app module as we only want the project container settings.

AndroidStudio Project Structure Properties

Now we need to import modules from the cloned repo to the current project

<img src="https://github.com/kalemontes/OIDCAndroidLib/wiki/images/SetUpSample6.PNG" alt=AndroidStudio Wizard New Module" width="600px"/> AndroidStudio Wizard New Module

Repeat these steps for the oidlib-sample mobule

Check the oidclib dependencie on the oidlib-sample module

AndroidStudio Project Structure Dependencies

Click "OK" and Wait for gradle sync

Your settings.gradle should look like

Generated settings.gradle file

Build

Build and Run, you are ready to go!

OidcAndroidLib Sample Screeshot

Clean Up

You can safely delete the app directory that was left when removing module from the project as AndroidStudio doesn't delete it for safety.

Project dir explorer

Also you can remove the run configuration that was also left when removing module from the project by opening the "Edit Configurations" menu.

AndroidStudio Edit Configurations AndroidStudio Edit Configurations