diff --git a/build.gradle b/build.gradle index 41990f2..04c57dd 100644 --- a/build.gradle +++ b/build.gradle @@ -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() @@ -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 @@ -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' diff --git a/moviper-butterknife-viewstate/build.gradle b/moviper-butterknife-viewstate/build.gradle index bfa5e50..f9808e6 100644 --- a/moviper-butterknife-viewstate/build.gradle +++ b/moviper-butterknife-viewstate/build.gradle @@ -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" @@ -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' \ No newline at end of file diff --git a/moviper-butterknife/build.gradle b/moviper-butterknife/build.gradle index 1cd1d3f..2eb4170 100644 --- a/moviper-butterknife/build.gradle +++ b/moviper-butterknife/build.gradle @@ -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" @@ -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' diff --git a/moviper-callbacks/build.gradle b/moviper-callbacks/build.gradle index bf3825d..173905a 100644 --- a/moviper-callbacks/build.gradle +++ b/moviper-callbacks/build.gradle @@ -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" @@ -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' \ No newline at end of file diff --git a/moviper-callbacks/src/main/java/com/mateuszkoslacz/moviper/base/interactor/BaseInteractor.java b/moviper-callbacks/src/main/java/com/mateuszkoslacz/moviper/base/interactor/BaseInteractor.java index 9407583..23d6f32 100644 --- a/moviper-callbacks/src/main/java/com/mateuszkoslacz/moviper/base/interactor/BaseInteractor.java +++ b/moviper-callbacks/src/main/java/com/mateuszkoslacz/moviper/base/interactor/BaseInteractor.java @@ -11,17 +11,17 @@ /** * Created by lucas.urbas on 29/08/15. - *
+ ** Adapted and modified by mateuszkoslacz on 08.08.2016. - *
+ ** Base Interactor class. (see {@link ViperInteractor}) - *
+ ** It's responsible for manipulating data on behalf of presenter, ie. saving data to db, getting * data from remotes etc. - *
+ ** It provides Presenter reference to return data to it using callbacks. - *
- * If you are looking for solution adopted to Rx approach, see {@link BaseRxInteractor}. + *
+ * If you are looking for solution adopted to Rx approach, see BaseRxInteractor.
*/
public abstract class BaseInteractor
* This is a base presenter class for callback VIPER concept. (see {@link MvpBasePresenter})
- *
* It contains the business logic of given VIPER screen. and references Interactor and Routing to
* delegate them data and framework specific tasks.
- *
+ * You can use any Viper View with this class.
*/
public abstract class BasePresenter
* It's responsible for manipulating data on behalf of presenter, ie. saving data to db, getting
* data from remotes etc.
- *
* 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
* 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);
}
diff --git a/moviper-common-viewhelper/src/main/java/com/mateuszkoslacz/moviper/iface/viewhelper/ViperViewHelper.java b/moviper-common-viewhelper/src/main/java/com/mateuszkoslacz/moviper/iface/viewhelper/ViperViewHelper.java
index a6e6475..e97b471 100644
--- a/moviper-common-viewhelper/src/main/java/com/mateuszkoslacz/moviper/iface/viewhelper/ViperViewHelper.java
+++ b/moviper-common-viewhelper/src/main/java/com/mateuszkoslacz/moviper/iface/viewhelper/ViperViewHelper.java
@@ -2,10 +2,10 @@
/**
* Created by mateuszkoslacz on 09.08.2016.
- *
* It's used for getting Android Views (ImageView, TextView etc.) for Routing (see {@link
* ViperRouting}) to allow it perform Android Transitions with shared Views.
- *
* You should NOT manipulate views given by ViewHelper in any way!
*/
public interface ViperViewHelper {
diff --git a/moviper-common/build.gradle b/moviper-common/build.gradle
index caa4f4b..17405a9 100644
--- a/moviper-common/build.gradle
+++ b/moviper-common/build.gradle
@@ -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"
@@ -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'
diff --git a/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/presenter/ViperPresenter.java b/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/presenter/ViperPresenter.java
index acf50bf..ac80c0f 100644
--- a/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/presenter/ViperPresenter.java
+++ b/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/presenter/ViperPresenter.java
@@ -15,11 +15,11 @@ public interface ViperPresenter
* 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}
*/
diff --git a/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/presenter/interactor/ViperPresenterForInteractor.java b/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/presenter/interactor/ViperPresenterForInteractor.java
index 2b72951..7c9e4d4 100644
--- a/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/presenter/interactor/ViperPresenterForInteractor.java
+++ b/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/presenter/interactor/ViperPresenterForInteractor.java
@@ -8,14 +8,14 @@
/**
* Created by mateuszkoslacz on 08.08.2016.
*
- * 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
* It's used for providing Activity to the routing. Used in pair with {@link MvpView} in Moviper
* views.
*/
diff --git a/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/viewhelper/ViperViewHelper.java b/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/viewhelper/ViperViewHelper.java
index a6e6475..1f2e6db 100644
--- a/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/viewhelper/ViperViewHelper.java
+++ b/moviper-common/src/main/java/com/mateuszkoslacz/moviper/iface/viewhelper/ViperViewHelper.java
@@ -2,10 +2,10 @@
/**
* Created by mateuszkoslacz on 09.08.2016.
- *
+ * It's used for getting Android Views (ImageView, TextView etc.) for Routing (see
+ * ViperRouting) to allow it perform Android Transitions with shared Views.
+ *
* You should NOT manipulate views given by ViewHelper in any way!
*/
public interface ViperViewHelper {
diff --git a/moviper-databinding-viewstate/build.gradle b/moviper-databinding-viewstate/build.gradle
index ce69218..a9f709e 100644
--- a/moviper-databinding-viewstate/build.gradle
+++ b/moviper-databinding-viewstate/build.gradle
@@ -1,18 +1,21 @@
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
- dataBinding {
- enabled = true
- }
+ dataBinding.enabled = true
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"
@@ -27,11 +30,22 @@ 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 project(path: ':moviper-viewstate')
compile "com.android.databinding:library:$databindingVersion"
}
+
+def submoduleName = 'databinding-viewstate'
+def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"
+
+install.repositories.mavenInstaller.pom.project {
+ name = projectFullName
+ description = 'Databinding-viewstate view extensions for Moviper'
+}
+bintray.pkg.name = projectFullName
+
+apply from: '../upload.gradle'
\ No newline at end of file
diff --git a/moviper-databinding/build.gradle b/moviper-databinding/build.gradle
index 85501b9..b9d3d94 100644
--- a/moviper-databinding/build.gradle
+++ b/moviper-databinding/build.gradle
@@ -1,18 +1,21 @@
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
- dataBinding {
- enabled = true
- }
+ dataBinding.enabled = true
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"
@@ -27,11 +30,22 @@ 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 project(path: ':moviper-common')
compile "com.android.databinding:library:$databindingVersion"
}
+
+def submoduleName = 'databinding'
+def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"
+
+install.repositories.mavenInstaller.pom.project {
+ name = projectFullName
+ description = 'Databinding view extensions for Moviper'
+}
+bintray.pkg.name = projectFullName
+
+apply from: '../upload.gradle'
\ No newline at end of file
diff --git a/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/annotation/ExternalCall.java b/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/annotation/ExternalCall.java
index 848b8d2..450b30a 100644
--- a/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/annotation/ExternalCall.java
+++ b/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/annotation/ExternalCall.java
@@ -9,7 +9,7 @@
/**
* Created by mateuszkoslacz on 25.10.2016.
- *
* Annotates {@link ViperPresenter} method that is called from the outside of its VIPER screen using
* the {@link com.mateuszkoslacz.moviper.presenterbus.Moviper} presenters bundle access mechanism.
*/
diff --git a/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAccessFromPassiveView.java b/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAccessFromPassiveView.java
index 7ec59ed..6161da4 100644
--- a/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAccessFromPassiveView.java
+++ b/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAccessFromPassiveView.java
@@ -4,7 +4,7 @@
/**
* Created by mateuszkoslacz on 24.10.2016.
- *
*
* Thrown when a passive view tries to access a presenter.
*
diff --git a/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAlreadyRegisteredException.java b/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAlreadyRegisteredException.java
index bb6fa64..fd3d56c 100644
--- a/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAlreadyRegisteredException.java
+++ b/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAlreadyRegisteredException.java
@@ -4,7 +4,7 @@
/**
* Created by mateuszkoslacz on 24.10.2016.
- *
* Thrown when you have IPC Presenter Instance Access enabled and you try to create new Presenter
* with name that is already registered for its class. To avoid that you have to implement {@link
* ViperPresenter#getName()} in the way that returns an unique name for each instance of presenter
diff --git a/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterInstancesAccessNotEnabled.java b/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterInstancesAccessNotEnabled.java
index ac6df85..096d9dd 100644
--- a/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterInstancesAccessNotEnabled.java
+++ b/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterInstancesAccessNotEnabled.java
@@ -7,7 +7,7 @@
/**
* Created by mateuszkoslacz on 24.10.2016.
- *
* Thrown when you haven't enabled IPC Presenter Instance Access and you try to use it ({@link
* Moviper#getPresenterInstance(Class, String)}. To avoid that configure Moviper using {@link
* com.mateuszkoslacz.moviper.presenterbus.Moviper#setConfig(Config)} in {@link
diff --git a/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresentersAccessUtilNotEnabled.java b/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresentersAccessUtilNotEnabled.java
index f311c9e..992be15 100644
--- a/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresentersAccessUtilNotEnabled.java
+++ b/moviper-ipc/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresentersAccessUtilNotEnabled.java
@@ -7,7 +7,7 @@
/**
* Created by mateuszkoslacz on 24.10.2016.
- *
* Thrown when you haven't enabled IPC and you try to use it ({@link Moviper#getPresenters(Class)}.
* To avoid that configure Moviper using {@link Moviper#setConfig(Config)} in {@link
* Application#onCreate()} with {@link Config.Builder#withPresenterAccessUtilEnabled(boolean)} set
diff --git a/moviper-recyclerview-butterknife/build.gradle b/moviper-recyclerview-butterknife/build.gradle
index 3271665..dd0258a 100644
--- a/moviper-recyclerview-butterknife/build.gradle
+++ b/moviper-recyclerview-butterknife/build.gradle
@@ -1,16 +1,21 @@
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"
@@ -25,17 +30,26 @@ 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.2.0'
- testCompile 'junit:junit:4.12'
- 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.android.support:recyclerview-v7:25.1.0'
+ compile "com.android.support:recyclerview-v7:$rootProject.ext.supportVersion"
compile project(path: ':moviper-common')
compile 'com.jakewharton:butterknife:' + rootProject.ext.butterKnifeVersion
apt 'com.jakewharton:butterknife-compiler:' + rootProject.ext.butterKnifeVersion
compile project(path: ':moviper-recyclerview')
}
+
+def submoduleName = 'recyclerview-butterknife'
+def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"
+
+install.repositories.mavenInstaller.pom.project {
+ name = projectFullName
+ description = 'Recyclerview-Butterknife extensions for Moviper'
+}
+bintray.pkg.name = projectFullName
+
+apply from: '../upload.gradle'
\ No newline at end of file
diff --git a/moviper-recyclerview-databinding/build.gradle b/moviper-recyclerview-databinding/build.gradle
index 438656a..ce929c1 100644
--- a/moviper-recyclerview-databinding/build.gradle
+++ b/moviper-recyclerview-databinding/build.gradle
@@ -1,18 +1,21 @@
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
- dataBinding {
- enabled = true
- }
+ dataBinding.enabled = true
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"
@@ -27,12 +30,25 @@ 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.2.0'
- testCompile 'junit:junit:4.12'
+ compile "com.android.support:appcompat-v7:$rootProject.ext.supportVersion"
+ testCompile "junit:junit:$rootProject.ext.junitVersion"
+
+ compile "com.android.support:recyclerview-v7:$rootProject.ext.supportVersion"
compile "com.android.databinding:library:$databindingVersion"
compile project(path: ':moviper-recyclerview')
}
+
+def submoduleName = 'recyclerview-databinding'
+def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"
+
+install.repositories.mavenInstaller.pom.project {
+ name = projectFullName
+ description = 'Recyclerview-Databinding extensions for Moviper'
+}
+bintray.pkg.name = projectFullName
+
+apply from: '../upload.gradle'
\ No newline at end of file
diff --git a/moviper-recyclerview/build.gradle b/moviper-recyclerview/build.gradle
index f7ebd7a..5f612c2 100644
--- a/moviper-recyclerview/build.gradle
+++ b/moviper-recyclerview/build.gradle
@@ -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"
@@ -23,12 +28,23 @@ 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.android.support:recyclerview-v7:25.1.0'
+ compile "com.android.support:recyclerview-v7:$rootProject.ext.supportVersion"
compile project(path: ':moviper-common')
}
+
+def submoduleName = 'recyclerview'
+def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"
+
+install.repositories.mavenInstaller.pom.project {
+ name = projectFullName
+ description = 'Recyclerview extensions for Moviper'
+}
+bintray.pkg.name = projectFullName
+
+apply from: '../upload.gradle'
\ No newline at end of file
diff --git a/moviper-recyclerview/src/main/java/com/mateuszkoslacz/moviper/iface/view/MvpDataView.java b/moviper-recyclerview/src/main/java/com/mateuszkoslacz/moviper/iface/view/MvpDataView.java
index a5dd0a9..ff053ea 100644
--- a/moviper-recyclerview/src/main/java/com/mateuszkoslacz/moviper/iface/view/MvpDataView.java
+++ b/moviper-recyclerview/src/main/java/com/mateuszkoslacz/moviper/iface/view/MvpDataView.java
@@ -4,7 +4,7 @@
/**
* Created by mateuszkoslacz on 01.12.2016.
- *
* The root view interface for every MVP ViewHolder
*/
diff --git a/moviper-recyclerview/src/main/java/com/mateuszkoslacz/moviper/iface/view/ViperDataView.java b/moviper-recyclerview/src/main/java/com/mateuszkoslacz/moviper/iface/view/ViperDataView.java
index 1bb81b2..0eb132f 100644
--- a/moviper-recyclerview/src/main/java/com/mateuszkoslacz/moviper/iface/view/ViperDataView.java
+++ b/moviper-recyclerview/src/main/java/com/mateuszkoslacz/moviper/iface/view/ViperDataView.java
@@ -4,7 +4,7 @@
/**
* Created by mateuszkoslacz on 01.12.2016.
- *
* The root view interface for every VIPER ViewHolder.
* It shall not be used in Contract.
*/
diff --git a/moviper-rx/build.gradle b/moviper-rx/build.gradle
index 9c84490..1080152 100644
--- a/moviper-rx/build.gradle
+++ b/moviper-rx/build.gradle
@@ -1,22 +1,25 @@
apply plugin: 'com.android.library'
apply plugin: 'me.tatarka.retrolambda'
+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
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
-
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"
@@ -39,3 +42,14 @@ dependencies {
compile 'io.reactivex:rxjava:' + rootProject.ext.rxJavaVersion
}
+
+def submoduleName = 'rx'
+def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"
+
+install.repositories.mavenInstaller.pom.project {
+ name = projectFullName
+ description = 'The rx Moviper flavour'
+}
+bintray.pkg.name = projectFullName
+
+apply from: '../upload.gradle'
\ No newline at end of file
diff --git a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/annotation/ExternalCall.java b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/annotation/ExternalCall.java
index 848b8d2..450b30a 100644
--- a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/annotation/ExternalCall.java
+++ b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/annotation/ExternalCall.java
@@ -9,7 +9,7 @@
/**
* Created by mateuszkoslacz on 25.10.2016.
- *
* Annotates {@link ViperPresenter} method that is called from the outside of its VIPER screen using
* the {@link com.mateuszkoslacz.moviper.presenterbus.Moviper} presenters bundle access mechanism.
*/
diff --git a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAccessFromPassiveView.java b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAccessFromPassiveView.java
index 7ec59ed..6161da4 100644
--- a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAccessFromPassiveView.java
+++ b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAccessFromPassiveView.java
@@ -4,7 +4,7 @@
/**
* Created by mateuszkoslacz on 24.10.2016.
- *
*
* Thrown when a passive view tries to access a presenter.
*
diff --git a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAlreadyRegisteredException.java b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAlreadyRegisteredException.java
index bb6fa64..fd3d56c 100644
--- a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAlreadyRegisteredException.java
+++ b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterAlreadyRegisteredException.java
@@ -4,7 +4,7 @@
/**
* Created by mateuszkoslacz on 24.10.2016.
- *
* Thrown when you have IPC Presenter Instance Access enabled and you try to create new Presenter
* with name that is already registered for its class. To avoid that you have to implement {@link
* ViperPresenter#getName()} in the way that returns an unique name for each instance of presenter
diff --git a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterInstancesAccessNotEnabled.java b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterInstancesAccessNotEnabled.java
index 5b2188a..578b674 100644
--- a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterInstancesAccessNotEnabled.java
+++ b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresenterInstancesAccessNotEnabled.java
@@ -7,7 +7,7 @@
/**
* Created by mateuszkoslacz on 24.10.2016.
- *
* Thrown when you haven't enabled IPC Presenter Instance Access and you try to use it ({@link
* Moviper#getPresenterInstance(Class, String)}. To avoid that configure Moviper using {@link
* Moviper#setConfig(Config)} in {@link
diff --git a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresentersAccessUtilNotEnabled.java b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresentersAccessUtilNotEnabled.java
index f311c9e..992be15 100644
--- a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresentersAccessUtilNotEnabled.java
+++ b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/exception/PresentersAccessUtilNotEnabled.java
@@ -7,7 +7,7 @@
/**
* Created by mateuszkoslacz on 24.10.2016.
- *
* Thrown when you haven't enabled IPC and you try to use it ({@link Moviper#getPresenters(Class)}.
* To avoid that configure Moviper using {@link Moviper#setConfig(Config)} in {@link
* Application#onCreate()} with {@link Config.Builder#withPresenterAccessUtilEnabled(boolean)} set
diff --git a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/interactor/BaseRxInteractor.java b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/interactor/BaseRxInteractor.java
index ed550b6..120ca1a 100644
--- a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/interactor/BaseRxInteractor.java
+++ b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/interactor/BaseRxInteractor.java
@@ -5,14 +5,14 @@
/**
* Created by lucas.urbas on 29/08/15.
- *
* Adapted and modified by mateuszkoslacz on 21.10.2016.
- *
+ * Base Interactor class. (see ViperInteractor)
+ *
* It's responsible for manipulating data on behalf of presenter, ie. saving data to db, getting
* data from remotes etc.
- *
* It has no Presenter reference as it should return Observables to asynchronously pass data to
* Presenter. If you are looking for solution adopted to regular, non-Rx approach, see {@link
* BaseRxInteractor}.
diff --git a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/presenter/BaseRxPresenter.java b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/presenter/BaseRxPresenter.java
index 98815b7..0071282 100644
--- a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/presenter/BaseRxPresenter.java
+++ b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/presenter/BaseRxPresenter.java
@@ -18,20 +18,13 @@
/**
* Created by mateuszkoslacz on 08.08.2016.
- *
* This is a base presenter class for rx VIPER concept. (see {@link MvpBasePresenter})
- *
* It contains the business logic of given VIPER screen and references Interactor and Routing to
* delegate them data and framework specific tasks.
- *
+ * You can use any Viper View with this class.
*/
public abstract class BaseRxPresenter
* It's responsible for performing all platform-specific tasks in behalf of presenter, ie. starting
* a new Activity, a new Service, scheduling alarms etc.
diff --git a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/routing/BaseViewHelperRxRouting.java b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/routing/BaseViewHelperRxRouting.java
index 42e7961..995570d 100644
--- a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/routing/BaseViewHelperRxRouting.java
+++ b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/base/routing/BaseViewHelperRxRouting.java
@@ -17,8 +17,8 @@
* It's also responsible of UI changes outside of given view, ie. Fragment presenter uses this
* routing for switching Fragments in parent Activity.
*
- * It also provides Android Views to use in Android Transaction with shared views, see {@link
- * BaseViewHelperRouting}
+ * It also provides Android Views to use in Android Transaction with shared views, see
+ * BaseViewHelperRouting../
*/
public abstract class BaseViewHelperRxRouting
* It's responsible of manipulating data on behalf of Presenter (see {@link ViperPresenter}), ie. saving data to db, getting
* data from remotes etc.
- *
* It has no Presenter reference as it should return Observables to asynchronously pass data to
* Presenter. If you are looking for solution adopted to regular, non-Rx approach, see {@link
* BaseRxInteractor}.
@@ -19,7 +19,7 @@ public interface ViperRxInteractor extends CommonViperInteractor {
/**
* You can override this to perform an action on presenter attach (ie. set up the resources,
* delegates etc.). Don't forget to call super!
- *
* Moviper implementation does nothing, but it's here to allow you perform initialization
* actions on presenter attach This method is invoked from {@link
* ViperPresenter#attachView(MvpView)}.
diff --git a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/iface/routing/ViperRxRouting.java b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/iface/routing/ViperRxRouting.java
index ca55dd0..0ef99a8 100644
--- a/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/iface/routing/ViperRxRouting.java
+++ b/moviper-rx/src/main/java/com/mateuszkoslacz/moviper/iface/routing/ViperRxRouting.java
@@ -19,7 +19,7 @@
* scheduling, Services creating etc. for better separation of concepts.
*
* If you are looking for solution providing Android Views to use in Android Transaction with shared
- * views, see {@link ViperViewHelperRouting}
+ * views, see ViperViewHelperRouting
*/
public interface ViperRxRouting
- * It's a Routing ({@link ViperRouting}) that also provides a ViewHelper (see {@link
+ * It's a Routing (ViperRouting) that also provides a ViewHelper (see {@link
* ViperViewHelper}), which is responsible for providing Android Views (ImageView, TextView etc.) to
* allow performing Android Transitions with shared Views.
*/
diff --git a/moviper-service/build.gradle b/moviper-service/build.gradle
index d5624f4..e45ee1c 100644
--- a/moviper-service/build.gradle
+++ b/moviper-service/build.gradle
@@ -1,19 +1,11 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"
-apply plugin: 'me.tatarka.retrolambda'
-apply plugin: 'android-apt'
// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName
android {
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
@@ -21,7 +13,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode rootProject.ext.releaseVersionCode
- versionName version
+ versionName rootProject.ext.releaseVersionName
}
buildTypes {
release {
@@ -41,107 +33,16 @@ dependencies {
compile 'com.hannesdorfmann.mosby:mvp:' + rootProject.ext.mosbyVersion
compile 'com.hannesdorfmann.mosby:viewstate:' + rootProject.ext.mosbyVersion
- // TODO: probably should split to two flavours to avoid
- // including rxJava in projects that don't use rx
- compile 'io.reactivex:rxjava:' + rootProject.ext.rxJavaVersion
-
- compile 'com.jakewharton:butterknife:' + rootProject.ext.butterKnifeVersion
- apt 'com.jakewharton:butterknife-compiler:' + rootProject.ext.butterKnifeVersion
-
compile project(path: ':moviper-common')
-
-
-}
-
-
-def siteUrl = 'https://github.com/mkoslacz/Moviper' // Homepage URL of the library
-def gitUrl = 'https://github.com/mkoslacz/Moviper.git' // Git repository URL
-group = "com.mateuszkoslacz.moviper" // Maven Group ID for the artifact
-
-install {
- repositories.mavenInstaller {
- // This generates POM.xml with proper parameters
- pom {
- project {
- packaging 'aar'
-
- // Add your description here
- name 'com.mateuszkoslacz.moviper:moviper'
- description = 'A Mosby based VIPER library for Android'
- url siteUrl
-
- // Set your license
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- }
- }
- developers {
- developer {
- id 'mkoslacz'
- name 'Mateusz Koslacz'
- email 'mateusz.koslacz@gmail.com'
- }
- }
- scm {
- connection gitUrl
- developerConnection gitUrl
- url siteUrl
- }
- }
- }
- }
}
-task sourcesJar(type: Jar) {
- from android.sourceSets.main.java.srcDirs
- classifier = 'sources'
-}
+def submoduleName = 'service'
+def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"
-task javadoc(type: Javadoc) {
- source = android.sourceSets.main.java.srcDirs
- classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
+install.repositories.mavenInstaller.pom.project {
+ name = projectFullName
+ description = 'Service extensions for Moviper'
}
+bintray.pkg.name = projectFullName
-afterEvaluate {
- javadoc.classpath += files(android.libraryVariants.collect { variant ->
- variant.javaCompile.classpath.files
- })
-}
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
-}
-artifacts {
- archives javadocJar
- archives sourcesJar
-}
-
-Properties properties = new Properties()
-properties.load(project.rootProject.file('local.properties').newDataInputStream())
-
-// https://github.com/bintray/gradle-bintray-plugin
-bintray {
- user = properties.getProperty("bintray.user")
- key = properties.getProperty("bintray.apikey")
-
- configurations = ['archives']
- pkg {
- repo = "Moviper"
- // it is the name that appears in bintray when logged
- name = "com.mateuszkoslacz.moviper"
- websiteUrl = siteUrl
- vcsUrl = gitUrl
- licenses = ["Apache-2.0"]
- publish = true
- version {
- gpg {
- sign = true //Determines whether to GPG sign the files. The default is false
- passphrase = properties.getProperty("bintray.gpg.password")
- //Optional. The passphrase for GPG signing'
- }
- }
- }
-}
+apply from: '../upload.gradle'
\ No newline at end of file
diff --git a/moviper-test/build.gradle b/moviper-test/build.gradle
index 5157a17..087e157 100644
--- a/moviper-test/build.gradle
+++ b/moviper-test/build.gradle
@@ -1,7 +1,7 @@
apply plugin: 'com.android.library'
+apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: "com.jfrog.bintray"
-apply plugin: 'me.tatarka.retrolambda'
// This is the library version used when deploying the artifact
version = rootProject.ext.releaseVersionName
@@ -14,6 +14,7 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
+
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
@@ -44,96 +45,13 @@ dependencies {
compile project(path: ':moviper-recyclerview') // TODO to be splitted!
}
+def submoduleName = 'test-utils'
+def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"
-
-def siteUrl = 'https://github.com/mkoslacz/Moviper' // Homepage URL of the library
-def gitUrl = 'https://github.com/mkoslacz/Moviper.git' // Git repository URL
-group = "com.mateuszkoslacz.moviper" // Maven Group ID for the artifact
-
-install {
- repositories.mavenInstaller {
- // This generates POM.xml with proper parameters
- pom {
- project {
- packaging 'aar'
-
- // Add your description here
- name 'com.mateuszkoslacz.moviper:moviper-test-utils'
- description = 'A test utils library for Moviper'
- url siteUrl
-
- // Set your license
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- }
- }
- developers {
- developer {
- id 'mkoslacz'
- name 'Mateusz Koslacz'
- email 'mateusz.koslacz@gmail.com'
- }
- }
- scm {
- connection gitUrl
- developerConnection gitUrl
- url siteUrl
- }
- }
- }
- }
-}
-
-task sourcesJar(type: Jar) {
- from android.sourceSets.main.java.srcDirs
- classifier = 'sources'
-}
-
-task javadoc(type: Javadoc) {
- source = android.sourceSets.main.java.srcDirs
- classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
-}
-
-afterEvaluate {
- javadoc.classpath += files(android.libraryVariants.collect { variant ->
- variant.javaCompile.classpath.files
- })
-}
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
+install.repositories.mavenInstaller.pom.project {
+ name = projectFullName
+ description = 'The test utils for Moviper'
}
-artifacts {
- archives javadocJar
- archives sourcesJar
-}
-
-Properties properties = new Properties()
-properties.load(project.rootProject.file('local.properties').newDataInputStream())
-
-// https://github.com/bintray/gradle-bintray-plugin
-bintray {
- user = properties.getProperty("bintray.user")
- key = properties.getProperty("bintray.apikey")
+bintray.pkg.name = projectFullName
- configurations = ['archives']
- pkg {
- repo = "Moviper"
- // it is the name that appears in bintray when logged
- name = "com.mateuszkoslacz.moviper:moviper-test-utils"
- websiteUrl = siteUrl
- vcsUrl = gitUrl
- licenses = ["Apache-2.0"]
- publish = true
- version {
- gpg {
- sign = true //Determines whether to GPG sign the files. The default is false
- passphrase = properties.getProperty("bintray.gpg.password")
- //Optional. The passphrase for GPG signing'
- }
- }
- }
-}
+apply from: '../upload.gradle'
diff --git a/moviper-viewstate/build.gradle b/moviper-viewstate/build.gradle
index 9fb1c9b..44f4421 100644
--- a/moviper-viewstate/build.gradle
+++ b/moviper-viewstate/build.gradle
@@ -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"
@@ -23,11 +28,22 @@ 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.hannesdorfmann.mosby:viewstate:' + rootProject.ext.mosbyVersion
compile project(path: ':moviper-common')
compile 'com.android.support:appcompat-v7:' + rootProject.ext.supportVersion
- testCompile 'junit:junit:4.12'
+ testCompile "junit:junit:$rootProject.ext.junitVersion"
}
+
+def submoduleName = 'viewstate'
+def projectFullName = "$rootProject.ext.groupNameAndArtifactPrefix$submoduleName"
+
+install.repositories.mavenInstaller.pom.project {
+ name = projectFullName
+ description = 'Viewstate view extensions for Moviper'
+}
+bintray.pkg.name = projectFullName
+
+apply from: '../upload.gradle'
diff --git a/upload.gradle b/upload.gradle
new file mode 100644
index 0000000..c9945d5
--- /dev/null
+++ b/upload.gradle
@@ -0,0 +1,87 @@
+
+def siteUrl = 'https://github.com/mkoslacz/Moviper' // Homepage URL of the library
+def gitUrl = 'https://github.com/mkoslacz/Moviper.git' // Git repository URL
+group = "com.mateuszkoslacz.moviper" // Maven Group ID for the artifact
+
+install {
+ repositories.mavenInstaller {
+ // This generates POM.xml with proper parameters
+ pom {
+ project {
+ packaging 'aar'
+ // Add your description here
+ url siteUrl
+
+ // Set your license
+ licenses {
+ license {
+ name 'The Apache Software License, Version 2.0'
+ url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ }
+ }
+ developers {
+ developer {
+ id 'mkoslacz'
+ name 'Mateusz Koslacz'
+ email 'mateusz.koslacz@gmail.com'
+ }
+ }
+ scm {
+ connection gitUrl
+ developerConnection gitUrl
+ url siteUrl
+ }
+ }
+ }
+ }
+}
+
+task sourcesJar(type: Jar) {
+ from android.sourceSets.main.java.srcDirs
+ classifier = 'sources'
+}
+
+task javadoc(type: Javadoc) {
+ source = android.sourceSets.main.java.srcDirs
+ classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
+}
+
+afterEvaluate {
+ javadoc.classpath += files(android.libraryVariants.collect { variant ->
+ variant.javaCompile.classpath.files
+ })
+}
+
+task javadocJar(type: Jar, dependsOn: javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
+}
+artifacts {
+ archives javadocJar
+ archives sourcesJar
+}
+
+Properties properties = new Properties()
+properties.load(project.rootProject.file('local.properties').newDataInputStream())
+
+// https://github.com/bintray/gradle-bintray-plugin
+bintray {
+ user = properties.getProperty("bintray.user")
+ key = properties.getProperty("bintray.apikey")
+
+ configurations = ['archives']
+ pkg {
+ repo = "Moviper"
+ websiteUrl = siteUrl
+ vcsUrl = gitUrl
+ licenses = ["Apache-2.0"]
+ publish = true
+ version {
+ gpg {
+ sign = true //Determines whether to GPG sign the files. The default is false
+ passphrase = properties.getProperty("bintray.gpg.password")
+ //Optional. The passphrase for GPG signing'
+ }
+ }
+ }
+}
{@link com.mateuszkoslacz.moviper.base.view.activity.ViperLceActivity},
{@link
- * com.mateuszkoslacz.moviper.base.view.activity.ViperViewStateActivity},
{@link
- * com.mateuszkoslacz.moviper.base.view.activity.ViperLceViewStateActivity},
{@link
- * com.mateuszkoslacz.moviper.base.view.fragment.ViperFragment},
{@link
- * com.mateuszkoslacz.moviper.base.view.fragment.ViperLceFragment},
{@link
- * com.mateuszkoslacz.moviper.base.view.fragment.ViperLceViewStateFragment},
{@link
- * com.mateuszkoslacz.moviper.base.view.fragment.ViperViewStateFragment},)
+ *
{@link com.mateuszkoslacz.moviper.base.view.activity.ViperLceActivity},
{@link
- * com.mateuszkoslacz.moviper.base.view.activity.ViperViewStateActivity},
{@link
- * com.mateuszkoslacz.moviper.base.view.activity.ViperLceViewStateActivity},
{@link
- * com.mateuszkoslacz.moviper.base.view.fragment.ViperFragment},
{@link
- * com.mateuszkoslacz.moviper.base.view.fragment.ViperLceFragment},
{@link
- * com.mateuszkoslacz.moviper.base.view.fragment.ViperLceViewStateFragment},
{@link
- * com.mateuszkoslacz.moviper.base.view.fragment.ViperViewStateFragment},)
+ *