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 Oct 26, 2019
1 parent 8239456 commit 145f01a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
20 changes: 18 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,26 @@ def appPropertiesFile = rootProject.file("application.properties")
def appProperties = new Properties()
appProperties.load(new FileInputStream(appPropertiesFile))

// 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 STRING = "String"
def GUARDIAN_API_KEY = "GUARDIAN_API_KEY"
def GUARDIAN_API_KEY_VAL = '"' + appProperties['GUARDIAN_API_KEY_VAL'] + '"'

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

compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.example.kaushiknsanji.novalines"
Expand All @@ -36,14 +50,16 @@ android {
versionName "1.0"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
archivesBaseName = "$applicationId-v$versionName"

// Use the defined API KEY
buildConfigField STRING, GUARDIAN_API_KEY, GUARDIAN_API_KEY_VAL
}
buildTypes {
release {
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
15 changes: 14 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
-->

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

<!-- Permission for access to Internet -->
<uses-permission android:name="android.permission.INTERNET" />
Expand All @@ -29,15 +30,27 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<!-- Main Activity of the App -->
<activity android:name=".NewsActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

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

<!-- Activity for the Settings -->
<activity android:name=".settings.SettingsActivity" />

<!-- Activity that displays info related to the App and its developer -->
<activity android:name=".AboutActivity" />

<!-- Launcher Activity as alias to NewsActivity -->
<activity-alias
android:name=".LauncherActivity"
android:targetActivity=".NewsActivity" />

</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private static String readStream(InputStream urlConnectionInputStream) {
//Reading the response through BufferedReader
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(urlConnectionInputStream));
try {
String readStr = "";
String readStr;
while ((readStr = bufferedReader.readLine()) != null) {
//When Not Null, appending the line read to the Builder
responseBuilder.append(readStr);
Expand Down

0 comments on commit 145f01a

Please sign in to comment.