MvRx Testing

MvRx is an Android application framework that makes product development fast and fun.

License

License

GroupId

GroupId

com.airbnb.android
ArtifactId

ArtifactId

mvrx-testing
Last Version

Last Version

2.0.0-beta3
Release Date

Release Date

Type

Type

aar
Description

Description

MvRx Testing
MvRx is an Android application framework that makes product development fast and fun.
Project URL

Project URL

https://github.com/airbnb/mvrx
Source Code Management

Source Code Management

https://github.com/airbnb/mvrx

Download mvrx-testing

How to add to project

<!-- https://jarcasting.com/artifacts/com.airbnb.android/mvrx-testing/ -->
<dependency>
    <groupId>com.airbnb.android</groupId>
    <artifactId>mvrx-testing</artifactId>
    <version>2.0.0-beta3</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.airbnb.android/mvrx-testing/
implementation 'com.airbnb.android:mvrx-testing:2.0.0-beta3'
// https://jarcasting.com/artifacts/com.airbnb.android/mvrx-testing/
implementation ("com.airbnb.android:mvrx-testing:2.0.0-beta3")
'com.airbnb.android:mvrx-testing:aar:2.0.0-beta3'
<dependency org="com.airbnb.android" name="mvrx-testing" rev="2.0.0-beta3">
  <artifact name="mvrx-testing" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.airbnb.android', module='mvrx-testing', version='2.0.0-beta3')
)
libraryDependencies += "com.airbnb.android" % "mvrx-testing" % "2.0.0-beta3"
[com.airbnb.android/mvrx-testing "2.0.0-beta3"]

Dependencies

compile (1)

Group / Artifact Type Version
com.airbnb.android : mvrx-mocking jar 2.0.0-beta3

runtime (8)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.4.10
org.jetbrains.kotlin : kotlin-android-extensions-runtime jar 1.4.10
androidx.appcompat » appcompat jar 1.2.0
junit : junit jar 4.13
org.jetbrains.kotlin : kotlin-reflect jar 1.4.10
io.reactivex.rxjava2 : rxandroid jar 2.1.1
org.jetbrains.kotlinx : kotlinx-coroutines-test jar 1.4.1
com.airbnb.android : mvrx-rxjava2 jar 2.0.0-beta3

Project Modules

There are no modules declared in this project.

Build Status Maven Central

MvRx: Android on Autopilot

For full documentation, check out the wiki

MvRx (pronounced mavericks) is the Android framework from Airbnb that we use for nearly all product development at Airbnb.

When we began creating MvRx, our goal was not to create yet another architecture pattern for Airbnb, it was to make building products easier, faster, and more fun. All of our decisions have built on that. We believe that for MvRx to be successful, it must be effective for building everything from the simplest of screens to the most complex in our app.

This is what it looks like:

data class HelloWorldState(val title: String = "Hello World") : MvRxState

/**
 * Refer to the wiki for how to set up your base ViewModel.
 */
class HelloWorldViewModel(initialState: HelloWorldState) : MyBaseMvRxViewModel<HelloWorldState>(initialState, debugMode = BuildConfig.DEBUG) {
    fun getMoreExcited() = setState { copy(title = "$title!") }
}

class HelloWorldFragment : BaseFragment() {
    private val viewModel: HelloWorldViewModel by fragmentViewModel()

    override fun EpoxyController.buildModels() = withState(viewModel) { state ->
        header {
            title(state.title)
        }
        basicRow { 
            onClick { viewModel.getMoreExcited() }
        }
    }
}

Installation

Gradle is the only supported build configuration, so just add the dependency to your project build.gradle file:

dependencies {
  implementation 'com.airbnb.android:mvrx:x.y.z'
}

The latest version of mvrx is Maven Central

For full documentation, check out the wiki

com.airbnb.android

Airbnb

Versions

Version
2.0.0-beta3
2.0.0-beta2
2.0.0-beta1
2.0.0-alpha8
2.0.0-alpha7
2.0.0-alpha6
2.0.0-alpha5
2.0.0-alpha4
2.0.0-alpha3
2.0.0-alpha2
2.0.0-alpha1
1.5.1
1.5.0
1.4.0
1.4.0-alpha1
1.3.0
1.2.1
1.2.0
1.1.0
1.0.2
1.0.1
1.0.0
0.7.2
0.7.1
0.7.0