Skip to content

Commit

Permalink
[gradle] add: publishing script and configs
Browse files Browse the repository at this point in the history
[gradle] improv: bump bintray plugin version, remove upload from common module


[gradle] fix: groupNameAndArtifactPrefix - missing dash


[javadoc] fix: remove non-imported references and self-closing html tags


[core] bump libs version name


[moviper-common] fix: javadoc


[moviper-common] publishing: add missing publishing script


[core] bump libs version name
  • Loading branch information
mkoslacz committed Mar 18, 2017
1 parent 02fab03 commit 2880d71
Show file tree
Hide file tree
Showing 45 changed files with 445 additions and 386 deletions.
10 changes: 6 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.1.0'
ext.kotlin_version = '1.1.1'
repositories {
jcenter()
mavenCentral()
Expand All @@ -13,7 +13,7 @@ buildscript {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'me.tatarka:gradle-retrolambda:3.3.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
Expand All @@ -32,14 +32,16 @@ task clean(type: Delete) {
}

ext {
groupNameAndArtifactPrefix ='com.mateuszkoslacz.moviper:moviper-'

releaseVersionCode = 4
releaseVersionName = '1.3.0-alpha'
releaseVersionName = '1.5.0'

minSdkVersion = 16
targetSdkVersion = 25
compileSdkVersion = 25
buildToolsVersion = '25.0.2'
supportVersion = '25.1.1'
supportVersion = '25.3.0'
mosbyVersion = '2.0.1'
databindingVersion = '1.2.1'
rxJavaVersion = '1.2.3'
Expand Down
35 changes: 25 additions & 10 deletions moviper-butterknife-viewstate/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
apply plugin: 'com.android.library'
apply plugin: 'android-apt'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"

// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.releaseVersionCode
versionName rootProject.ext.releaseVersionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -25,13 +29,24 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
androidTestCompile "com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion", {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
}
compile "com.android.support:appcompat-v7:$rootProject.ext.supportVersion"
testCompile "junit:junit:$rootProject.ext.junitVersion"
compile 'com.jakewharton:butterknife:' + rootProject.ext.butterKnifeVersion
apt 'com.jakewharton:butterknife-compiler:' + rootProject.ext.butterKnifeVersion

compile project(path: ':moviper-viewstate')
}

def submoduleName = 'butterknife-viewstate'
def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"

install.repositories.mavenInstaller.pom.project {
name = projectFullName
description = 'Butterknife-Viewstate view extensions for Moviper'
}
bintray.pkg.name = projectFullName

apply from: '../upload.gradle'
39 changes: 27 additions & 12 deletions moviper-butterknife/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
apply plugin: 'com.android.library'
apply plugin: 'android-apt'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"

// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.releaseVersionCode
versionName rootProject.ext.releaseVersionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -25,13 +29,24 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
androidTestCompile "com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion", {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
testCompile 'junit:junit:4.12'
compile 'com.jakewharton:butterknife:' + rootProject.ext.butterKnifeVersion
apt 'com.jakewharton:butterknife-compiler:' + rootProject.ext.butterKnifeVersion
}
compile "com.android.support:appcompat-v7:$rootProject.ext.supportVersion"
testCompile "junit:junit:$rootProject.ext.junitVersion"
compile "com.jakewharton:butterknife:$rootProject.ext.butterKnifeVersion"
apt "com.jakewharton:butterknife-compiler:$rootProject.ext.butterKnifeVersion"

compile project(path: ':moviper-common')
}

def submoduleName = 'butterknife'
def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"

install.repositories.mavenInstaller.pom.project {
name = projectFullName
description = 'Butterknife view extensions for Moviper'
}
bintray.pkg.name = projectFullName

apply from: '../upload.gradle'
28 changes: 22 additions & 6 deletions moviper-callbacks/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"

// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.releaseVersionCode
versionName rootProject.ext.releaseVersionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -30,3 +35,14 @@ dependencies {

compile project(path: ':moviper-common')
}

def submoduleName = 'callbacks'
def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"

install.repositories.mavenInstaller.pom.project {
name = projectFullName
description = 'The callbacks Moviper flavor'
}
bintray.pkg.name = projectFullName

apply from: '../upload.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@

/**
* Created by lucas.urbas on 29/08/15.
* <p/>
* <p>
* Adapted and modified by mateuszkoslacz on 08.08.2016.
* <p/>
* <p>
* Base Interactor class. (see {@link ViperInteractor})
* <p/>
* <p>
* It's responsible for manipulating data on behalf of presenter, ie. saving data to db, getting
* data from remotes etc.
* <p/>
* <p>
* It provides Presenter reference to return data to it using callbacks.
* <p/>
* If you are looking for solution adopted to Rx approach, see {@link BaseRxInteractor}.
* <p>
* If you are looking for solution adopted to Rx approach, see BaseRxInteractor.
*/
public abstract class BaseInteractor<PresenterType extends ViperPresenterForInteractor>
implements ViperInteractor<PresenterType> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,13 @@

/**
* Created by mateuszkoslacz on 08.08.2016.
* <p/>
* <p>
* This is a base presenter class for callback VIPER concept. (see {@link MvpBasePresenter})
* <p/>
* <p>
* It contains the business logic of given VIPER screen. and references Interactor and Routing to
* delegate them data and framework specific tasks.
* <p/>
* You can use any Viper View with this class ({@link com.mateuszkoslacz.moviper.base.view.activity.ViperActivity},
* <br/> {@link com.mateuszkoslacz.moviper.base.view.activity.ViperLceActivity}, <br/> {@link
* com.mateuszkoslacz.moviper.base.view.activity.ViperViewStateActivity}, <br/> {@link
* com.mateuszkoslacz.moviper.base.view.activity.ViperLceViewStateActivity}, <br/> {@link
* com.mateuszkoslacz.moviper.base.view.fragment.ViperFragment}, <br/> {@link
* com.mateuszkoslacz.moviper.base.view.fragment.ViperLceFragment}, <br/> {@link
* com.mateuszkoslacz.moviper.base.view.fragment.ViperLceViewStateFragment}, <br/> {@link
* com.mateuszkoslacz.moviper.base.view.fragment.ViperViewStateFragment},)
* <p>
* You can use any Viper View with this class.
*/
public abstract class BasePresenter
<ViewType extends MvpView, // I prefer readability rather than conventions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* shared
* views, see {@link BaseViewHelperRouting}. If you are looking for solution adopted to Rx
* approach,
* see {@link BaseRxRouting}. If both, see {@link BaseViewHelperRxRouting}.
* see BaseRxRouting. If both, see BaseViewHelperRxRouting.
*/
public abstract class BaseRouting
<RelatedContext extends Context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@

/**
* Created by mateuszkoslacz on 08.08.2016 Based on lucas.urbas implementation.
* <p/>
* <p>
* It's responsible for manipulating data on behalf of presenter, ie. saving data to db, getting
* data from remotes etc.
* <p/>
* <p>
* It provides Presenter reference to return data to it using callbacks. If you are looking for
* solution adopted to Rx approach, see {@link ViperRxInteractor}.
* solution adopted to Rx approach, see ViperRxInteractor.
*/
public interface ViperInteractor<PresenterType extends ViperPresenterForInteractor>
extends CommonViperInteractor {
Expand All @@ -36,9 +36,9 @@ public interface ViperInteractor<PresenterType extends ViperPresenterForInteract
/**
* You can override this to perform an action on presenter attach (ie. set up the resources, delegates etc.).
* <b>Don't forget to call super!</b>
* <p/>
* <p>
* Attaches a presenter to this interactor. Will be called right after view is attached to the
* presenter. This method is invoked from {@link ViperPresenter#attachView(MvpView)}.
* presenter. This method is invoked from ViperPresenter#attachView(MvpView).
*/
void attach(PresenterType presenter);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/**
* Created by mateuszkoslacz on 09.08.2016.
* <p/>
* <p>
* It's used for getting Android Views (ImageView, TextView etc.) for Routing (see {@link
* ViperRouting}) to allow it perform Android Transitions with shared Views.
* <p/>
* <p>
* <b>You should NOT manipulate views given by ViewHelper in any way!</b>
*/
public interface ViperViewHelper {
Expand Down
28 changes: 22 additions & 6 deletions moviper-common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"

// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.releaseVersionCode
versionName rootProject.ext.releaseVersionName

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand All @@ -30,3 +35,14 @@ dependencies {
compile 'com.android.support:appcompat-v7:' + rootProject.ext.supportVersion
compile 'com.hannesdorfmann.mosby:mvp:' + rootProject.ext.mosbyVersion
}

def submoduleName = 'common'
def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"

install.repositories.mavenInstaller.pom.project {
name = projectFullName
description = 'The common Moviper module'
}
bintray.pkg.name = projectFullName

apply from: '../upload.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ public interface ViperPresenter<View extends MvpView> extends MvpPresenter<View>

/**
* Override this if you want to access your presenter using IPC Instance Presenters Access
* {@link Moviper#getPresenterInstance}.
* Moviper#getPresenterInstance.
* <p>
* If you create two presenters with the same name (not assuring that this method will return an
* unique name for each presenter) with the IPC Instance Presenters Access enabled, a {@link
* PresenterAlreadyRegisteredException} is thrown.
* unique name for each presenter) with the IPC Instance Presenters Access enabled, a
* PresenterAlreadyRegisteredException is thrown.
*
* @return name of this presenter. Default {@link ViperPresenter#DEFAULT_NAME}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
/**
* Created by mateuszkoslacz on 08.08.2016.
* <p>
* Interface used by Interactor ({@link ViperInteractor}) to communicate with Presenter ({@link
* Interface used by Interactor (ViperInteractor) to communicate with Presenter ({@link
* ViperPresenter}. There are mostly callbacks for displaying data from interactor, interactor's
* error messages etc.
*/
public interface ViperPresenterForInteractor<InteractorType extends CommonViperInteractor> {

/**
* @return attached {@link ViperInteractor}.
* @return attached ViperInteractor.
*/
@NonNull
InteractorType getInteractor();

/**
* Override this and return a instantiated Interactor object here.
*
* @return The {@link ViperInteractor} for this view
* @return The ViperInteractor for this view
*/
@NonNull
InteractorType createInteractor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@
/**
* Created by mateuszkoslacz on 08.08.2016.
* <p>
* Interface used by Routing ({@link ViperRouting}) to communicate with Presenter ({@link
* Interface used by Routing (ViperRouting) to communicate with Presenter ({@link
* ViperPresenter}). There are mostly callbacks for creating alarms, routing's error messages etc.
*/
public interface ViperPresenterForRouting<RoutingType extends CommonViperRouting> {

/**
* @return attached {@link ViperRouting}
* @return attached ViperRouting
*/
@NonNull
RoutingType getRouting();

/**
* Override this and return a instantiated Routing object here.
*
* @return The {@link ViperRouting} for this view
* @return The ViperRouting for this view
*/
@NonNull
RoutingType createRouting();
Expand Down
Loading

0 comments on commit 2880d71

Please sign in to comment.