Skip to content

Commit

Permalink
merge version 7 (1.1.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
lopspower committed Aug 26, 2022
2 parents 24aa1d9 + 7cfe7f8 commit 712e7e7
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 83 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
apply from: 'dependencies.gradle'

buildscript {
ext.kotlin_version = '1.6.21'
ext.kotlin_version = '1.7.10'
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.42.0'
classpath 'com.adarshr:gradle-test-logger-plugin:3.2.0'
Expand Down
23 changes: 16 additions & 7 deletions data/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'com.adarshr.test-logger'
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.github.ben-manes.versions'
id 'com.adarshr.test-logger'
}

android {
compileSdkVersion androidCompileSdkVersion
namespace 'com.mikhaellopez.data'
defaultConfig {
minSdkVersion androidMinSdkVersion
testInstrumentationRunner packageAndroidJUnitRunner
Expand All @@ -26,15 +29,21 @@ android {
}
testBuildType 'debugTest'
}
namespace 'com.mikhaellopez.data'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

dependencies {
// MODULE
implementation project(':domain')

// KOTLIN
implementation kotlinStdlib
//implementation kotlinStdlib
// SUPPORT
api androidXCore
// COMPONENTS
Expand Down
61 changes: 20 additions & 41 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,88 +7,67 @@ allprojects {

ext {
// APP VERSION
androidVersionCode = 6
androidVersionName = '1.1.1'
androidVersionCode = 7
androidVersionName = '1.1.2'

// ANDROID VERSION
androidCompileSdkVersion = 31
androidCompileSdkVersion = 33
androidMinSdkVersion = 19
androidTargetSdkVersion = androidCompileSdkVersion

// DEFAULT INFO
packageAndroidJUnitRunner = "androidx.test.runner.AndroidJUnitRunner"
defaultFlavorDimensions = "default"

// KOTLIN
kotlinStdlib = "org.jetbrains.kotlin:kotlin-stdlib:${ext.kotlin_version}"

// ANDROID LIB
androidXCoreVersion = '1.7.0'
androidXVersion = '1.4.1'
androidXPreferenceVersion = '1.2.0'
androidXRecyclerviewVersion = '1.2.1'
androidXSwipeRefreshVersion = '1.1.0'
materialVersion = '1.6.0'
constraintLayoutVersion = '2.1.4'
multidexVersion = '2.0.1'
androidXCore = "androidx.core:core:$androidXCoreVersion"
androidXAppCompat = "androidx.appcompat:appcompat:$androidXVersion"
androidXPreference = "androidx.preference:preference-ktx:$androidXPreferenceVersion"
androidXRecyclerView = "androidx.recyclerview:recyclerview:$androidXRecyclerviewVersion"
androidXSwipeRefresh = "androidx.swiperefreshlayout:swiperefreshlayout:$androidXSwipeRefreshVersion"
materialDesign = "com.google.android.material:material:$materialVersion"
constraintLayout = "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
multidex = "androidx.multidex:multidex:$multidexVersion"
androidXCore = "androidx.core:core:1.8.0"
androidXAppCompat = "androidx.appcompat:appcompat:1.5.0"
androidXRecyclerView = "androidx.recyclerview:recyclerview:1.2.1"
androidXSwipeRefresh = "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
materialDesign = "com.google.android.material:material:1.6.1"
constraintLayout = "androidx.constraintlayout:constraintlayout:2.1.4"
multidex = "androidx.multidex:multidex:2.0.1"

// COMPONENTS
roomVersion = '2.4.2'
roomVersion = '2.4.3'
room = "androidx.room:room-runtime:$roomVersion"
roomCompiler = "androidx.room:room-compiler:$roomVersion"

// DAGGER
daggerVersion = '2.42'
daggerVersion = '2.43.2'
dagger = "com.google.dagger:dagger:$daggerVersion"
daggerCompiler = "com.google.dagger:dagger-compiler:$daggerVersion"

// RX
rxAndroidVersion = '3.0.0'
rxJavaVersion = '3.1.4'
rxKotlinVersion = '3.0.1'
rxBindingVersion = '4.0.0'
rxAndroid = "io.reactivex.rxjava3:rxandroid:$rxAndroidVersion"
rxJava = "io.reactivex.rxjava3:rxjava:$rxJavaVersion"
rxKotlin = "io.reactivex.rxjava3:rxkotlin:$rxKotlinVersion"
rxAndroid = "io.reactivex.rxjava3:rxandroid:3.0.0"
rxJava = "io.reactivex.rxjava3:rxjava:3.1.5"
rxKotlin = "io.reactivex.rxjava3:rxkotlin:3.0.1"
rxBinding = "com.jakewharton.rxbinding4:rxbinding:$rxBindingVersion"
rxBindingSwipeRefreshlayout = "com.jakewharton.rxbinding4:rxbinding-swiperefreshlayout:$rxBindingVersion"

// WEBSERVICES
retrofitVersion = '2.9.0'
okHttpVersion = '3.11.0'
retrofitConverterGson = "com.squareup.retrofit2:converter-gson:$retrofitVersion"
retrofitAdapterRxJava = "com.squareup.retrofit2:adapter-rxjava3:$retrofitVersion"

// DEBUG
timberVersion = '5.0.1'
chuckVersion = '1.1.0'
timber = "com.jakewharton.timber:timber:$timberVersion"
timber = "com.jakewharton.timber:timber:5.0.1"
chuckDebug = "com.readystatesoftware.chuck:library:$chuckVersion"
chuckRelease = "com.readystatesoftware.chuck:library-no-op:$chuckVersion"

// TEST
junitVersion = '4.13.2'
mockitoVersion = '4.5.1'
mockitoKotlinVersion = '4.0.0'
junit = "junit:junit:$junitVersion"
mockitoInline = "org.mockito:mockito-inline:$mockitoVersion"
mockitoKotlin = "org.mockito.kotlin:mockito-kotlin:$mockitoKotlinVersion"
junit = "junit:junit:4.13.2"
mockitoInline = "org.mockito:mockito-inline:4.7.0"
mockitoKotlin = "org.mockito.kotlin:mockito-kotlin:4.0.0"

// ANDROID TEST
androidXTestVersion = '1.4.0'
androidXTestJunitVersion = '1.1.3'
espressoVersion = '3.4.0'
multidexInstVersion = '2.0.0'
androidXTestJunit = "androidx.test.ext:junit:1.1.3"
androidXTestRunner = "androidx.test:runner:$androidXTestVersion"
androidXTestJunit = "androidx.test.ext:junit:$androidXTestJunitVersion"
androidXTestRules = "androidx.test:rules:$androidXTestVersion"
espressoCore = "androidx.test.espresso:espresso-core:$espressoVersion"
espressoIntents = "androidx.test.espresso:espresso-intents:$espressoVersion"
Expand Down
12 changes: 6 additions & 6 deletions domain/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apply plugin: 'kotlin'
apply plugin: 'idea'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'com.adarshr.test-logger'
plugins {
id 'kotlin'
id 'idea'
id 'com.github.ben-manes.versions'
id 'com.adarshr.test-logger'
}

dependencies {
// KOTLIN
implementation kotlinStdlib
// RX
implementation rxJava
implementation rxKotlin
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
31 changes: 14 additions & 17 deletions presentation/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'com.adarshr.test-logger'
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
id 'com.github.ben-manes.versions'
id 'com.adarshr.test-logger'
}

android {
compileSdkVersion androidCompileSdkVersion
Expand All @@ -16,14 +18,6 @@ android {
multiDexEnabled true
testInstrumentationRunner packageAndroidJUnitRunner
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
signingConfigs {
release {
storeFile file('keystore')
Expand Down Expand Up @@ -53,6 +47,13 @@ android {
}
testBuildType 'debugTest'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
viewBinding true
}
Expand All @@ -66,11 +67,8 @@ dependencies {
implementation project(':data')
implementation project(':domain')

// KOTLIN
implementation kotlinStdlib
// ANDROIDX
implementation androidXAppCompat
implementation androidXPreference
implementation androidXRecyclerView
implementation androidXSwipeRefresh
implementation materialDesign
Expand Down Expand Up @@ -100,7 +98,6 @@ dependencies {
androidTestImplementation espressoCore
androidTestImplementation espressoIntents
androidTestImplementation espressoContrib
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.3'

// DEPENDENCY CHECK STRATEGY
dependencyUpdates.resolutionStrategy dependencyUpdatesStrategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package com.mikhaellopez.presentation.di.modules

import android.app.Application
import android.content.Context
import android.content.SharedPreferences
import androidx.preference.PreferenceManager
import com.mikhaellopez.presentation.di.PerApplication
import dagger.Module
import dagger.Provides
Expand All @@ -20,9 +18,4 @@ class ApplicationModule {
@PerApplication
internal fun provideContext(application: Application): Context = application.baseContext

@Provides
@PerApplication
internal fun providesSharedPreferences(context: Context): SharedPreferences =
PreferenceManager.getDefaultSharedPreferences(context)

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ abstract class ABaseActivity<VB : ViewBinding> : AppCompatActivity() {
override fun onOptionsItemSelected(item: MenuItem): Boolean {
// Handle toolbar back arrow click here
if (item.itemId == android.R.id.home) {
onBackPressed()
finish()
}
return super.onOptionsItemSelected(item)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class RepoActivity : ABaseActivity<ActivityLayoutToLoadFragmentBinding>() {
}
}

override fun onCreateOptionsMenu(menu: Menu?): Boolean {
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.repo_menu, menu)
return super.onCreateOptionsMenu(menu)
}
Expand Down

0 comments on commit 712e7e7

Please sign in to comment.