Skip to content

Commit

Permalink
Initial Commit with Project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushiknsanji committed Jun 16, 2019
0 parents commit 970732a
Show file tree
Hide file tree
Showing 60 changed files with 1,254 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.iml
.gradle
/local.properties
/.idea
.DS_Store
/build
/captures
.externalNativeBuild
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
117 changes: 117 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
plugins {
id 'com.android.application'
//Targeting Android Platform of Kotlin
id 'kotlin-android'
//Kotlin extensions on Android for View Binding, Caching etc.
id 'kotlin-android-extensions'
//Annotation processing tool for Kotlin
id 'kotlin-kapt'
}

android {
compileSdkVersion rootProject.ext.compile_sdk_version

defaultConfig {
applicationId "com.mindorks.kaushiknsanji.instagram.demo"
minSdkVersion rootProject.ext.min_sdk_version
targetSdkVersion rootProject.ext.target_sdk_version
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}

buildTypes {
debug {
buildConfigField("String", "BASE_URL", "\"https://api.projects.bootcamp.mindorks.com/batch/blue/\"")
buildConfigField("String", "API_KEY", "\"BLUE19QVVAPP\"")
}
release {
minifyEnabled true // to apply the proguard
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
buildConfigField("String", "BASE_URL", "\"https://api.projects.bootcamp.mindorks.com/batch/blue/\"")
buildConfigField("String", "API_KEY", "\"BLUE19QVVAPP\"")
}
}

}

