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

1.4. Clone and import module

kalemontes edited this page Mar 3, 2016 · 1 revision

Create the project

Create a new AndroidStudio Project and follow the default wizzard.

AndroidStudio New Project AndroidStudio Wizard Target Devices AndroidStudio Wizard Start Activity

You should have the following project structure

AndroidStudio Wizard Project

Clone

Clone the repo down to your computer

Git Clone

The cloned repo not only contains the library module but the sample project also.

Repo Directory Structure showing library module and the sample project

Set project modules

To preserve the .git directory and keep track of the changed you've made to the library (if you want to contribute or you forked the repo), move the whole cloned repo (the directory containing the library module and sample project) to your project location.

Project Directory Structure showing the moved repo

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

AndroidStudio Module Settings

Use the import gradle project to add the library module from the cloned repo to your project

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

Click "Finish" and Wait for gradle sync

Your settings.gradle should look like

include ':openidconnect-android-client', ':app'
project(':openidconnect-android-client').projectDir = new File('OIDCAndroidLib/openidconnect-android-client')