Skip to content

Commit

Permalink
+ refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem committed Mar 6, 2021
1 parent 1cf3b7e commit 1cc3f08
Show file tree
Hide file tree
Showing 30 changed files with 35 additions and 76 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ android {

dependencies {

implementation project (":base")
implementation project (':mad-base')

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
implementation 'androidx.core:core-ktx:1.3.2'
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/java/ru/wearemad/basic/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ package ru.wearemad.basic

import androidx.appcompat.app.AppCompatActivity

class MainActivity : AppCompatActivity() {

}
class MainActivity : AppCompatActivity()
2 changes: 0 additions & 2 deletions base/src/main/AndroidManifest.xml

This file was deleted.

38 changes: 0 additions & 38 deletions config.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,12 @@ ext {

//kotlin
kotlinVersion = '1.4.30'
kotlixExtVersion = '1.3.2'
kotlinCoroutinesVersion = '1.3.9'
kotlinCoroutinesAndroidVersion = '1.4.1'
kotlixLifecycleExtVersion = '2.2.0'

//firebase
googleServicesVersion = '4.3.3'
gmsVersion = '17.1.0'
fbDatabaseVersion = '19.6.0'
fbAuthVersion = '20.0.2'
firebaseStorageVersion = '19.2.1'
firebaseDynamicLinksVersion = '19.1.1'

//android x
xVersion = '1.2.0'
xConstraint = '2.0.4'
xRecycler = '1.0.0'
xMaterial = '1.3.0'
xLifecycle = '2.1.0'
xMultidex = '2.0.1'
xExif = '1.3.2'
xAnnotationVersion = '1.0.1'
ktxLifecycleVersion = '2.2.0'
xFragment = '1.3.0'
xSwipeRefresh = '1.1.0'

//room
roomVersion = '2.2.6'

//gson
gsonVersion = '2.8.6'

//coil
coilVersion = '1.1.0'

//koin
koinVersion = '2.1.6'

//lifecyle
lifecycleVersion = '2.2.0'

//cicerone
ciceroneVersion = '6.6'

//rv adapter
easyAdapterVersion = '2.0.0'
}
File renamed without changes.
4 changes: 2 additions & 2 deletions base/build.gradle → mad-base/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ dependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutinesAndroidVersion"

implementation "androidx.exifinterface:exifinterface:$xExif"

api "androidx.appcompat:appcompat:$xVersion"
api "androidx.fragment:fragment-ktx:$xFragment"
api "com.google.android.material:material:$xMaterial"

implementation "androidx.exifinterface:exifinterface:$xExif"

testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base
package ru.wearemad.mad_base

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand Down
2 changes: 2 additions & 0 deletions mad-base/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="ru.wearemad.mad_base" />
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.activity
package ru.wearemad.mad_base.activity

import android.app.Activity

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.activity
package ru.wearemad.mad_base.activity

import android.app.Activity
import android.os.Bundle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.activity
package ru.wearemad.mad_base.activity

import android.app.Activity
import android.app.Application
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.activity.contracts
package ru.wearemad.mad_base.activity.contracts

import android.net.Uri

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.activity.contracts
package ru.wearemad.mad_base.activity.contracts

import android.app.Activity
import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.coroutines
package ru.wearemad.mad_base.coroutines

import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.coroutines
package ru.wearemad.mad_base.coroutines

import kotlinx.coroutines.channels.SendChannel
import kotlin.coroutines.Continuation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.coroutines
package ru.wearemad.mad_base.coroutines

import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.Dispatchers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.coroutines
package ru.wearemad.mad_base.coroutines

import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.coroutineScope
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.coroutines
package ru.wearemad.mad_base.coroutines

sealed class RequestResult<out T : Any?> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package ru.wearemad.base.files
package ru.wearemad.mad_base.files

import android.content.Context
import ru.wearemad.base.files.FileUtils
import java.io.File

class FileHelper(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.files
package ru.wearemad.mad_base.files

import android.content.Context
import java.io.File
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package ru.wearemad.base.files
package ru.wearemad.mad_base.files

import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Matrix
import androidx.exifinterface.media.ExifInterface
import kotlinx.coroutines.withContext
import ru.wearemad.base.coroutines.DispatchersProvider
import ru.wearemad.base.coroutines.RequestResult
import ru.wearemad.base.coroutines.wrapResult
import ru.wearemad.mad_base.coroutines.DispatchersProvider
import ru.wearemad.mad_base.coroutines.RequestResult
import ru.wearemad.mad_base.coroutines.wrapResult
import java.io.File
import java.io.FileOutputStream

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package ru.wearemad.base.files
package ru.wearemad.mad_base.files

import android.content.Context
import android.graphics.Bitmap
import android.net.Uri
import kotlinx.coroutines.withContext
import ru.wearemad.base.coroutines.DispatchersProvider
import ru.wearemad.base.coroutines.RequestResult
import ru.wearemad.base.coroutines.wrapResult
import ru.wearemad.mad_base.coroutines.DispatchersProvider
import ru.wearemad.mad_base.coroutines.RequestResult
import ru.wearemad.mad_base.coroutines.wrapResult
import java.io.File
import java.io.FileOutputStream

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package ru.wearemad.base.message
package ru.wearemad.mad_base.message

import android.view.View
import android.widget.Toast
import androidx.core.content.ContextCompat
import com.google.android.material.snackbar.Snackbar
import ru.wearemad.base.activity.CurrentActivityHolder
import ru.wearemad.mad_base.activity.CurrentActivityHolder

class DefaultMessageController(
private val activityHolder: CurrentActivityHolder
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.message
package ru.wearemad.mad_base.message

import android.view.View
import android.widget.Toast
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ru.wearemad.base.message
package ru.wearemad.mad_base.message

import android.app.Activity
import ru.wearemad.base.activity.EmptyActivityLifecycleCallbacks
import ru.wearemad.mad_base.activity.EmptyActivityLifecycleCallbacks

class MessageControllerActivityCallback(
private val messageController: MessageController
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base.validation
package ru.wearemad.mad_base.validation

interface Validator<in P : Any?> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ru.wearemad.base
package ru.wearemad.mad_base

import org.junit.Test

Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rootProject.name = "Basic"
include ':app',
':base'
':mad-base'

0 comments on commit 1cc3f08

Please sign in to comment.