MVP-Core

MVP base core

License

License

GroupId

GroupId

me.giacoppo
ArtifactId

ArtifactId

mvp
Last Version

Last Version

1.0.5
Release Date

Release Date

Type

Type

aar
Description

Description

MVP-Core
MVP base core
Project URL

Project URL

https://github.com/GiuseppeGiacoppo/MVP-Core
Source Code Management

Source Code Management

https://github.com/GiuseppeGiacoppo/MVP-Core

Download mvp

How to add to project

<!-- https://jarcasting.com/artifacts/me.giacoppo/mvp/ -->
<dependency>
    <groupId>me.giacoppo</groupId>
    <artifactId>mvp</artifactId>
    <version>1.0.5</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/me.giacoppo/mvp/
implementation 'me.giacoppo:mvp:1.0.5'
// https://jarcasting.com/artifacts/me.giacoppo/mvp/
implementation ("me.giacoppo:mvp:1.0.5")
'me.giacoppo:mvp:aar:1.0.5'
<dependency org="me.giacoppo" name="mvp" rev="1.0.5">
  <artifact name="mvp" type="aar" />
</dependency>
@Grapes(
@Grab(group='me.giacoppo', module='mvp', version='1.0.5')
)
libraryDependencies += "me.giacoppo" % "mvp" % "1.0.5"
[me.giacoppo/mvp "1.0.5"]

Dependencies

compile (2)

Group / Artifact Type Version
io.reactivex.rxjava2 : rxjava jar 2.1.9
io.reactivex.rxjava2 : rxandroid jar 2.0.1

runtime (1)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jre7 jar 1.2.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

MVP-Core

Maven Central

Android library written in Kotlin for providing base MVP core for Clean Architecture

Download

Grab via Maven:

<dependency>
  <groupId>me.giacoppo</groupId>
  <artifactId>mvp</artifactId>
  <version>LATEST_VERSION</version>
  <type>pom</type>
</dependency>

or Gradle:

api 'me.giacoppo:mvp:LATEST_VERSION'

Usage

The library provides common libraries and classes for your application based on a Clean Architecture approach. The library includes the abstract class UseCase<ReturnType, ParamsWrapper> which simplify the creation of your use cases.

Example:

	public class GetMovies extends UseCase<Movie, GetMovies.Params> {

		private final MoviesRepository repository;

		public GetConfig(MoviesRepository repository, ThreadExecutor threadExecutor, PostExecutionThread postExecutionThread) {
			super(threadExecutor, postExecutionThread);
			this.repository = repository;
		}

		@Override
		protected Observable<Movie> buildUseCaseObservable(Params params) {
			return repository.findMovies(params.category);
		}

		public static final class Params {
			private final String category;

			private Params(String category) {
				this.category = category;
			}

			public static Params forCategory(String category) {
				return new Params(category);
			}
		}
	}

The library also includes base interfaces for Repository Pattern approach, base ThreadExecutor & PostExecutionThread instances, default observer class

Credits

Android Clean Architecture: https://github.com/android10/Android-CleanArchitecture

License

Copyright 2017 Giuseppe Giacoppo
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Versions

Version
1.0.5
1.0.4
1.0.3
1.0.2