Skip to content

2. Building

Kenny Campagna edited this page May 4, 2016 · 2 revisions

Once you have received your Api keys detailed here you can start to build Opengur.

Android Studio is used for Opengur, Eclipse or other IDEs are not supported and there are no plans to support them. To import Opengur into Android Studio, first clone the repository to your local computer. Select import project from the Quick Start screen. If it prompts you to use the gradle wrapper for the project, select OK.

Once the project is imported and setup correctly, you will need configure the project to use your Api keys. You can either create a gradle.properties file in the root directory and store the keys there

##gradle.properties

API_CLIENT_ID = "YOUR CLIENT ID"
API_CLIENT_SECRET ="YOUR CLIENT SECRET"
FABRIC_KEY= YOUR FABRIC KEY

or you can hard code them in the project in either the build.gradle file ##build.gradle

buildConfigField "String", "API_CLIENT_ID", "YOUR CLIENT ID"
buildConfigField "String", "API_CLIENT_SECRET", "YOUR CLIENT SECRET"
...
...
...
manifestPlaceholders = [fabric_key: YOUR FABRIC KEY]

or in the ApiClient.java file ##ApiClient.java

public static final String CLIENT_ID = "YOUR CLIENT ID";
public static final String CLIENT_SECRET = "YOUR CLIENT SECRET";

If you are not providing a key for Fabric, then you can use a pair of empty quotes for its key in the build.gradle file as done in the debug buildType

manifestPlaceholders = [fabric_key: ""]

Or you can select the f_droid product flavor which does not include Fabric.

Clone this wiki locally