Skip to content

Commit

Permalink
chore: Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushiknsanji committed Nov 14, 2019
1 parent 47df67d commit e8f6bcd
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 10 deletions.
20 changes: 18 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@

apply plugin: 'com.android.application'

// Load the details for signing the APK
def keystorePropertiesFile = rootProject.file("keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
//Constants defined for use with buildConfigField
def BOOLEAN = "boolean"
Expand All @@ -24,6 +29,15 @@ android {
def LOG_CURSOR_QUERIES = "LOG_CURSOR_QUERIES"
def LOG_STETHO = "LOG_STETHO"

signingConfigs {
release {
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}

compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.example.kaushiknsanji.storeapp"
Expand All @@ -33,6 +47,7 @@ android {
versionName "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
archivesBaseName = "$applicationId-v$versionName"
}

buildTypes {
Expand All @@ -49,8 +64,9 @@ android {
//Disable Stetho logging in Debug
buildConfigField BOOLEAN, LOG_STETHO, FALSE

minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

Expand Down
22 changes: 14 additions & 8 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@

<manifest xmlns:android="http:https://schemas.android.com/apk/res/android"
xmlns:tools="http:https://schemas.android.com/tools"
package="com.example.kaushiknsanji.storeapp">
package="com.example.kaushiknsanji.storeapp"
android:installLocation="auto">

<!-- Uses Camera to take pictures of the Products -->
<uses-feature
Expand Down Expand Up @@ -60,13 +61,7 @@
<!-- The Main Activity that displays all the Products, Suppliers and the Sales information -->
<activity
android:name=".ui.MainActivity"
android:theme="@style/AppTheme.Main">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
android:theme="@style/AppTheme.Main" />

<!-- The Product Config Activity that allows to register a Product into the catalog -->
<activity
Expand Down Expand Up @@ -122,6 +117,17 @@
android:name=".ui.about.AboutActivity"
android:theme="@style/AppTheme" />

<!-- Launcher Activity as alias to the Main Activity -->
<activity-alias
android:name=".LauncherActivity"
android:targetActivity=".ui.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>

<!-- Preloaded Fonts used in the App -->
<meta-data
android:name="preloaded_fonts"
Expand Down

0 comments on commit e8f6bcd

Please sign in to comment.