Skip to content

Commit

Permalink
Merge pull request #13 from Omega-R/feature/incremental_compilation
Browse files Browse the repository at this point in the history
Gradle updated; IncrementalAnnotationProcessor annotation added
  • Loading branch information
anton-knyazev authored Oct 9, 2019
2 parents 1808aec + 9aeb0ae commit 9f891ef
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 19 deletions.
31 changes: 18 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
Expand All @@ -24,20 +24,25 @@ allprojects {
ext {
targetVersionCode = 46
targetVersionName = "1.5.6"
kotlin_version = '1.3.41'
kotlin_version = '1.3.50'
def autoServiceVersion = '1.0-rc5'
def gradleIncapHelperVersion = '0.2'

deps = [
android : 'com.google.android:android:1.6_r2',
javapoet : 'com.squareup:javapoet:1.10.0',
junit : 'junit:junit:4.12',
mockito : 'org.mockito:mockito-core:1.10.19',
truth : 'com.google.truth:truth:0.34',
robolectric : 'org.robolectric:robolectric:3.0',
compiletesting: 'com.google.testing.compile:compile-testing:0.15',
asm : ['org.ow2.asm:asm:6.0', 'org.ow2.asm:asm-util:6.0'],
autoservice : 'com.google.auto.service:auto-service:1.0-rc4',
autocommon : 'com.google.auto:auto-common:0.10',
guava : 'com.google.guava:guava:21.0',
android : 'com.google.android:android:1.6_r2',
javapoet : 'com.squareup:javapoet:1.10.0',
junit : 'junit:junit:4.12',
mockito : 'org.mockito:mockito-core:1.10.19',
truth : 'com.google.truth:truth:0.34',
robolectric : 'org.robolectric:robolectric:3.0',
compiletesting : 'com.google.testing.compile:compile-testing:0.15',
asm : ['org.ow2.asm:asm:6.0', 'org.ow2.asm:asm-util:6.0'],
autoservice : "com.google.auto.service:auto-service:$autoServiceVersion",
autoserviceAnnotations : "com.google.auto.service:auto-service-annotations:$autoServiceVersion",
autocommon : 'com.google.auto:auto-common:0.10',
guava : 'com.google.guava:guava:21.0',
gradleIncapHelperAnnotations: "net.ltgt.gradle.incap:incap:$gradleIncapHelperVersion",
gradleIncapHelperProcessor : "net.ltgt.gradle.incap:incap-processor:$gradleIncapHelperVersion"
]
}

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Mar 21 17:43:47 MSK 2019
#Wed Oct 09 11:52:42 MSK 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
2 changes: 1 addition & 1 deletion moxy-androidx-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ android {
}

dependencies {
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation project(':moxy')
implementation project(':moxy-androidx')
kapt project(':moxy-compiler')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package example.com.moxy_androidx_sample;

import com.omegar.mvp.MvpView;
import com.omegar.mvp.viewstate.strategy.AddToEndSingleStrategy;
import com.omegar.mvp.viewstate.strategy.StateStrategyType;

@StateStrategyType(AddToEndSingleStrategy.class)
public interface BaseView extends MvpView {

void testFunction();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
package example.com.moxy_androidx_sample.fifth;

import com.omegar.mvp.viewstate.strategy.AddToEndSingleStrategy;
import com.omegar.mvp.viewstate.strategy.StateStrategyType;

import example.com.moxy_androidx_sample.fourth.FourthView;

public interface Contract {

@StateStrategyType(AddToEndSingleStrategy.class)
interface FifthView extends FourthView<String> {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

import android.location.Location;

import com.omegar.mvp.viewstate.strategy.AddToEndSingleStrategy;
import com.omegar.mvp.viewstate.strategy.StateStrategyType;

import java.util.List;

import example.com.moxy_androidx_sample.BaseView;
import example.com.moxy_androidx_sample.third.ThirdView;

@StateStrategyType(AddToEndSingleStrategy.class)
public interface FirstView<M> extends BaseView, ThirdView {

void firstMethod(List<M> item);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package example.com.moxy_androidx_sample.fourth

import com.omegar.mvp.viewstate.strategy.AddToEndSingleStrategy
import com.omegar.mvp.viewstate.strategy.StateStrategyType
import example.com.moxy_androidx_sample.BaseView

@StateStrategyType(AddToEndSingleStrategy::class)
interface FourthView<R> : BaseView {

fun fourth(item: R)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package example.com.moxy_androidx_sample.second;

import com.omegar.mvp.viewstate.strategy.AddToEndSingleStrategy;
import com.omegar.mvp.viewstate.strategy.StateStrategyType;

import example.com.moxy_androidx_sample.BaseView;

@StateStrategyType(AddToEndSingleStrategy.class)
public interface SecondView extends BaseView {

void secondMethod();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package example.com.moxy_androidx_sample.third;

import com.omegar.mvp.viewstate.strategy.AddToEndSingleStrategy;
import com.omegar.mvp.viewstate.strategy.StateStrategyType;

import example.com.moxy_androidx_sample.BaseView;

@StateStrategyType(AddToEndSingleStrategy.class)
public interface ThirdView extends BaseView {

void thirdMethod();
Expand Down
5 changes: 4 additions & 1 deletion moxy-compiler/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,11 @@ dependencies {
implementation deps.javapoet

compileOnly deps.autocommon
compileOnly deps.autoservice
compileOnly deps.autoserviceAnnotations
annotationProcessor deps.autoservice
compileOnly deps.guava
compileOnly deps.gradleIncapHelperAnnotations
annotationProcessor deps.gradleIncapHelperProcessor

javadocDeps project(':moxy')
javadocDeps deps.javapoet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
import com.omegar.mvp.presenter.InjectPresenter;
import com.squareup.javapoet.JavaFile;

import net.ltgt.gradle.incap.IncrementalAnnotationProcessor;
import net.ltgt.gradle.incap.IncrementalAnnotationProcessorType;

import java.io.IOException;
import java.lang.annotation.Annotation;
import java.util.ArrayList;
Expand All @@ -22,8 +25,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Messager;
Expand All @@ -50,6 +51,7 @@

@SuppressWarnings("unused")
@AutoService(Processor.class)
@IncrementalAnnotationProcessor(IncrementalAnnotationProcessorType.AGGREGATING)
public class MvpCompiler extends AbstractProcessor {
public static final String MOXY_REFLECTOR_DEFAULT_PACKAGE = "com.omegar.mvp";

Expand Down

0 comments on commit 9f891ef

Please sign in to comment.