dependencies {
// JARs
implementation fileTree(dir: 'libs', include: ['*.jar'])

// Kotlin Standard library
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

// Android Support library
implementation "androidx.appcompat:appcompat:$app_compat_version"

// Multidex
implementation "androidx.multidex:multidex:$multidex_version"

// Constraint Layout library
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

// Material Design
implementation "com.google.android.material:material:$support_library_version"

// RecyclerView
implementation "androidx.recyclerview:recyclerview:$support_library_version"

// CardView
implementation "androidx.cardview:cardview:$support_library_version"

// ViewModel and LiveData
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"

// Lifecycle Annotations
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"

// Dagger
implementation "com.google.dagger:dagger:$dagger_version"
kapt "com.google.dagger:dagger-compiler:$dagger_version"

// Database
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-rxjava2:$room_version"

// Database Debugging
debugImplementation "com.amitshekhar.android:debug-db:$debug_db_version"

// Image
implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version"

// Networking
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"
implementation "com.jakewharton.retrofit:retrofit2-rxjava2-adapter:$retrofit_rxjava_adapter_version"

// Reactive
implementation "io.reactivex.rxjava2:rxjava:$rootProject.rxjava_version"
implementation "io.reactivex.rxjava2:rxandroid:$rootProject.rxandroid_version"

// Logger
implementation "com.jakewharton.timber:timber:$timber_version"

// JSON de/serializer using Gson
implementation "com.google.code.gson:gson:$gson_version"

// Local Unit Tests
testImplementation "junit:junit:$junit_version"
testImplementation "org.mockito:mockito-core:$mockito_version"
testImplementation "android.arch.core:core-testing:$core_testing_version"
testImplementation "org.hamcrest:hamcrest-library:$hamcrest_version"
kaptTest "com.google.dagger:dagger-compiler:$dagger_version"

// UI Tests
androidTestImplementation "androidx.test:runner:$test_runner_version"
androidTestImplementation "androidx.test.ext:junit:$test_ext_runner_version"
androidTestImplementation "androidx.test.espresso:espresso-core:$espresso_version"
androidTestImplementation "androidx.test.espresso:espresso-intents:$espresso_version"
androidTestImplementation "org.mockito:mockito-core:$mockito_version"
kaptAndroidTest "com.google.dagger:dagger-compiler:$dagger_version"
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.mindorks.kaushiknsanji.instagram.demo

import androidx.test.InstrumentationRegistry
import androidx.test.runner.AndroidJUnit4
import org.junit.Assert.assertEquals
import org.junit.Test
import org.junit.runner.RunWith

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
assertEquals("com.mindorks.kaushiknsanji.instagram.demo", appContext.packageName)
}
}
24 changes: 24 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mindorks.kaushiknsanji.instagram.demo">

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".ui.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.mindorks.kaushiknsanji.instagram.demo.ui

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.mindorks.kaushiknsanji.instagram.demo.R

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
}
Binary file added app/src/main/res/drawable-hdpi/instagram_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable-ldpi/instagram_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions app/src/main/res/drawable-v24/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions app/src/main/res/drawable/ic_add_photos_selected.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="22"
android:viewportHeight="22">
<path
android:fillColor="#000000"
android:fillType="evenOdd"
android:pathData="M6.6,0.6L15.4,0.6A6,6 0,0 1,21.4 6.6L21.4,15.4A6,6 0,0 1,15.4 21.4L6.6,21.4A6,6 0,0 1,0.6 15.4L0.6,6.6A6,6 0,0 1,6.6 0.6z"
android:strokeWidth="1.2"
android:strokeColor="#000000" />
<path
android:fillColor="#FFFFFF"
android:fillType="evenOdd"
android:pathData="M5.3957,10.0014C6.6703,10.0014 8.53,10.0014 10.9749,10.0014C10.9749,8.0457 10.9749,6.1729 10.9749,4.383C10.9749,3.868 12.2173,3.8767 12.2173,4.383C12.2173,6.1729 12.2173,8.0457 12.2173,10.0014C15.2266,10.0014 17.1017,10.0014 17.8425,10.0014C18.366,10.0014 18.3747,11.2448 17.8425,11.2448C16.3163,11.2448 14.4413,11.2448 12.2173,11.2448C12.2173,13.1759 12.2173,15.0257 12.2173,16.7942C12.2173,17.2996 10.9749,17.308 10.9749,16.7942C10.9749,15.0257 10.9749,13.1759 10.9749,11.2448C8.53,11.2448 6.6703,11.2448 5.3957,11.2448C4.8636,11.2448 4.8726,10.0014 5.3957,10.0014Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
18 changes: 18 additions & 0 deletions app/src/main/res/drawable/ic_add_photos_unselected.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="22"
android:viewportHeight="23">
<path
android:fillColor="#00000000"
android:fillType="evenOdd"
android:pathData="M6.6,1.1L15.4,1.1A6,6 0,0 1,21.4 7.1L21.4,15.9A6,6 0,0 1,15.4 21.9L6.6,21.9A6,6 0,0 1,0.6 15.9L0.6,7.1A6,6 0,0 1,6.6 1.1z"
android:strokeWidth="1.2"
android:strokeColor="#000000" />
<path
android:fillColor="#000000"
android:fillType="evenOdd"
android:pathData="M5.3957,10.5014C6.6703,10.5014 8.53,10.5014 10.9749,10.5014C10.9749,8.5457 10.9749,6.6729 10.9749,4.883C10.9749,4.368 12.2173,4.3767 12.2173,4.883C12.2173,6.6729 12.2173,8.5457 12.2173,10.5014C15.2266,10.5014 17.1017,10.5014 17.8425,10.5014C18.366,10.5014 18.3747,11.7448 17.8425,11.7448C16.3163,11.7448 14.4413,11.7448 12.2173,11.7448C12.2173,13.6759 12.2173,15.5257 12.2173,17.2942C12.2173,17.7996 10.9749,17.808 10.9749,17.2942C10.9749,15.5257 10.9749,13.6759 10.9749,11.7448C8.53,11.7448 6.6703,11.7448 5.3957,11.7448C4.8636,11.7448 4.8726,10.5014 5.3957,10.5014Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_camera.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="20">
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M21.226,19.0588L2.7736,19.0588C1.244,19.0588 0,17.8085 0,16.2711L0,4.9654C0,3.428 1.244,2.1777 2.7736,2.1777L6.5388,2.1777L6.8684,1.0603C7.0029,0.4488 7.559,0 8.2131,0L15.7869,0C16.4226,0 16.9851,0.4465 17.134,1.0658L17.1428,1.1039L17.4432,2.1776L21.2264,2.1776C22.756,2.1776 24,3.428 24,4.9654L24,16.271C23.9996,17.8085 22.7551,19.0588 21.226,19.0588ZM2.7736,3.107C1.7538,3.107 0.9246,3.9405 0.9246,4.9654L0.9246,16.271C0.9246,17.296 1.7539,18.1295 2.7736,18.1295L21.226,18.1295C22.2458,18.1295 23.075,17.2959 23.075,16.271L23.075,4.9654C23.075,3.9404 22.2457,3.107 21.226,3.107L16.7429,3.107L16.2368,1.2926C16.1901,1.0817 16.001,0.9288 15.7865,0.9288L8.2126,0.9288C7.9949,0.9288 7.81,1.0784 7.7624,1.2931L7.228,3.107L2.7736,3.107ZM12.0005,16.2501C8.7651,16.2501 6.1329,13.605 6.1329,10.3536C6.1329,7.1018 8.765,4.4567 12.0005,4.4567C15.235,4.4567 17.8667,7.1022 17.8667,10.3536C17.8666,13.6046 15.235,16.2501 12.0005,16.2501ZM12.0005,5.3855C9.2749,5.3855 7.0575,7.6138 7.0575,10.3532C7.0575,13.0926 9.275,15.3204 12.0005,15.3204C14.7256,15.3204 16.9422,13.0921 16.9422,10.3532C16.9421,7.6138 14.7251,5.3855 12.0005,5.3855ZM20.6292,4.8316C20.1577,4.8316 19.7763,5.2159 19.7763,5.6889C19.7763,6.1623 20.1576,6.5461 20.6292,6.5461C21.1002,6.5461 21.4816,6.1623 21.4816,5.6889C21.4812,5.2159 21.0997,4.8316 20.6292,4.8316Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_cancel.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="16"
android:viewportHeight="16">
<path
android:fillColor="#9B9B9B"
android:fillType="evenOdd"
android:pathData="M9.9016,8L15.6062,2.2954C16.1313,1.7703 16.1313,0.919 15.6062,0.3939C15.081,-0.1312 14.2297,-0.1312 13.7046,0.3939L8,6.0986L2.2953,0.3938C1.7702,-0.1313 0.9189,-0.1313 0.3938,0.3938C-0.1313,0.919 -0.1313,1.7703 0.3938,2.2954L6.0984,8L0.3938,13.7046C-0.1313,14.2297 -0.1313,15.0811 0.3938,15.6062C0.9189,16.1313 1.7702,16.1313 2.2953,15.6062L8,9.9015L13.7046,15.6062C14.2297,16.1313 15.081,16.1313 15.6062,15.6062C16.1313,15.081 16.1313,14.2297 15.6062,13.7046L9.9016,8Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_close.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#1D1D1B"
android:fillType="evenOdd"
android:pathData="M10.8529,11.9198L0.2299,22.5427C-0.0653,22.8379 -0.0653,23.316 0.2299,23.6111C0.3772,23.7589 0.5707,23.8324 0.7639,23.8324C0.9574,23.8324 1.1505,23.7589 1.2979,23.6111L12.0007,12.9082L22.7036,23.6111C22.8514,23.7589 23.0445,23.8324 23.2376,23.8324C23.4307,23.8324 23.6243,23.7589 23.7716,23.6111C24.0667,23.316 24.0667,22.8379 23.7716,22.5427L13.149,11.9198L23.7787,1.2893C24.0739,0.9941 24.0739,0.516 23.7787,0.2209C23.4836,-0.0739 23.0055,-0.0739 22.7108,0.2209L12.0011,10.9312L1.2904,0.2212C0.9952,-0.0735 0.5175,-0.0735 0.2224,0.2212C-0.0728,0.5164 -0.0728,0.9945 0.2224,1.2896L10.8529,11.9198Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_heart_selected.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="16"
android:viewportHeight="15">
<path
android:fillColor="#F8063F"
android:fillType="evenOdd"
android:pathData="M7.9413,15L7.3801,14.5465C4.0324,11.8421 2.011,10.2115 0.8604,8.0824C0.0133,6.5197 -0.2134,4.9782 0.203,3.6256C0.5524,2.4944 1.3395,1.5829 2.4213,1.0606C2.978,0.7915 3.5824,0.6556 4.2195,0.6556C5.7371,0.6556 7.1657,1.4479 7.9413,2.6762C8.7168,1.4479 10.1471,0.6556 11.663,0.6556C12.3001,0.6556 12.9045,0.7915 13.4604,1.0597C14.543,1.5829 15.3301,2.4944 15.6795,3.6256C16.096,4.9782 15.8683,6.5197 15.0221,8.0824C13.8707,10.2124 11.8474,11.8456 8.4954,14.5518L7.9413,15Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_heart_unselected.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="18"
android:viewportHeight="16">
<path
android:fillColor="#00000000"
android:fillType="evenOdd"
android:pathData="M8.9413,15L8.3801,14.5465C5.0324,11.8421 3.011,10.2115 1.8604,8.0824C1.0133,6.5197 0.7866,4.9782 1.203,3.6256C1.5524,2.4944 2.3395,1.5829 3.4213,1.0606C3.978,0.7915 4.5824,0.6556 5.2195,0.6556C6.7371,0.6556 8.1657,1.4479 8.9413,2.6762C9.7168,1.4479 11.1471,0.6556 12.663,0.6556C13.3001,0.6556 13.9045,0.7915 14.4604,1.0597C15.543,1.5829 16.3301,2.4944 16.6795,3.6256C17.096,4.9782 16.8683,6.5197 16.0221,8.0824C14.8707,10.2124 12.8474,11.8456 9.4954,14.5518L8.9413,15Z"
android:strokeWidth="1"
android:strokeColor="#ADADAD" />
</vector>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_home_selected.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="20"
android:viewportHeight="21">
<path
android:fillColor="#000000"
android:fillType="evenOdd"
android:pathData="M0.8833,9.2743l0,11.7257l7.2133,0l0,-7.2133l4.1219,0l0,7.2133l7.2133,0l0,-11.7257l-9.2743,-9.2743z"
android:strokeWidth="1.2"
android:strokeColor="#000000" />
</vector>
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_home_unselected.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="20"
android:viewportHeight="21">
<path
android:fillColor="#00000000"
android:fillType="evenOdd"
android:pathData="M0.8833,9.2743l0,11.7257l7.2133,0l0,-7.2133l4.1219,0l0,7.2133l7.2133,0l0,-11.7257l-9.2743,-9.2743z"
android:strokeWidth="1.2"
android:strokeColor="#000000" />
</vector>
Loading

0 comments on commit 970732a

Please sign in to comment.