Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 11 additions & 15 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,32 @@ android {
}
}

kapt {
generateStubs = true
}

dependencies {
Map<String, String> dependencies = globalConf.commonDependencies
androidTestCompile (dependencies.espressoCore, {
androidTestImplementation (dependencies.espressoCore, {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation dependencies.testRunner
testCompile dependencies.jUnit
testImplementation dependencies.jUnit

implementation dependencies.constraintLayout
implementation dependencies.appCompat
implementation dependencies.kotlinStdLib

kapt dependencies.daggerCompiler
kapt dependencies.daggerAnnotationProcessor
compile dependencies.dagger
compile dependencies.daggerAndroid
compile dependencies.daggerAndroidSupport
implementation dependencies.dagger
implementation dependencies.daggerAndroid
implementation dependencies.daggerAndroidSupport

compile dependencies.daggerHelper
compile dependencies.rxBinding
implementation dependencies.daggerHelper
implementation dependencies.rxBinding

compile project(':kontent-core')
compile project(':kontent-dagger-support')
compile project(':kontent-android-viewmodel')
implementation project(':kontent-core')
implementation project(':kontent-dagger-support')
implementation project(':kontent-android-viewmodel')

compile dependencies.lifecycleExtensions
implementation dependencies.lifecycleExtensions
kapt dependencies.lifecycleCompiler
}
repositories {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/arranlomas/mvisample/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ fun loadPreviousScoreProcessor(scoreRepository: IScoreRepository) = KontentActio
loading = MainResults.LoadPreviousScoreLoading()
)

val reducer = KontentReducer<MainResults, MainViewState>({ result, previousState ->
val reducer = KontentReducer<MainResults, MainViewState> { result, previousState ->
when (result) {
is MainResults.IncrementTeamA -> previousState.copy(teamAScore = previousState.teamAScore + 1)
is MainResults.IncrementTeamB -> previousState.copy(teamBScore = previousState.teamBScore + 1)
is MainResults.LoadPreviousScoreLoading -> previousState.copy(loading = true, error = null)
is MainResults.LoadPreviousScoreError -> previousState.copy(loading = false, error = result.error)
is MainResults.LoadPreviousScoreSuccess -> previousState.copy(loading = false, error = null, teamAScore = result.teamAScore, teamBScore = result.teamBScore)
}
})
}

sealed class MainActions : KontentAction() {
class LoadPreviousScore : MainActions()
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
apply from: 'gradle/dependencies.gradle'

buildscript {
ext.kotlin_version = '1.2.30'
ext.kotlin_version = '1.3.50'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.android.tools.build:gradle:3.5.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand Down
4 changes: 2 additions & 2 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ext {
kotlin_version = "1.2.30"
kotlin_version = "1.3.50"
dagger_version = "2.15"
achitechture_components_version = "1.1.0"

commonDependencies = [
appCompat : 'com.android.support:appcompat-v7:27.1.0',
constraintLayout : 'com.android.support.constraint:constraint-layout:1.0.2',
jUnit : 'junit:junit:4.12',
kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version",
kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version",
rxJava : 'io.reactivex.rxjava2:rxjava:2.1.6',
espressoCore : 'com.android.support.test.espresso:espresso-core:2.2.2',
testRunner : 'com.android.support.test:runner:1.0.1',
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Dec 26 18:30:36 GMT+10:00 2017
#Tue Nov 12 10:24:03 WIB 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
8 changes: 4 additions & 4 deletions kontent-android-viewmodel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,17 @@ android {

dependencies {
Map<String, String> dependencies = globalConf.commonDependencies
androidTestCompile (dependencies.espressoCore, {
androidTestImplementation (dependencies.espressoCore, {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation dependencies.testRunner
testCompile dependencies.jUnit
testImplementation dependencies.jUnit

implementation dependencies.appCompat
implementation dependencies.kotlinStdLib

compile project(path: ':kontent-core')
api project(path: ':kontent-core')

compile dependencies.lifecycleExtensions
implementation dependencies.lifecycleExtensions
kapt dependencies.lifecycleCompiler
}
12 changes: 6 additions & 6 deletions kontent-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
testCompile 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.+'
testImplementation 'junit:junit:4.12'

compile 'io.reactivex.rxjava2:rxjava:2.1.6'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
api 'io.reactivex.rxjava2:rxjava:2.2.14'
api 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import io.reactivex.annotations.CheckReturnValue
import io.reactivex.annotations.SchedulerSupport
import io.reactivex.schedulers.Schedulers

fun <T> Observable<T>.composeIo(): Observable<T> = compose<T>({
fun <T> Observable<T>.composeIo(): Observable<T> = compose<T> {
it.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
})
}

@CheckReturnValue
@SchedulerSupport(SchedulerSupport.NONE)
Expand Down
12 changes: 6 additions & 6 deletions kontent-dagger-support/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
def globalConf = rootProject.ext

android {
Expand All @@ -27,21 +27,21 @@ android {

dependencies {
Map<String, String> dependencies = globalConf.commonDependencies
androidTestCompile (dependencies.espressoCore, {
androidTestImplementation (dependencies.espressoCore, {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation dependencies.testRunner
testCompile dependencies.jUnit
testImplementation dependencies.jUnit

implementation dependencies.appCompat
implementation dependencies.kotlinStdLib


kapt dependencies.daggerCompiler
kapt dependencies.daggerAnnotationProcessor
compile dependencies.dagger
compile dependencies.daggerAndroidSupport
implementation dependencies.dagger
implementation dependencies.daggerAndroidSupport

compile project(':kontent-core')
implementation project(':kontent-core')
}

16 changes: 6 additions & 10 deletions kontent-dagger/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
def globalConf = rootProject.ext

android {
Expand All @@ -25,26 +25,22 @@ android {

}

kapt {
generateStubs = true
}

dependencies {
Map<String, String> dependencies = globalConf.commonDependencies
androidTestCompile (dependencies.espressoCore, {
androidTestImplementation (dependencies.espressoCore, {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation dependencies.testRunner
testCompile dependencies.jUnit
testImplementation dependencies.jUnit

implementation dependencies.appCompat
implementation dependencies.kotlinStdLib


kapt dependencies.daggerCompiler
kapt dependencies.daggerAnnotationProcessor
compile dependencies.dagger
compile dependencies.daggerAndroid
implementation dependencies.dagger
implementation dependencies.daggerAndroid

compile project(':kontent-core')
implementation project(':kontent-core')
}