Skip to content

Commit

Permalink
[D83T-1] Project Init
Browse files Browse the repository at this point in the history
  • Loading branch information
YHKOO95 committed Feb 8, 2023
1 parent 20263c1 commit 7ece615
Show file tree
Hide file tree
Showing 85 changed files with 1,856 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
buildscript {
dependencies {
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.6'
}
}

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.4.0' apply false
id 'com.android.library' version '7.4.0' apply false
id 'org.jetbrains.kotlin.android' version '1.7.21' apply false
id 'org.jetbrains.kotlin.jvm' version '1.7.21' apply false
id 'com.google.dagger.hilt.android' version '2.44' apply false
}

task clean(type: Delete) {
delete rootProject.buildDir
}
1 change: 1 addition & 0 deletions data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
116 changes: 116 additions & 0 deletions data/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
id 'kotlin-parcelize'
id 'dagger.hilt.android.plugin'
}

android {
namespace 'com.d83t.bpm.data'
compileSdk 33

defaultConfig {
minSdk 28
targetSdk 33

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

kapt {
javacOptions {
option("-Adagger.fastInit=ENABLED")
option("-Adagger.hilt.android.internal.disableAndroidSuperclassValidation=true")
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
implementation project(path: ':domain')

implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.8.0'

//kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.7.21"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"

//android
implementation "androidx.core:core-ktx:1.9.0"
implementation "androidx.appcompat:appcompat:1.6.0"
implementation "androidx.navigation:navigation-fragment:2.5.3"
implementation "androidx.fragment:fragment-ktx:1.5.5"
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

//databinding
implementation "androidx.databinding:databinding-ktx:7.4.1"
implementation 'com.google.firebase:firebase-config-ktx:21.2.1'

//lifecycle
def lifecycle_version = "2.5.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:${lifecycle_version}"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:${lifecycle_version}"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:${lifecycle_version}"
implementation "androidx.lifecycle:lifecycle-common:${lifecycle_version}"
//implementation "androidx.lifecycle:lifecycle-extensions:${lifecycle_version}"

//hilt
def hilt_version = "2.44"
implementation "com.google.dagger:hilt-android:${hilt_version}"
kapt "com.google.dagger:hilt-android-compiler:${hilt_version}"

//material
implementation "com.google.android.material:material:1.8.0"

//retrofit
def RETROFIT = "2.9.0"
implementation "com.squareup.retrofit2:retrofit:${RETROFIT}"
implementation "com.squareup.retrofit2:converter-gson:${RETROFIT}"

//okhttp
def OKHTTP = "5.0.0-alpha.2"
implementation "com.squareup.okhttp3:okhttp:${OKHTTP}"
implementation "com.squareup.okhttp3:logging-interceptor:${OKHTTP}"
implementation "com.squareup.okhttp3:okhttp-urlconnection:${OKHTTP}"

//glide
def GLIDE = "4.11.0"
implementation "com.github.bumptech.glide:glide:${GLIDE}"
implementation "com.github.bumptech.glide:okhttp3-integration:${GLIDE}"
kapt "com.github.bumptech.glide:compiler:${GLIDE}"

//unit test
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

//tedpermission
implementation 'io.github.ParkSangGwon:tedpermission-coroutine:3.3.0'

//timber log
implementation 'com.jakewharton.timber:timber:5.0.1'

//opensource
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
}
Empty file added data/consumer-rules.pro
Empty file.
21 changes: 21 additions & 0 deletions data/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,24 @@
package com.d83t.presentation.data

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* 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.d83t.bpm.data.test", appContext.packageName)
}
}
5 changes: 5 additions & 0 deletions data/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.d83t.bpm.data">

</manifest>
5 changes: 5 additions & 0 deletions data/src/main/java/com/d83t/bpm/data/base/BaseResponse.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.d83t.bpm.data.base

import android.os.Parcelable

interface BaseResponse : Parcelable
8 changes: 8 additions & 0 deletions data/src/main/java/com/d83t/bpm/data/mapper/DataMapper.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.d83t.bpm.data.mapper

import com.d83t.bpm.data.base.BaseResponse
import com.d83t.bpm.domain.base.BaseModel

interface DataMapper<in R : BaseResponse, out D : BaseModel> {
fun R.toDataModel(): D
}
5 changes: 5 additions & 0 deletions data/src/main/java/com/d83t/bpm/data/network/MainApi.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.d83t.bpm.data.network

interface MainApi {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.d83t.bpm.data.repositoryImpl

import com.d83t.bpm.domain.repository.MainRepository
import javax.inject.Inject

class MainRepositoryImpl @Inject constructor() : MainRepository {

override fun getSampleText(): String {
return "text"
}

}
17 changes: 17 additions & 0 deletions data/src/test/java/com/d83t/bpm/data/ExampleUnitTest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.d83t.presentation.data

import org.junit.Test

import org.junit.Assert.*

/**
* 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)
}
}
1 change: 1 addition & 0 deletions domain/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
Loading

0 comments on commit 7ece615

Please sign in to comment.