Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from nodes-android/fix/migration_andcoroutines_…
Browse files Browse the repository at this point in the history
…merge

Fix/migration and coroutines merge
  • Loading branch information
vovahost committed Jan 29, 2019
2 parents 1e3c4dd + 1444874 commit ea6fb19
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 42 deletions.
23 changes: 13 additions & 10 deletions app/build.gradle
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 28
versionCode 4
versionName "1.2.0"
versionCode 6
versionName "2.2.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand All @@ -24,21 +24,24 @@ android {
}

dependencies {
testImplementation 'junit:junit:4.12'

androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
def androidx_support_library_version = "2.0.0"

implementation 'javax.inject:javax.inject:1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.0.1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.1'

implementation "android.arch.lifecycle:runtime:1.1.1" // not necessary if you are using lifecycle:extensions or lifecycle:common-java8
kapt "android.arch.lifecycle:compiler:1.1.1" // not needed if you are using the DefaultLifecycleObserver from common-java8 artifact.
implementation "androidx.lifecycle:lifecycle-runtime:$androidx_support_library_version" // not necessary if you are using lifecycle:extensions or lifecycle:common-java8
kapt "androidx.lifecycle:lifecycle-compiler:$androidx_support_library_version" // not needed if you are using the DefaultLifecycleObserver from common-java8 artifact.

// java 8 stuff
//implementation "android.arch.lifecycle:common-java8:1.0.0"
//implementation "androidx.lifecycle:lifecycle-common-java8:$androidx_support_library_version"

//testImplementation 'junit:junit:4.12'

//androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
// exclude group: 'com.android.support', module: 'support-annotations'
//})
}

apply plugin: 'maven'
Expand Down
2 changes: 1 addition & 1 deletion app/maven-push.gradle
Expand Up @@ -12,7 +12,7 @@ allprojects { ext."signing.password" = System.getenv('password') }

// Artifact settings
def _group = 'dk.nodes.arch'
def _version = '1.2.0'
def _version = '2.2.0'
def _archivesBaseName = 'base'

def _name = 'Nodes Architecture Library'
Expand Down
26 changes: 9 additions & 17 deletions app/src/androidTest/java/dk/nodes/arch/ExampleInstrumentedTest.kt
@@ -1,24 +1,16 @@
package dk.nodes.arch

import android.support.test.InstrumentationRegistry
import android.support.test.runner.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
assertEquals("dk.nodes.arch", appContext.packageName)
}
}
//@RunWith(AndroidJUnit4::class)
//class ExampleInstrumentedTest {
// @Test
// fun useAppContext() {
// // Context of the app under test.
// val appContext = InstrumentationRegistry.getTargetContext()
// assertEquals("dk.nodes.arch", appContext.packageName)
// }
//}
@@ -1,6 +1,6 @@
package dk.nodes.arch.presentation.base

import android.arch.lifecycle.Lifecycle
import androidx.lifecycle.Lifecycle

interface BasePresenter<in V> {

Expand Down
@@ -1,8 +1,8 @@
package dk.nodes.arch.presentation.base

import android.arch.lifecycle.Lifecycle
import android.arch.lifecycle.LifecycleObserver
import android.arch.lifecycle.OnLifecycleEvent
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.OnLifecycleEvent
import java.util.concurrent.LinkedBlockingQueue

abstract class BasePresenterImpl<V> : BasePresenter<V>, LifecycleObserver {
Expand All @@ -18,6 +18,8 @@ abstract class BasePresenterImpl<V> : BasePresenter<V>, LifecycleObserver {
lifecycle.addObserver(this)
}



@OnLifecycleEvent(Lifecycle.Event.ON_START)
override fun onStart() {

Expand Down
16 changes: 6 additions & 10 deletions app/src/test/java/dk/nodes/arch/ExampleUnitTest.kt
@@ -1,17 +1,13 @@
package dk.nodes.arch

import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}
//class ExampleUnitTest {
// @Test
// fun addition_isCorrect() {
// assertEquals(4, 2 + 2)
// }
//}

0 comments on commit ea6fb19

Please sign in to comment.