diff --git a/build.gradle b/build.gradle index c2c8723c..252398b1 100644 --- a/build.gradle +++ b/build.gradle @@ -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" diff --git a/detekt.yml b/detekt.yml index 857213ec..235590d0 100644 --- a/detekt.yml +++ b/detekt.yml @@ -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: diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index cc4fdc29..f3d88b1c 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 31a0802f..4e1cc9db 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.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/mobile/build.gradle b/mobile/build.gradle index 253a9b95..f8eb484f 100644 --- a/mobile/build.gradle +++ b/mobile/build.gradle @@ -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' diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt b/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt index 0d59d01b..86c21ae3 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/client/ClientsFragment.kt @@ -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() }