Commit 8cce43b4 authored by Mygod's avatar Mygod

Update dependencies

parent 7f4624f3
...@@ -9,9 +9,8 @@ buildscript { ...@@ -9,9 +9,8 @@ buildscript {
sdkVersion = 28 sdkVersion = 28
compileSdkVersion = 28 compileSdkVersion = 28
buildToolsVersion = '28.0.3' buildToolsVersion = '28.0.3'
androidxVersion = '1.0.0'
roomVersion = '2.0.0' roomVersion = '2.0.0'
workVersion = '1.0.0-alpha10' workVersion = '1.0.0-alpha11'
preferencexVersion = '1.0.0' preferencexVersion = '1.0.0'
junitVersion = '4.12' junitVersion = '4.12'
androidTestVersion = '1.1.0' androidTestVersion = '1.1.0'
......
...@@ -71,9 +71,9 @@ tasks.whenTaskAdded { task -> ...@@ -71,9 +71,9 @@ tasks.whenTaskAdded { task ->
dependencies { dependencies {
api project(':plugin') api project(':plugin')
api "android.arch.work:work-runtime-ktx:$workVersion" api "android.arch.work:work-runtime-ktx:$workVersion"
api "androidx.preference:preference:$androidxVersion" api "androidx.preference:preference:1.0.0"
api "androidx.room:room-runtime:$roomVersion" api "androidx.room:room-runtime:$roomVersion"
api 'com.crashlytics.sdk.android:crashlytics:2.9.5' api 'com.crashlytics.sdk.android:crashlytics:2.9.6'
api 'com.google.firebase:firebase-config:16.0.0' api 'com.google.firebase:firebase-config:16.0.0'
api 'com.google.firebase:firebase-core:16.0.0' api 'com.google.firebase:firebase-core:16.0.0'
api 'com.squareup.okhttp3:okhttp:3.11.0' api 'com.squareup.okhttp3:okhttp:3.11.0'
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
package com.github.shadowsocks.preference package com.github.shadowsocks.preference
import android.os.Binder import android.os.Binder
import androidx.appcompat.app.AppCompatDelegate
import androidx.preference.PreferenceDataStore import androidx.preference.PreferenceDataStore
import com.github.shadowsocks.Core import com.github.shadowsocks.Core
import com.github.shadowsocks.database.PrivateDatabase import com.github.shadowsocks.database.PrivateDatabase
......
# 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 autoCorrect: true
comments: comments:
...@@ -120,6 +120,7 @@ exceptions: ...@@ -120,6 +120,7 @@ exceptions:
- IndexOutOfBoundsException - IndexOutOfBoundsException
- RuntimeException - RuntimeException
- Throwable - Throwable
allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
TooGenericExceptionThrown: TooGenericExceptionThrown:
active: true active: true
exceptionNames: exceptionNames:
...@@ -143,8 +144,7 @@ formatting: ...@@ -143,8 +144,7 @@ formatting:
active: true active: true
autoCorrect: true autoCorrect: true
ImportOrdering: ImportOrdering:
active: true active: false
autoCorrect: false
Indentation: Indentation:
active: true active: true
autoCorrect: true autoCorrect: true
...@@ -217,6 +217,11 @@ naming: ...@@ -217,6 +217,11 @@ naming:
ClassNaming: ClassNaming:
active: true active: true
classPattern: '[A-Z$][a-zA-Z0-9$]*' 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: EnumNaming:
active: true active: true
enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*' enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*'
...@@ -233,14 +238,20 @@ naming: ...@@ -233,14 +238,20 @@ naming:
active: true active: true
functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$' functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
excludeClassPattern: '$^' excludeClassPattern: '$^'
ignoreOverridden: true
FunctionParameterNaming:
active: true
parameterPattern: '[a-z][A-Za-z0-9]*'
excludeClassPattern: '$^'
MatchingDeclarationName: MatchingDeclarationName:
active: true active: true
MemberNameEqualsClassName: MemberNameEqualsClassName:
active: false active: false
ObjectPropertyNaming: ObjectPropertyNaming:
active: true active: true
propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
constantPattern: '[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: PackageNaming:
active: true active: true
packagePattern: '^[a-z]+(\.[a-z][a-z0-9]*)*$' packagePattern: '^[a-z]+(\.[a-z][a-z0-9]*)*$'
...@@ -259,6 +270,7 @@ naming: ...@@ -259,6 +270,7 @@ naming:
variablePattern: '[a-z][A-Za-z0-9]*' variablePattern: '[a-z][A-Za-z0-9]*'
privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
excludeClassPattern: '$^' excludeClassPattern: '$^'
ignoreOverridden: true
performance: performance:
active: true active: true
...@@ -318,6 +330,8 @@ style: ...@@ -318,6 +330,8 @@ style:
ForbiddenImport: ForbiddenImport:
active: true active: true
imports: '' imports: ''
ForbiddenVoid:
active: true
FunctionOnlyReturningConstant: FunctionOnlyReturningConstant:
active: true active: true
ignoreOverridableFunction: true ignoreOverridableFunction: true
...@@ -372,8 +386,11 @@ style: ...@@ -372,8 +386,11 @@ style:
active: true active: true
UnnecessaryAbstractClass: UnnecessaryAbstractClass:
active: true active: true
excludeAnnotatedClasses: "dagger.Module"
UnnecessaryInheritance: UnnecessaryInheritance:
active: true active: true
UnnecessaryLet:
active: true
UnnecessaryParentheses: UnnecessaryParentheses:
active: true active: true
UntilInsteadOfRangeTo: UntilInsteadOfRangeTo:
......
...@@ -55,7 +55,7 @@ android { ...@@ -55,7 +55,7 @@ android {
dependencies { dependencies {
implementation project(':core') implementation project(':core')
implementation "androidx.browser:browser:$androidxVersion" implementation "androidx.browser:browser:1.0.0"
implementation 'com.google.android.gms:play-services-vision:15.0.2' implementation 'com.google.android.gms:play-services-vision:15.0.2'
implementation 'com.google.firebase:firebase-ads:15.0.1' implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation "com.takisoft.preferencex:preferencex-simplemenu:$preferencexVersion" implementation "com.takisoft.preferencex:preferencex-simplemenu:$preferencexVersion"
......
...@@ -24,7 +24,6 @@ import android.app.Application ...@@ -24,7 +24,6 @@ import android.app.Application
import android.content.res.Configuration import android.content.res.Configuration
import androidx.appcompat.app.AppCompatDelegate import androidx.appcompat.app.AppCompatDelegate
import com.github.shadowsocks.preference.BottomSheetPreferenceDialogFragment import com.github.shadowsocks.preference.BottomSheetPreferenceDialogFragment
import com.github.shadowsocks.preference.DataStore
import com.github.shadowsocks.preference.IconListPreference import com.github.shadowsocks.preference.IconListPreference
import com.takisoft.preferencex.PreferenceFragmentCompat import com.takisoft.preferencex.PreferenceFragmentCompat
......
...@@ -62,7 +62,7 @@ class CustomRulesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener, ...@@ -62,7 +62,7 @@ class CustomRulesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener,
private const val SELECTED_URLS = "com.github.shadowsocks.acl.CustomRulesFragment.SELECTED_URLS" private const val SELECTED_URLS = "com.github.shadowsocks.acl.CustomRulesFragment.SELECTED_URLS"
// unescaped: (?<=^(\(\^\|\\\.\)|\^\(\.\*\\\.\)\?)).*(?=\$$) // unescaped: (?<=^(\(\^\|\\\.\)|\^\(\.\*\\\.\)\?)).*(?=\$$)
private val PATTERN_DOMAIN = "(?<=^(\\(\\^\\|\\\\\\.\\)|\\^\\(\\.\\*\\\\\\.\\)\\?)).*(?=\\\$\$)".toRegex() private val domainPattern = "(?<=^(\\(\\^\\|\\\\\\.\\)|\\^\\(\\.\\*\\\\\\.\\)\\?)).*(?=\\\$\$)".toRegex()
} }
private enum class Template { private enum class Template {
...@@ -86,7 +86,7 @@ class CustomRulesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener, ...@@ -86,7 +86,7 @@ class CustomRulesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener,
inputLayout = view.findViewById(R.id.content_layout) inputLayout = view.findViewById(R.id.content_layout)
when (item) { when (item) {
is String -> { is String -> {
val match = PATTERN_DOMAIN.find(item) val match = domainPattern.find(item)
if (match != null) { if (match != null) {
templateSelector.setSelection(Template.Domain.ordinal) templateSelector.setSelection(Template.Domain.ordinal)
editText.setText(IDN.toUnicode(match.value.replace("\\.", "."), editText.setText(IDN.toUnicode(match.value.replace("\\.", "."),
......
...@@ -24,8 +24,8 @@ android { ...@@ -24,8 +24,8 @@ android {
} }
dependencies { dependencies {
api "androidx.core:core-ktx:$androidxVersion" api "androidx.core:core-ktx:1.0.1"
api "com.google.android.material:material:$androidxVersion" api "com.google.android.material:material:1.0.0"
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
testImplementation "junit:junit:$junitVersion" testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test:runner:$androidTestVersion" androidTestImplementation "androidx.test:runner:$androidTestVersion"
......
...@@ -56,7 +56,7 @@ android { ...@@ -56,7 +56,7 @@ android {
dependencies { dependencies {
implementation project(':core') implementation project(':core')
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "androidx.leanback:leanback-preference:$androidxVersion" implementation "androidx.leanback:leanback-preference:1.0.0"
} }
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment