diff --git a/gradle.properties b/gradle.properties index eed46a2..4859552 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ android.enableJetifier=true android.useAndroidX=true -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx4096m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects diff --git a/mvi-arch/src/main/java/ru/touchin/roboswag/mvi_arch/core/MviViewModel.kt b/mvi-arch/src/main/java/ru/touchin/roboswag/mvi_arch/core/MviViewModel.kt index c02cd6e..8b4b170 100644 --- a/mvi-arch/src/main/java/ru/touchin/roboswag/mvi_arch/core/MviViewModel.kt +++ b/mvi-arch/src/main/java/ru/touchin/roboswag/mvi_arch/core/MviViewModel.kt @@ -48,6 +48,7 @@ abstract class MviViewModel create(key: String, modelClass: Class, handle: SavedStateHandle): T { - return viewModelMap[modelClass]?.create(handle) as? T ?: throw IllegalStateException("Unknown ViewModel class") - } + override fun create(key: String, modelClass: Class, handle: SavedStateHandle): T = + viewModelMap[modelClass]?.create(handle) as? T ?: throw IllegalStateException("Unknown ViewModel class") + } diff --git a/storable/src/main/java/ru/touchin/roboswag/core/observables/storable/BaseStorable.java b/storable/src/main/java/ru/touchin/roboswag/core/observables/storable/BaseStorable.java index a511e7e..b7ac8e2 100644 --- a/storable/src/main/java/ru/touchin/roboswag/core/observables/storable/BaseStorable.java +++ b/storable/src/main/java/ru/touchin/roboswag/core/observables/storable/BaseStorable.java @@ -430,7 +430,8 @@ public abstract class BaseStorable { sourceBuilder.migration, sourceBuilder.defaultValue, sourceBuilder.storeScheduler, sourceBuilder.cacheTimeMillis); } - @SuppressWarnings({"PMD.ExcessiveParameterList", "CPD-START"}) + @SuppressWarnings("PMD.ExcessiveParameterList") + //CPD-OFF //CPD: it is same code as constructor of Storable //ExcessiveParameterList: that's why we are using builder to create it private BuilderCore(@NonNull final TKey key, @@ -455,7 +456,7 @@ public abstract class BaseStorable { this.cacheTimeMillis = cacheTimeMillis; } - @SuppressWarnings("CPD-END") + //CPD-ON protected void setStoreSchedulerInternal(@Nullable final Scheduler storeScheduler) { this.storeScheduler = storeScheduler; } diff --git a/storable/src/main/java/ru/touchin/roboswag/core/observables/storable/NonNullStorable.java b/storable/src/main/java/ru/touchin/roboswag/core/observables/storable/NonNullStorable.java index bb6d465..2652105 100644 --- a/storable/src/main/java/ru/touchin/roboswag/core/observables/storable/NonNullStorable.java +++ b/storable/src/main/java/ru/touchin/roboswag/core/observables/storable/NonNullStorable.java @@ -63,8 +63,8 @@ public class NonNullStorable extends BaseStorable Type of actual object; * @param Type of store object. Could be same as {@link TObject}. */ - @SuppressWarnings("CPD-START") - //CPD: it is same code as Builder of Storable because it's methods returning this and can't be inherited + // CPD-OFF + // CPD: it is same code as Builder of Storable because it's methods returning this and can't be inherited public static class Builder extends BuilderCore { public Builder(@NonNull final Storable.Builder sourceBuilder, @@ -133,7 +133,8 @@ public class NonNullStorable extends BaseStorable build() { if (getDefaultValue() == null) { throw new ShouldNotHappenException(); diff --git a/views/src/main/java/ru/touchin/roboswag/views/widget/AmountWithDecimalDecorator.kt b/views/src/main/java/ru/touchin/roboswag/views/widget/AmountWithDecimalDecorator.kt index 526f5a1..f8ec2b6 100644 --- a/views/src/main/java/ru/touchin/roboswag/views/widget/AmountWithDecimalDecorator.kt +++ b/views/src/main/java/ru/touchin/roboswag/views/widget/AmountWithDecimalDecorator.kt @@ -47,7 +47,7 @@ class AmountWithDecimalDecorator( fun getTextWithoutFormatting(decimalSeparatorToReplace: String = decimalSeparator): String = previousInputtedText.withoutFormatting(decimalSeparatorToReplace) - @Suppress("detekt.TooGenericExceptionCaught") + @Suppress("detekt.TooGenericExceptionCaught", "detekt.ComplexMethod", "detekt.LongMethod") private fun doOnTextChanged(text: String) { if (isTextWasArtificiallyChanged) { isTextWasArtificiallyChanged = false