From ea7fb6721ce14b93ed2ad394fc88c467cd2e9862 Mon Sep 17 00:00:00 2001 From: Mygod Date: Thu, 13 Dec 2018 14:14:05 +0800 Subject: [PATCH] Update dependencies --- build.gradle | 7 +++---- detekt.yml | 25 +++++++++++++++++++++---- mobile/build.gradle | 16 ++++++++++------ 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index fe050e3b..527e29ff 100644 --- a/build.gradle +++ b/build.gradle @@ -4,8 +4,7 @@ apply plugin: 'com.github.ben-manes.versions' buildscript { ext { - kotlinVersion = '1.2.71' - androidxVersion = '1.0.0' + kotlinVersion = '1.3.11' roomVersion = '2.0.0' } repositories { @@ -18,8 +17,8 @@ buildscript { dependencies { classpath "com.android.tools.build:gradle:3.2.1" classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0' - classpath 'com.google.gms:google-services:4.1.0' - classpath 'io.fabric.tools:gradle:1.26.1' + classpath 'com.google.gms:google-services:4.2.0' + classpath 'io.fabric.tools:gradle:1.27.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" } } diff --git a/detekt.yml b/detekt.yml index a977acaa..c637798a 100644 --- a/detekt.yml +++ b/detekt.yml @@ -1,4 +1,4 @@ -# https://github.com/arturbosch/detekt/blob/RC8/detekt-cli/src/main/resources/default-detekt-config.yml +# https://github.com/arturbosch/detekt/blob/RC9.2/detekt-cli/src/main/resources/default-detekt-config.yml autoCorrect: true comments: @@ -120,6 +120,7 @@ exceptions: - IndexOutOfBoundsException - RuntimeException - Throwable + allowedExceptionNameRegex: "^(_|(ignore|expected).*)" TooGenericExceptionThrown: active: true exceptionNames: @@ -143,8 +144,7 @@ formatting: active: true autoCorrect: true ImportOrdering: - active: true - autoCorrect: false + active: false Indentation: active: true autoCorrect: true @@ -217,6 +217,11 @@ naming: ClassNaming: active: true classPattern: '[A-Z$][a-zA-Z0-9$]*' + ConstructorParameterNaming: + active: true + parameterPattern: '[a-z][A-Za-z0-9]*' + privateParameterPattern: '[a-z][A-Za-z0-9]*' + excludeClassPattern: '$^' EnumNaming: active: true enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*' @@ -233,14 +238,20 @@ naming: active: true functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$' excludeClassPattern: '$^' + ignoreOverridden: true + FunctionParameterNaming: + active: true + parameterPattern: '[a-z][A-Za-z0-9]*' + excludeClassPattern: '$^' MatchingDeclarationName: active: true MemberNameEqualsClassName: active: false ObjectPropertyNaming: active: true - propertyPattern: '[A-Za-z][_A-Za-z0-9]*' constantPattern: '[A-Za-z][_A-Za-z0-9]*' + propertyPattern: '[A-Za-z][_A-Za-z0-9]*' + privatePropertyPattern: '(_)?[A-Za-z][A-Za-z0-9]*' PackageNaming: active: true packagePattern: '^[a-z]+(\.[a-z][a-z0-9]*)*$' @@ -259,6 +270,7 @@ naming: variablePattern: '[a-z][A-Za-z0-9]*' privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' + ignoreOverridden: true performance: active: true @@ -318,6 +330,8 @@ style: ForbiddenImport: active: true imports: '' + ForbiddenVoid: + active: true FunctionOnlyReturningConstant: active: true ignoreOverridableFunction: true @@ -372,8 +386,11 @@ style: active: true UnnecessaryAbstractClass: active: true + excludeAnnotatedClasses: "dagger.Module" UnnecessaryInheritance: active: true + UnnecessaryLet: + active: true UnnecessaryParentheses: active: true UntilInsteadOfRangeTo: diff --git a/mobile/build.gradle b/mobile/build.gradle index 876f7525..945ab8d7 100644 --- a/mobile/build.gradle +++ b/mobile/build.gradle @@ -8,6 +8,10 @@ if (getGradle().getStartParameter().getTaskRequests().toString().contains("Base" android { buildToolsVersion "28.0.3" compileSdkVersion 28 + compileOptions { + sourceCompatibility 1.8 + targetCompatibility 1.8 + } defaultConfig { applicationId "be.mygod.vpnhotspot" minSdkVersion 21 @@ -56,20 +60,20 @@ android { dependencies { kapt "androidx.room:room-compiler:$roomVersion" implementation fileTree(dir: 'libs', include: ['*.jar']) - implementation "androidx.browser:browser:$androidxVersion" + implementation "androidx.browser:browser:1.0.0" implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2' - implementation "androidx.core:core-ktx:$androidxVersion" - implementation "androidx.preference:preference:$androidxVersion" + implementation "androidx.core:core-ktx:1.0.1" + implementation "androidx.preference:preference:1.0.0" implementation "androidx.room:room-runtime:$roomVersion" implementation 'com.github.luongvo:BadgeView:1.1.5' - implementation 'com.github.topjohnwu:libsu:2.0.2' - implementation "com.google.android.material:material:$androidxVersion" + implementation 'com.github.topjohnwu:libsu:2.1.2' + implementation "com.google.android.material:material:1.0.0" implementation 'com.jakewharton.timber:timber:4.7.1' implementation 'com.linkedin.dexmaker:dexmaker-mockito:2.19.1' implementation 'com.takisoft.preferencex:preferencex:1.0.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" baseImplementation 'com.android.billingclient:billing:1.2' - baseImplementation 'com.crashlytics.sdk.android:crashlytics:2.9.5' + baseImplementation 'com.crashlytics.sdk.android:crashlytics:2.9.7' testImplementation "androidx.room:room-testing:$roomVersion" testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.0'