Skip to content

Commit

Permalink
chore:remove unused dependencies (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaiqueoliveira authored Oct 27, 2019
1 parent 485a649 commit ba441c9
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 26 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Built application files
*.apk
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex
Expand Down Expand Up @@ -45,7 +46,7 @@ captures/

# Keystore files
# Uncomment the following line if you do not want to check your keystore files in.
#*.jks
*.jks

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
Expand All @@ -64,3 +65,6 @@ fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

app/mapping.txt
app/release/
9 changes: 5 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ android {
ext.alwaysUpdateBuildId = false
ext.enableCrashlytics = false
crunchPngs false
minifyEnabled false

applicationIdSuffix ".dev"
lintOptions { tasks.lint.enabled = false }
Expand All @@ -52,7 +53,9 @@ android {
}

release {
minifyEnabled false
minifyEnabled true
shrinkResources true
crunchPngs true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Expand Down Expand Up @@ -96,8 +99,6 @@ dependencies {
implementation Dependencies.okhttp
implementation Dependencies.okhttpInterceptor

implementation Dependencies.androidxConstraintLayout

AndroidModule.main.forEach { implementation it }
AndroidModule.unitTesting.forEach { testImplementation it }
AndroidModule.androidTesting.forEach { androidTestImplementation it }
Expand All @@ -107,4 +108,4 @@ configurations.all {
resolutionStrategy {
forcedModules = AndroidModule.main.toArray()
}
}
}
10 changes: 10 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# kotlinx.serialization
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.SerializationKt

-keep,includedescriptorclasses class com.jcaique.dialetus.domain.models.**$$serializer { *; }
-keepclassmembers class com.jcaique.dialetus.domain.models.** {
*** Companion;
Expand All @@ -16,6 +17,15 @@
kotlinx.serialization.KSerializer serializer(...);
}

-keep,includedescriptorclasses class com.jcaique.dialetus.data.responses.**$$serializer { *; }
-keepclassmembers class com.jcaique.dialetus.data.responses.** {
*** Companion;
}
-keepclasseswithmembers class com.jcaique.dialetus.data.responses.** {
kotlinx.serialization.KSerializer serializer(...);
}


# OkHttp
-keepattributes *Annotation*, Signature, Exception
-keep class sun.misc.Unsafe { *; }
Expand Down
14 changes: 1 addition & 13 deletions buildSrc/src/main/java/dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -122,30 +122,21 @@ object AndroidModule {

val main = listOf(
Dependencies.kotlinStdlib,
Dependencies.kotlinReflect,
Dependencies.androidxActivity,
Dependencies.androidxAppCompat,
Dependencies.androidxCardView,
Dependencies.androidxGridLayout,
Dependencies.androidxRecyclerView,
Dependencies.androidxLifecycleCommon,
Dependencies.androidxLifecycleCommonJava8,
Dependencies.androidxLifecycleExtensions,
Dependencies.groupie,
Dependencies.groupieKTX,
Dependencies.materialDesign,
Dependencies.kodein,
Dependencies.kodeinConf,
Dependencies.kodeinAndroid,
Dependencies.androidxLifecycleViewModel,
Dependencies.androidxConstraintLayout
Dependencies.androidxLifecycleViewModel
)

val unitTesting = listOf(
Dependencies.slf4jNoOp,
Dependencies.jUnit,
Dependencies.assertJ,
Dependencies.kotlinReflect,
Dependencies.mockitoKotlin,
Dependencies.slf4j,
Dependencies.coroutinesTest
Expand All @@ -154,7 +145,6 @@ object AndroidModule {
val androidTesting = listOf(
Dependencies.slf4jNoOp,
Dependencies.assertJ,
Dependencies.kotlinReflect,
Dependencies.mockitoKotlin,
Dependencies.espressoCore,
Dependencies.espressoIntents,
Expand All @@ -171,7 +161,6 @@ object StandaloneModule {

val main = listOf(
Dependencies.kotlinStdlib,
Dependencies.kotlinReflect,
Dependencies.kodein,
Dependencies.kodeinConf
)
Expand All @@ -181,7 +170,6 @@ object StandaloneModule {
Dependencies.assertJ,
Dependencies.slf4jNoOp,
Dependencies.mockitoKotlin,
Dependencies.kotlinReflect,
Dependencies.mockitoInline,
Dependencies.coroutinesTest
)
Expand Down
1 change: 0 additions & 1 deletion presentation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dependencies {
implementation project(':data')
implementation project(':utils')

implementation Dependencies.androidxConstraintLayout
implementation Dependencies.coroutines
implementation Dependencies.coroutinesAndroid

Expand Down
10 changes: 3 additions & 7 deletions presentation/src/main/res/layout/regions_menu_view.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">

Expand All @@ -11,9 +10,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:menu="@menu/regions_menu"/>
app:menu="@menu/regions_menu" />

</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

0 comments on commit ba441c9

Please sign in to comment.