Skip to content

Commit

Permalink
Add lib for project
Browse files Browse the repository at this point in the history
  • Loading branch information
LNMCode committed Apr 24, 2022
1 parent be48fdc commit ab35152
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 4 deletions.
55 changes: 54 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-android'
id 'kotlin-kapt'
id 'kotlin-android-extensions'
id 'androidx.navigation.safeargs.kotlin'
}

android {
Expand Down Expand Up @@ -29,15 +33,64 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
dataBinding true
}
}

dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib:1.6.10"
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

def fragment = "1.5.0-beta1"
implementation "androidx.fragment:fragment-ktx:$fragment"

// -- Retrofit2
def retrofit2_version = "2.9.0"
implementation "com.squareup.retrofit2:retrofit:$retrofit2_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit2_version"

// -- Room
def room_version = "2.4.2"
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
// Kotlin Extensions and Coroutines support for Room
implementation "androidx.room:room-ktx:$room_version"

// jetpack navigation component
def nav_version = "2.5.0-beta1"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version"
implementation "androidx.navigation:navigation-runtime:$nav_version"

def material_version = "1.5.0"
implementation "com.google.android.material:material:$material_version"

//glide
def glide_version = "4.12.0"
implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version"

def dataStore = "1.0.0"
implementation "androidx.datastore:datastore-preferences:$dataStore"

// Koin
def koin_version = "3.0.1"
implementation "io.insert-koin:koin-android:$koin_version"

// Coroutines
def coroutines = "1.5.0"
//noinspection GradleDependency
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.2'

implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'

}
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
android:supportsRtl="true"
android:theme="@style/Theme.GalleryApp">
<activity
android:name=".MainActivity"
android:name=".presentation.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.lnmcode.galleryapp
package com.lnmcode.galleryapp.presentation

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.lnmcode.galleryapp.R

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".presentation.MainActivity">

<TextView
android:layout_width="wrap_content"
Expand Down
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
gradlePluginPortal()
google()
mavenCentral()
maven { url 'https://jitpack.io' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
classpath "com.google.dagger:hilt-android-gradle-plugin:2.37"
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.0.0"
classpath 'com.google.gms:google-services:4.3.10'
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.2"

}
}

plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
Expand Down

0 comments on commit ab35152

Please sign in to comment.