Setup

Acorn is tactically divided in several modules to be able to separate different concerns from each other. Core artifacts define the general contracts of Acorn, while extension artifacts provide the implementations.

Easy setup Maven Central

Acorn is hosted on Maven Central.

To get started quickly, you can include the ext-acorn-android dependency, which includes the necessary base to create an app.

implementation "com.nhaarman.acorn.ext:acorn-android:x.x.x"

If you use androidx.appcompat, you can use ext-acorn-android-appcompat instead:

implementation "com.nhaarman.acorn.ext:acorn-android-appcompat:x.x.x"

Using the dependencies above will transitively pull all other dependencies you need as well.

Advanced setup

As mentioned before, Acorn is divided in several modules.

Core

The core modules provide the general contracts of Acorn as interfaces and simple data classes.

ArtifactDescriptionDependencies
com.nhaarman.acorn:acornThe core library, containing only the interfaces for Acorn without any functionality.-
com.nhaarman.acorn:acorn-androidThe core library for Android, containing only the interfaces for working with Acorn on Android.com.nhaarman.acorn:acorn

JVM extensions

The following artifacts build upon the acorn artifact and provide some default implementations for Navigator and Scene:

ArtifactDescriptionDependencies
com.nhaarman.acorn.ext:acornThe main extension on the Acorn core, providing default implementations.com.nhaarman.acorn:acorn
com.nhaarman.acorn.ext:acorn-rxAn RxJava extension for Acorn.com.nhaarman.acorn:acorn
com.nhaarman.acorn.ext:acorn-testingProvides testing utilities for JVM tests.com.nhaarman.acorn:acorn

Android extensions

The following artifacts provide the necessary implementations to make Acorn work on Android:

ArtifactDescriptionDependencies
com.nhaarman.acorn.ext:acorn-androidThe main extension on the Acorn-Android core, providing default implementations.com.nhaarman.acorn:acorn
com.nhaarman.acorn:acorn-android
com.nhaarman.acorn.ext:acorn-android-testingProvides testing facilities for instrumentation testing with Acorn-Android.com.nhaarman.acorn:acorn
com.nhaarman.acorn:acorn-android
com.nhaarman.acorn.ext:acorn-android
com.nhaarman.acorn.ext:acorn-android-timberProvides a TimberLoggercom.nhaarman.acorn:acorn
com.nhaarman.acorn.ext:acorn
com.nhaarman.acorn.ext:acorn-android-lifecycleProvides LifecycleScenecom.nhaarman.acorn:acorn
com.nhaarman.acorn.ext:acorn

Experimental features

Experimental features live in a separate artifact.

ArtifactDescriptionDependencies
com.nhaarman.acorn.ext:acorn-experimentalContains experimental features.com.nhaarman.acorn:acorn
com.nhaarman.acorn:ext-acorn