This commit is contained in:
Mygod
2020-02-08 04:12:45 +08:00
parent 1507050eea
commit cae191b991
6 changed files with 38 additions and 26 deletions

View File

@@ -11,7 +11,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:4.0.0-alpha09'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.27.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta01'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta02'
classpath 'com.google.android.gms:oss-licenses-plugin:0.9.5'
classpath 'com.google.gms:google-services:4.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"

View File

@@ -1,4 +1,4 @@
# https://github.com/arturbosch/detekt/blob/1.3.1/detekt-cli/src/main/resources/default-detekt-config.yml
# https://github.com/arturbosch/detekt/blob/1.5.0/detekt-cli/src/main/resources/default-detekt-config.yml
comments:
active: false
@@ -56,6 +56,13 @@ complexity:
ignorePrivate: false
ignoreOverridden: true
coroutines:
active: true
GlobalCoroutineUsage:
active: false
RedundantSuspendModifier:
active: true
empty-blocks:
active: true
EmptyCatchBlock:
@@ -75,7 +82,7 @@ empty-blocks:
active: true
EmptyFunctionBlock:
active: true
ignoreOverriddenFunctions: true
ignoreOverridden: true
EmptyIfBlock:
active: true
EmptyInitBlock:
@@ -122,22 +129,22 @@ exceptions:
active: true
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
exceptionNames:
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- NullPointerException
- IndexOutOfBoundsException
- RuntimeException
- Throwable
- ArrayIndexOutOfBoundsException
- Error
- Exception
- IllegalMonitorStateException
- NullPointerException
- IndexOutOfBoundsException
- RuntimeException
- Throwable
allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
TooGenericExceptionThrown:
active: true
exceptionNames:
- Error
- Exception
- Throwable
- RuntimeException
- Error
- Exception
- Throwable
- RuntimeException
formatting:
active: true
@@ -151,6 +158,9 @@ formatting:
autoCorrect: true
CommentSpacing:
active: false
EnumEntryNameCase:
active: true
autoCorrect: false
Filename:
active: true
FinalNewline:
@@ -180,6 +190,9 @@ formatting:
NoEmptyClassBody:
active: true
autoCorrect: true
NoEmptyFirstLineInMethodBlock:
active: true
autoCorrect: true
NoLineBreakAfterElse:
active: true
autoCorrect: true
@@ -261,9 +274,7 @@ naming:
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
maximumFunctionNameLength: 30
FunctionMinLength:
active: true
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
minimumFunctionNameLength: 3
active: false
FunctionNaming:
active: true
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
@@ -275,7 +286,7 @@ naming:
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
parameterPattern: '[a-z][A-Za-z0-9]*'
excludeClassPattern: '$^'
ignoreOverriddenFunctions: true
ignoreOverridden: true
InvalidPackageDeclaration:
active: true
rootPackage: ''
@@ -381,6 +392,8 @@ style:
active: true
EqualsOnSignatureLine:
active: true
ExplicitCollectionElementAccessMethod:
active: true
ExplicitItLambdaParameter:
active: true
ExpressionBodySyntax:

Binary file not shown.

View File

@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@@ -22,7 +22,7 @@ android {
targetSdkVersion 29
resConfigs 'it', 'ru', 'zh-rCN'
versionCode 221
versionName '2.7.2'
versionName '2.8.0'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions.annotationProcessorOptions.arguments = [
"room.incremental": "true",
@@ -71,9 +71,9 @@ dependencies {
kapt "androidx.room:room-compiler:$roomVersion"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.browser:browser:1.2.0'
implementation 'androidx.core:core-ktx:1.2.0-rc01'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.emoji:emoji:1.0.0'
implementation 'androidx.fragment:fragment-ktx:1.2.0'
implementation 'androidx.fragment:fragment-ktx:1.2.1'
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
@@ -83,7 +83,7 @@ dependencies {
implementation 'com.android.billingclient:billing-ktx:2.1.0'
implementation 'com.github.topjohnwu.libsu:core:2.5.1'
implementation 'com.google.android.gms:play-services-oss-licenses:17.0.0'
implementation 'com.google.android.material:material:1.1.0-rc02'
implementation 'com.google.android.material:material:1.1.0'
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta01'
implementation 'com.google.zxing:core:3.4.0'

View File

@@ -178,8 +178,7 @@ class ClientsFragment : Fragment() {
override fun onBindViewHolder(holder: ClientViewHolder, position: Int) {
val client = getItem(position)
holder.binding.client = client
holder.binding.rate =
rates.computeIfAbsent(Pair(client.iface, client.mac)) { TrafficRate() }
holder.binding.rate = rates.computeIfAbsent(Pair(client.iface, client.mac)) { TrafficRate() }
holder.binding.executePendingBindings()
}