Skip to content

Commit a42ee30

Browse files
committed
init
0 parents  commit a42ee30

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1344
-0
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
.idea/sonarlint/

.idea/codeStyles/Project.xml

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Напишите приложение:
2+
- авторизация через сервисы: Вк, Google, Facebook (на выбор)
3+
- после авторизации, необходимо отобразить профиль пользователя в левом меню(фото + имя/логин)
4+
- дать возможность сменить учетную запись
5+
- на основном экране(после авторизации пользователя) реализовать поиск пользователей Github(через open API). Что отобразить по каждому пользователю - на Ваш выбор
6+
- список должен поддерживать пагинацию по 30 элементов на странице (как лента В Контакте)
7+
- при вводе в строку поиска, сделать задержку отправки запросов в 600 миллисекунд
8+
9+
P.S. БЕЗ Mosby/Moxy
10+
Стек технологий: Kotlin, RxJava, Retrofit, Picasso
11+
Пожелания: по возможности, продемонстрируйте знания архитектуры приложений, использования паттернов проектирования информационных систем, написания тестов

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
apply plugin: 'com.android.application'
2+
3+
apply plugin: 'kotlin-android'
4+
5+
apply plugin: 'kotlin-android-extensions'
6+
apply plugin: 'kotlin-kapt'
7+
8+
9+
android {
10+
compileSdkVersion 29
11+
buildToolsVersion "29.0.3"
12+
defaultConfig {
13+
applicationId "ru.jacobkant.githubapp"
14+
minSdkVersion 21
15+
targetSdkVersion 29
16+
versionCode 1
17+
versionName "1.0"
18+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
19+
}
20+
buildTypes {
21+
release {
22+
minifyEnabled false
23+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
24+
}
25+
}
26+
compileOptions {
27+
targetCompatibility = JavaVersion.VERSION_1_8
28+
sourceCompatibility = JavaVersion.VERSION_1_8
29+
}
30+
}
31+
32+
dependencies {
33+
implementation fileTree(dir: 'libs', include: ['*.jar'])
34+
implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
35+
implementation 'androidx.appcompat:appcompat:1.1.0'
36+
implementation 'androidx.core:core-ktx:1.2.0'
37+
implementation 'com.google.android.material:material:1.1.0'
38+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
39+
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
40+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
41+
42+
43+
implementation 'io.reactivex.rxjava2:rxkotlin:2.4.0'
44+
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
45+
implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
46+
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.7.1'
47+
implementation 'com.google.code.gson:gson:2.8.6'
48+
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
49+
implementation 'com.facebook.stetho:stetho:1.5.1'
50+
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.1'
51+
implementation 'com.squareup.picasso:picasso:2.71828'
52+
53+
54+
implementation 'com.google.dagger:dagger:2.25.4'
55+
kapt 'com.google.dagger:dagger-compiler:2.25.4'
56+
57+
implementation 'com.vk:androidsdk:2.1.1'
58+
59+
testImplementation 'junit:junit:4.12'
60+
61+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
62+
androidTestImplementation 'androidx.test:runner:1.1.0'
63+
androidTestImplementation 'androidx.test:rules:1.1.0'
64+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
65+
}

app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
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
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package ru.jacobkant.githubapp
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("ru.jacobkant.githubapp", appContext.packageName)
23+
}
24+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package ru.jacobkant.githubapp.ui.main
2+
3+
import androidx.test.espresso.Espresso.onView
4+
import androidx.test.espresso.assertion.ViewAssertions.matches
5+
import androidx.test.espresso.matcher.ViewMatchers.*
6+
import androidx.test.ext.junit.runners.AndroidJUnit4
7+
import androidx.test.rule.ActivityTestRule
8+
import org.junit.Before
9+
import org.junit.Rule
10+
import org.junit.Test
11+
import org.junit.runner.RunWith
12+
import ru.jacobkant.githubapp.MainActivity
13+
import ru.jacobkant.githubapp.R
14+
15+
@RunWith(AndroidJUnit4::class)
16+
class MainFragmentTest {
17+
18+
@get:Rule
19+
val activityRule: ActivityTestRule<MainActivity> =
20+
ActivityTestRule(MainActivity::class.java, true, true)
21+
22+
@Before
23+
fun before() {
24+
activityRule.activity.supportFragmentManager.beginTransaction()
25+
.replace(R.id.container, MainFragment())
26+
.commitAllowingStateLoss()
27+
}
28+
29+
@Test
30+
fun test_initial_view_state() {
31+
onView(withId(R.id.main_fragment_login_button))
32+
.check(matches(isDisplayed()))
33+
.check(matches(isClickable()))
34+
.check(matches(isEnabled()))
35+
}
36+
37+
}

app/src/main/AndroidManifest.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="ru.jacobkant.githubapp">
4+
<uses-permission android:name="android.permission.INTERNET"/>
5+
6+
<application
7+
android:name=".App"
8+
android:allowBackup="true"
9+
android:icon="@mipmap/ic_launcher"
10+
android:label="@string/app_name"
11+
android:roundIcon="@mipmap/ic_launcher_round"
12+
android:supportsRtl="true"
13+
android:theme="@style/AppTheme">
14+
<activity android:name=".MainActivity">
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
18+
<category android:name="android.intent.category.LAUNCHER" />
19+
</intent-filter>
20+
</activity>
21+
22+
</application>
23+
24+
</manifest>

0 commit comments

Comments
 (0)