Skip to content

Commit 6a8e1d6

Browse files
Initial commit
0 parents  commit 6a8e1d6

31 files changed

+653
-0
lines changed

Diff for: .gitignore

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Built application files
2+
*.apk
3+
*.ap_
4+
*.aab
5+
6+
# Files for the ART/Dalvik VM
7+
*.dex
8+
9+
# Java class files
10+
*.class
11+
12+
# Generated files
13+
bin/
14+
gen/
15+
out/
16+
release/
17+
18+
# Gradle files
19+
.gradle/
20+
build/
21+
22+
# Local configuration file (sdk path, etc)
23+
local.properties
24+
25+
# Proguard folder generated by Eclipse
26+
proguard/
27+
28+
# Log Files
29+
*.log
30+
31+
# Android Studio Navigation editor temp files
32+
.navigation/
33+
34+
# Android Studio captures folder
35+
captures/
36+
37+
# IntelliJ
38+
*.iml
39+
.idea
40+
41+
# Android Studio 3 in .gitignore file.
42+
.idea/caches
43+
.idea/modules.xml
44+
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
45+
.idea/navEditor.xml
46+
47+
# Keystore files
48+
# Uncomment the following lines if you do not want to check your keystore files in.
49+
#*.jks
50+
#*.keystore
51+
52+
# External native build folder generated in Android Studio 2.2 and later
53+
.externalNativeBuild
54+
55+
# Google Services (e.g. APIs or Firebase)
56+
# google-services.json
57+
58+
# Freeline
59+
freeline.py
60+
freeline/
61+
freeline_project_description.json
62+
63+
# fastlane
64+
fastlane/report.xml
65+
fastlane/Preview.html
66+
fastlane/screenshots
67+
fastlane/test_output
68+
fastlane/readme.md
69+
70+
# Version control
71+
vcs.xml
72+
73+
# lint
74+
lint/intermediates/
75+
lint/generated/
76+
lint/outputs/
77+
lint/tmp/
78+
# lint/reports/

Diff for: app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

Diff for: app/build.gradle

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
apply plugin: 'com.android.application'
2+
3+
apply plugin: 'kotlin-android'
4+
5+
apply plugin: 'kotlin-android-extensions'
6+
7+
android {
8+
compileSdkVersion 28
9+
defaultConfig {
10+
applicationId "com.ankur.popularmovies"
11+
minSdkVersion 15
12+
targetSdkVersion 28
13+
versionCode 1
14+
versionName "1.0"
15+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
16+
}
17+
18+
// Strictly to be used for Android @Parcelize annotation only.
19+
androidExtensions {
20+
experimental = true
21+
}
22+
23+
buildTypes {
24+
release {
25+
minifyEnabled false
26+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
27+
}
28+
}
29+
}
30+
31+
dependencies {
32+
implementation fileTree(dir: 'libs', include: ['*.jar'])
33+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
34+
implementation 'androidx.appcompat:appcompat:1.0.2'
35+
implementation 'androidx.core:core-ktx:1.0.2'
36+
37+
// RxJava
38+
implementation 'io.reactivex.rxjava2:rxkotlin:2.3.0'
39+
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
40+
41+
// Google Truth
42+
testImplementation "com.google.truth:truth:0.44"
43+
44+
// Mockito for Kotlin
45+
testImplementation "com.nhaarman.mockitokotlin2:mockito-kotlin:2.1.0"
46+
47+
testImplementation 'junit:junit:4.12'
48+
49+
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
50+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
51+
}

Diff for: app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.ankur.popularmovies
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("com.ankur.popularmovies", appContext.packageName)
23+
}
24+
}

Diff for: app/src/main/AndroidManifest.xml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.ankur.popularmovies">
3+
4+
<application android:allowBackup="true"
5+
android:label="@string/app_name"
6+
android:icon="@mipmap/ic_launcher"
7+
android:roundIcon="@mipmap/ic_launcher_round"
8+
android:supportsRtl="true"
9+
android:theme="@style/AppTheme"/>
10+
</manifest>
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:aapt="http://schemas.android.com/aapt"
3+
android:width="108dp"
4+
android:height="108dp"
5+
android:viewportHeight="108"
6+
android:viewportWidth="108">
7+
<path
8+
android:fillType="evenOdd"
9+
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"
10+
android:strokeColor="#00000000"
11+
android:strokeWidth="1">
12+
<aapt:attr name="android:fillColor">
13+
<gradient
14+
android:endX="78.5885"
15+
android:endY="90.9159"
16+
android:startX="48.7653"
17+
android:startY="61.0927"
18+
android:type="linear">
19+
<item
20+
android:color="#44000000"
21+
android:offset="0.0"/>
22+
<item
23+
android:color="#00000000"
24+
android:offset="1.0"/>
25+
</gradient>
26+
</aapt:attr>
27+
</path>
28+
<path
29+
android:fillColor="#FFFFFF"
30+
android:fillType="nonZero"
31+
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"
32+
android:strokeColor="#00000000"
33+
android:strokeWidth="1"/>
34+
</vector>

