Base set up for chat in_house
This commit is contained in:
1
navi-chat/.gitignore
vendored
Normal file
1
navi-chat/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
70
navi-chat/build.gradle
Normal file
70
navi-chat/build.gradle
Normal file
@@ -0,0 +1,70 @@
|
||||
plugins {
|
||||
id 'com.android.library'
|
||||
id 'kotlin-android'
|
||||
id 'kotlin-kapt'
|
||||
id 'kotlin-android-extensions'
|
||||
id 'dagger.hilt.android.plugin'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 31
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 31
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
buildFeatures {
|
||||
dataBinding true
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.core:core-ktx:1.6.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
testImplementation 'junit:junit:4.+'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
|
||||
// Navi common module
|
||||
implementation project(':navi-common')
|
||||
|
||||
// Hilt
|
||||
implementation 'com.google.dagger:hilt-android:2.38.1'
|
||||
kapt 'com.google.dagger:hilt-compiler:2.38.1'
|
||||
// Hilt for instrumentation tests
|
||||
androidTestImplementation 'com.google.dagger:hilt-android-testing:2.38.1'
|
||||
kaptAndroidTest 'com.google.dagger:hilt-compiler:2.38.1'
|
||||
// Hilt for local unit tests
|
||||
testImplementation 'com.google.dagger:hilt-android-testing:2.38.1'
|
||||
kaptTest 'com.google.dagger:hilt-compiler:2.38.1'
|
||||
|
||||
// Retrofit
|
||||
implementation 'com.squareup.okhttp3:logging-interceptor:4.4.1'
|
||||
implementation "com.squareup.retrofit2:retrofit:2.9.0"
|
||||
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
||||
|
||||
// Fragment
|
||||
implementation 'androidx.fragment:fragment-ktx:1.3.5'
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.navi.chat
|
||||
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
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.getInstrumentation().targetContext
|
||||
assertEquals("com.navi.chat.test", appContext.packageName)
|
||||
}
|
||||
}
|
||||
14
navi-chat/src/main/AndroidManifest.xml
Normal file
14
navi-chat/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.navi.chat">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<application>
|
||||
<activity
|
||||
android:name=".ui.activities.NaviChatActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/BaseThemeStyle" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
16
navi-chat/src/test/java/com/navi/chat/ExampleUnitTest.kt
Normal file
16
navi-chat/src/test/java/com/navi/chat/ExampleUnitTest.kt
Normal file
@@ -0,0 +1,16 @@
|
||||
package com.navi.chat
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user