diff --git a/CHANGELOG.md b/CHANGELOG.md index 673f829959..b139014976 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 4.4.0 (Feb 18, 2021) +- Support for Paging3 (#1126) (Thanks to @osipxd and @anhanh11001!) +-Update KotlinPoet to 1.7.2 (#1117) + # 4.3.1 (Dec 2, 2020) - Fix ANR and view pool resolution in nested group (#1101) diff --git a/blessedDeps.gradle b/blessedDeps.gradle index a5db041670..54085e1a92 100644 --- a/blessedDeps.gradle +++ b/blessedDeps.gradle @@ -32,16 +32,16 @@ rootProject.ext.ANDROIDX_VERSIONED_PARCELABLE = "1.0.0" rootProject.ext.ANDROID_DATA_BINDING = "1.3.1" rootProject.ext.ANDROID_ARCH_TESTING = "1.1.1" rootProject.ext.ANDROID_TEST_RUNNER = "1.0.2" -rootProject.ext.SQUARE_JAVAPOET_VERSION = "1.11.1" +rootProject.ext.SQUARE_JAVAPOET_VERSION = "1.13.0" rootProject.ext.SQUARE_KOTLINPOET_VERSION = "1.7.2" rootProject.ext.KOTLIN_COROUTINES_VERSION = "1.3.9" rootProject.ext.KOTLIN_COROUTINES_TEST_VERSION = "1.4.1" rootProject.ext.GLIDE_VERSION = "4.9.0" rootProject.ext.ASSERTJ_VERSION = "1.7.1" -rootProject.ext.GOOGLE_TESTING_COMPILE_VERSION = "0.18" -rootProject.ext.JUNIT_VERSION = "4.12" -rootProject.ext.MOCKITO_VERSION = "3.5.10" +rootProject.ext.GOOGLE_TESTING_COMPILE_VERSION = "0.19" +rootProject.ext.JUNIT_VERSION = "4.13.1" +rootProject.ext.MOCKITO_VERSION = "3.7.7" rootProject.ext.ROBOLECTRIC_VERSION = "4.4" rootProject.ext.LOTTIE_VERSION = "2.8.0" @@ -51,7 +51,7 @@ rootProject.ext.ANDROID_RUNTIME_VERSION = "4.1.1.4" rootProject.ext.PARIS_VERSION = "1.7.1" -rootProject.ext.INCAP_VERSION = "0.2" +rootProject.ext.INCAP_VERSION = "0.3" rootProject.ext.deps = [ kotlin : "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$KOTLIN_VERSION", diff --git a/build.gradle b/build.gradle index ce538601f6..d022e4c0f8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.KOTLIN_VERSION = "1.4.20" - ext.ANDROID_PLUGIN_VERSION = '4.1.1' + ext.KOTLIN_VERSION = "1.4.30" + ext.ANDROID_PLUGIN_VERSION = '4.1.2' repositories { google() diff --git a/epoxy-processor/build.gradle b/epoxy-processor/build.gradle index 305cd5b82e..0516dd6765 100644 --- a/epoxy-processor/build.gradle +++ b/epoxy-processor/build.gradle @@ -22,7 +22,7 @@ dependencies { implementation deps.squareJavaPoet implementation deps.squareKotlinPoet implementation deps.androidAnnotations - implementation "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.1.0" + implementation "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.2.0" implementation rootProject.deps.kotlinCoroutines /** Provides the sun javac tools for looking up the R class trees. */ diff --git a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ControllerProcessor.kt b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ControllerProcessor.kt index b543d9687d..05bd028680 100644 --- a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ControllerProcessor.kt +++ b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ControllerProcessor.kt @@ -84,10 +84,10 @@ class ControllerProcessor : BaseProcessorWithPackageConfigs() { } val otherControllerModelFields: Set = controllerInfo.modelsImmutable if (Utils.belongToTheSamePackage( - thisClass, - otherClass, - elementUtils - ) + thisClass, + otherClass, + elementUtils + ) ) { value.addModels(otherControllerModelFields) } else { diff --git a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/EpoxyProcessor.kt b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/EpoxyProcessor.kt index 00d45fcda9..7e2518ff08 100644 --- a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/EpoxyProcessor.kt +++ b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/EpoxyProcessor.kt @@ -140,8 +140,8 @@ class EpoxyProcessor : BaseProcessorWithPackageConfigs() { } if (configManager.requiresAbstractModels(classElement) && !classElement.modifiersThreadSafe.contains( - Modifier.ABSTRACT - ) + Modifier.ABSTRACT + ) ) { logger .logError( diff --git a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/GeneratedModelInfo.kt b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/GeneratedModelInfo.kt index 8f812fb5e3..3a0e03d65f 100644 --- a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/GeneratedModelInfo.kt +++ b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/GeneratedModelInfo.kt @@ -180,8 +180,8 @@ abstract class GeneratedModelInfo(val memoizer: Memoizer) { for (attribute in attributes) { if (attribute.isRequired || attribute.codeToSetDefault.isEmpty && !hasDefaultKotlinValue( - attribute - ) + attribute + ) ) { continue } diff --git a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/GeneratedModelWriter.kt b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/GeneratedModelWriter.kt index c42c2d2845..fefc5d7383 100644 --- a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/GeneratedModelWriter.kt +++ b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/GeneratedModelWriter.kt @@ -1203,11 +1203,11 @@ class GeneratedModelWriter( // If the base method is already implemented don't bother checking for the payload method if (implementsMethod( - info.superClassElement, - bindVariablesMethod, - types, - elements - ) + info.superClassElement, + bindVariablesMethod, + types, + elements + ) ) { return emptyList() } @@ -1682,7 +1682,7 @@ class GeneratedModelWriter( .addStatement( attribute.setterCode(), if (hasMultipleParams) - (attribute as MultiParamAttribute).valueToSetOnAttribute + (attribute as MultiParamAttribute).valueToSetOnAttribute else paramName ) diff --git a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Memoizer.kt b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Memoizer.kt index 31767e9216..18b49487f0 100644 --- a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Memoizer.kt +++ b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Memoizer.kt @@ -87,10 +87,10 @@ class Memoizer( val methodReturnType = (subElement.asType() as ExecutableType).returnType if (methodReturnType != classType && !isSubtype( - classType, - methodReturnType, - types - ) + classType, + methodReturnType, + types + ) ) { return@mapNotNull null } diff --git a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ModelViewProcessor.kt b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ModelViewProcessor.kt index fafd724479..66d88bb441 100644 --- a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ModelViewProcessor.kt +++ b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ModelViewProcessor.kt @@ -165,9 +165,9 @@ class ModelViewProcessor : BaseProcessorWithPackageConfigs() { if (prop is ExecutableElement && prop.parametersThreadSafe.isEmpty() && info.viewElement.findOverload( - prop, - 1 - )?.hasAnyAnnotation(modelPropAnnotations) == true + prop, + 1 + )?.hasAnyAnnotation(modelPropAnnotations) == true ) { return@map null } diff --git a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/PoetExtensions.kt b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/PoetExtensions.kt index 70e47ddcf1..c831dff5ef 100644 --- a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/PoetExtensions.kt +++ b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/PoetExtensions.kt @@ -57,10 +57,10 @@ fun JavaClassName.toKPoet(): KotlinClassName { /** Some classes, like List or Byte have the same class name but a different package for their kotlin equivalent. */ private fun JavaClassName.getPackageNameInKotlin(): String { if (packageName() in listOf( - javaUtilPkg, - javaLangPkg, - kotlinJvmFunction - ) && simpleNames().size == 1 + javaUtilPkg, + javaLangPkg, + kotlinJvmFunction + ) && simpleNames().size == 1 ) { val transformedPkg = when { diff --git a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Utils.kt b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Utils.kt index 83cc1b84a0..bb727a3ea8 100644 --- a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Utils.kt +++ b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/Utils.kt @@ -288,11 +288,11 @@ internal object Utils { continue } if (!areParamsTheSame( - methodElement, - method, - typeUtils, - elements - ) + methodElement, + method, + typeUtils, + elements + ) ) { continue } @@ -369,13 +369,13 @@ internal object Utils { // to figure out the base model type. We just look for the first type that is a view or // view holder. if (isSubtypeOfType( - superTypeArgument, - ANDROID_VIEW_TYPE - ) || - isSubtypeOfType( superTypeArgument, - EPOXY_HOLDER_TYPE - ) + ANDROID_VIEW_TYPE + ) || + isSubtypeOfType( + superTypeArgument, + EPOXY_HOLDER_TYPE + ) ) { return superTypeArgument } @@ -395,8 +395,8 @@ internal object Utils { // Verify method modifiers. val modifiers = fieldElement.modifiersThreadSafe if (modifiers.contains(Modifier.PRIVATE) && !skipPrivateFieldCheck || modifiers.contains( - Modifier.STATIC - ) + Modifier.STATIC + ) ) { logger.logError( "%s annotations must not be on private or static fields. (class: %s, field: %s)", diff --git a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ViewAttributeInfo.kt b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ViewAttributeInfo.kt index 55a6e14d6e..b20c78a250 100644 --- a/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ViewAttributeInfo.kt +++ b/epoxy-processor/src/main/java/com/airbnb/epoxy/processor/ViewAttributeInfo.kt @@ -324,8 +324,8 @@ class ViewAttributeInfo( } if (options.contains(Option.GenerateStringOverloads) && !isAssignable( - getTypeMirror(CharSequence::class.java, elements), typeMirror, types - ) + getTypeMirror(CharSequence::class.java, elements), typeMirror, types + ) ) { logger .logError( diff --git a/gradle.properties b/gradle.properties index d165a3248f..f3983c04cc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=4.3.1 +VERSION_NAME=4.4.0 GROUP=com.airbnb.android POM_DESCRIPTION=Epoxy is a system for composing complex screens with a ReyclerView in Android. POM_URL=https://github.com/airbnb/epoxy @@ -18,6 +18,5 @@ android.enableJetifier=false android.databinding.incremental=true org.gradle.parallel=true -org.gradle.configureondemand=true org.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 kapt.includeCompileClasspath=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1f3fdbc528..25d3265315 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/ktlint.gradle b/ktlint.gradle index 2acd0caeed..a2829a3dc6 100644 --- a/ktlint.gradle +++ b/ktlint.gradle @@ -7,7 +7,7 @@ configurations { } dependencies { - ktlint "com.pinterest:ktlint:0.37.2" + ktlint "com.pinterest:ktlint:0.40.0" // additional 3rd party ruleset(s) can be specified here // just add them to the classpath (e.g. ktlint 'groupId:artifactId:version') and // ktlint will pick them up