Diff for: app/src/main/res/drawable/ic_launcher_background.xml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:height="108dp"
5+
android:width="108dp"
6+
android:viewportHeight="108"
7+
android:viewportWidth="108">
8+
<path android:fillColor="#008577"
9+
android:pathData="M0,0h108v108h-108z"/>
10+
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
11+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
12+
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
13+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
14+
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
15+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
16+
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
17+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
18+
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
19+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
20+
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
21+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
22+
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
23+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
24+
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
25+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
26+
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
27+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
28+
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
29+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
30+
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
31+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
32+
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
33+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
34+
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
35+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
36+
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
37+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
38+
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
39+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
40+
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
41+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
42+
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
43+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
44+
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
45+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
46+
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
47+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
48+
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
49+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
50+
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
51+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
52+
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
53+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
54+
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
55+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
56+
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
57+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
58+
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
59+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
60+
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
61+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
62+
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
63+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
64+
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
65+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
66+
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
67+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
68+
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
69+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
70+
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
71+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
72+
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
73+
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
74+
</vector>

Diff for: app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@drawable/ic_launcher_background"/>
4+
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
5+
</adaptive-icon>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3+
<background android:drawable="@drawable/ic_launcher_background"/>
4+
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
5+
</adaptive-icon>

Diff for: app/src/main/res/mipmap-hdpi/ic_launcher.png

2.89 KB
Loading

Diff for: app/src/main/res/mipmap-hdpi/ic_launcher_round.png

4.79 KB
Loading

Diff for: app/src/main/res/mipmap-mdpi/ic_launcher.png

2.01 KB
Loading

Diff for: app/src/main/res/mipmap-mdpi/ic_launcher_round.png

2.72 KB
Loading

Diff for: app/src/main/res/mipmap-xhdpi/ic_launcher.png

4.38 KB
Loading

Diff for: app/src/main/res/mipmap-xhdpi/ic_launcher_round.png

6.73 KB
Loading

Diff for: app/src/main/res/mipmap-xxhdpi/ic_launcher.png

6.24 KB
Loading

Diff for: app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png

10.2 KB
Loading

Diff for: app/src/main/res/mipmap-xxxhdpi/ic_launcher.png

8.91 KB
Loading
14.8 KB
Loading

Diff for: app/src/main/res/values/colors.xml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="colorPrimary">#008577</color>
4+
<color name="colorPrimaryDark">#00574B</color>
5+
<color name="colorAccent">#D81B60</color>
6+
</resources>

Diff for: app/src/main/res/values/strings.xml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">PopularMovies</string>
3+
</resources>

Diff for: app/src/main/res/values/styles.xml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<resources>
2+
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5+
<!-- Customize your theme here. -->
6+
<item name="colorPrimary">@color/colorPrimary</item>
7+
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
8+
<item name="colorAccent">@color/colorAccent</item>
9+
</style>
10+
11+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.ankur.popularmovies
2+
3+
import org.junit.Test
4+
5+
import org.junit.Assert.*
6+
7+
/**
8+
* Example local unit test, which will execute on the development machine (host).
9+
*
10+
* See [testing documentation](http://d.android.com/tools/testing).
11+
*/
12+
class ExampleUnitTest {
13+
@Test
14+
fun addition_isCorrect() {
15+
assertEquals(4, 2 + 2)
16+
}
17+
}

Diff for: build.gradle

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
3+
buildscript {
4+
ext.kotlin_version = '1.3.31'
5+
repositories {
6+
google()
7+
jcenter()
8+
9+
}
10+
dependencies {
11+
classpath 'com.android.tools.build:gradle:3.5.0-beta04'
12+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13+
// NOTE: Do not place your application dependencies here; they belong
14+
// in the individual module build.gradle files
15+
}
16+
}
17+
18+
allprojects {
19+
repositories {
20+
google()
21+
jcenter()
22+
23+
}
24+
}
25+
26+
task clean(type: Delete) {
27+
delete rootProject.buildDir
28+
}

0 commit comments

Comments
 (0)