Update dependencies
This commit is contained in:
@@ -12,10 +12,10 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.5.0'
|
classpath 'com.android.tools.build:gradle:3.5.1'
|
||||||
classpath 'com.github.ben-manes:gradle-versions-plugin:0.25.0'
|
classpath 'com.github.ben-manes:gradle-versions-plugin:0.27.0'
|
||||||
classpath 'com.google.gms:google-services:4.3.2'
|
classpath 'com.google.gms:google-services:4.3.2'
|
||||||
classpath 'io.fabric.tools:gradle:1.31.0'
|
classpath 'io.fabric.tools:gradle:1.31.2'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -25,6 +25,7 @@ allprojects {
|
|||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
|
maven { url "https://kotlin.bintray.com/kotlinx" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
21
detekt.yml
21
detekt.yml
@@ -1,4 +1,4 @@
|
|||||||
# https://github.com/arturbosch/detekt/blob/1.0.1/detekt-cli/src/main/resources/default-detekt-config.yml
|
# https://github.com/arturbosch/detekt/blob/1.1.0/detekt-cli/src/main/resources/default-detekt-config.yml
|
||||||
|
|
||||||
comments:
|
comments:
|
||||||
active: false
|
active: false
|
||||||
@@ -93,8 +93,7 @@ exceptions:
|
|||||||
active: true
|
active: true
|
||||||
methodNames: 'toString,hashCode,equals,finalize'
|
methodNames: 'toString,hashCode,equals,finalize'
|
||||||
InstanceOfCheckForException:
|
InstanceOfCheckForException:
|
||||||
active: true
|
active: false
|
||||||
excludes: "**/test/**,**/androidTest/**,**/*.Test.kt,**/*.Spec.kt,**/*.Spek.kt"
|
|
||||||
NotImplementedDeclaration:
|
NotImplementedDeclaration:
|
||||||
active: true
|
active: true
|
||||||
PrintStackTrace:
|
PrintStackTrace:
|
||||||
@@ -103,6 +102,7 @@ exceptions:
|
|||||||
active: false
|
active: false
|
||||||
ReturnFromFinally:
|
ReturnFromFinally:
|
||||||
active: true
|
active: true
|
||||||
|
ignoreLabeled: true
|
||||||
SwallowedException:
|
SwallowedException:
|
||||||
active: true
|
active: true
|
||||||
ignoredExceptionTypes: 'InterruptedException,NumberFormatException,ParseException,MalformedURLException'
|
ignoredExceptionTypes: 'InterruptedException,NumberFormatException,ParseException,MalformedURLException'
|
||||||
@@ -325,6 +325,8 @@ performance:
|
|||||||
|
|
||||||
potential-bugs:
|
potential-bugs:
|
||||||
active: true
|
active: true
|
||||||
|
Deprecation:
|
||||||
|
active: true
|
||||||
DuplicateCaseInWhenExpression:
|
DuplicateCaseInWhenExpression:
|
||||||
active: true
|
active: true
|
||||||
EqualsAlwaysReturnsTrueOrFalse:
|
EqualsAlwaysReturnsTrueOrFalse:
|
||||||
@@ -333,6 +335,8 @@ potential-bugs:
|
|||||||
active: true
|
active: true
|
||||||
ExplicitGarbageCollectionCall:
|
ExplicitGarbageCollectionCall:
|
||||||
active: true
|
active: true
|
||||||
|
HasPlatformType:
|
||||||
|
active: true
|
||||||
InvalidRange:
|
InvalidRange:
|
||||||
active: true
|
active: true
|
||||||
IteratorHasNextCallsNextMethod:
|
IteratorHasNextCallsNextMethod:
|
||||||
@@ -378,9 +382,11 @@ style:
|
|||||||
ForbiddenComment:
|
ForbiddenComment:
|
||||||
active: true
|
active: true
|
||||||
values: 'TODO:,FIXME:,STOPSHIP:'
|
values: 'TODO:,FIXME:,STOPSHIP:'
|
||||||
|
allowedPatterns: ""
|
||||||
ForbiddenImport:
|
ForbiddenImport:
|
||||||
active: true
|
active: true
|
||||||
imports: ''
|
imports: ''
|
||||||
|
forbiddenPatterns: ""
|
||||||
ForbiddenVoid:
|
ForbiddenVoid:
|
||||||
active: true
|
active: true
|
||||||
ignoreOverridden: true
|
ignoreOverridden: true
|
||||||
@@ -389,6 +395,7 @@ style:
|
|||||||
active: true
|
active: true
|
||||||
ignoreOverridableFunction: true
|
ignoreOverridableFunction: true
|
||||||
excludedFunctions: 'describeContents'
|
excludedFunctions: 'describeContents'
|
||||||
|
excludeAnnotatedFunction: "dagger.Provides"
|
||||||
LibraryCodeMustSpecifyReturnType:
|
LibraryCodeMustSpecifyReturnType:
|
||||||
active: true
|
active: true
|
||||||
LoopWithTooManyJumpStatements:
|
LoopWithTooManyJumpStatements:
|
||||||
@@ -419,11 +426,13 @@ style:
|
|||||||
OptionalUnit:
|
OptionalUnit:
|
||||||
active: true
|
active: true
|
||||||
OptionalWhenBraces:
|
OptionalWhenBraces:
|
||||||
active: true
|
active: false
|
||||||
PreferToOverPairSyntax:
|
PreferToOverPairSyntax:
|
||||||
active: false
|
active: false
|
||||||
ProtectedMemberInFinalClass:
|
ProtectedMemberInFinalClass:
|
||||||
active: true
|
active: true
|
||||||
|
RedundantExplicitType:
|
||||||
|
active: true
|
||||||
RedundantVisibilityModifierRule:
|
RedundantVisibilityModifierRule:
|
||||||
active: true
|
active: true
|
||||||
ReturnCount:
|
ReturnCount:
|
||||||
@@ -461,10 +470,14 @@ style:
|
|||||||
UnusedPrivateMember:
|
UnusedPrivateMember:
|
||||||
active: true
|
active: true
|
||||||
allowedNames: "(_|ignored|expected|serialVersionUID)"
|
allowedNames: "(_|ignored|expected|serialVersionUID)"
|
||||||
|
UseArrayLiteralsInAnnotations:
|
||||||
|
active: true
|
||||||
UseCheckOrError:
|
UseCheckOrError:
|
||||||
active: true
|
active: true
|
||||||
UseDataClass:
|
UseDataClass:
|
||||||
active: false
|
active: false
|
||||||
|
UseIfInsteadOfWhen:
|
||||||
|
active: false
|
||||||
UseRequire:
|
UseRequire:
|
||||||
active: true
|
active: true
|
||||||
UselessCallOnNotNull:
|
UselessCallOnNotNull:
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ def aux = [
|
|||||||
'com.crashlytics.sdk.android:crashlytics:2.10.1',
|
'com.crashlytics.sdk.android:crashlytics:2.10.1',
|
||||||
'com.google.firebase:firebase-analytics:17.2.0',
|
'com.google.firebase:firebase-analytics:17.2.0',
|
||||||
]
|
]
|
||||||
def lifecycleVersion = '2.2.0-alpha05'
|
def lifecycleVersion = '2.2.0-rc01'
|
||||||
def roomVersion = '2.1.0'
|
def roomVersion = '2.2.1'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 29
|
compileSdkVersion 29
|
||||||
@@ -31,11 +31,10 @@ android {
|
|||||||
versionCode 215
|
versionCode 215
|
||||||
versionName '2.6.2'
|
versionName '2.6.2'
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
javaCompileOptions {
|
javaCompileOptions.annotationProcessorOptions.arguments = [
|
||||||
annotationProcessorOptions {
|
"room.incremental": "true",
|
||||||
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
|
"room.schemaLocation": "$projectDir/schemas".toString(),
|
||||||
}
|
]
|
||||||
}
|
|
||||||
buildConfigField "boolean", "DONATIONS", "true"
|
buildConfigField "boolean", "DONATIONS", "true"
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@@ -75,7 +74,7 @@ androidExtensions {
|
|||||||
dependencies {
|
dependencies {
|
||||||
kapt "androidx.room:room-compiler:$roomVersion"
|
kapt "androidx.room:room-compiler:$roomVersion"
|
||||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
implementation 'androidx.browser:browser:1.2.0-alpha08'
|
implementation 'androidx.browser:browser:1.2.0-alpha09'
|
||||||
implementation 'androidx.core:core-ktx:1.1.0'
|
implementation 'androidx.core:core-ktx:1.1.0'
|
||||||
implementation 'androidx.emoji:emoji:1.0.0'
|
implementation 'androidx.emoji:emoji:1.0.0'
|
||||||
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
|
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
|
||||||
@@ -88,14 +87,14 @@ dependencies {
|
|||||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
|
||||||
implementation 'com.android.billingclient:billing:2.0.3'
|
implementation 'com.android.billingclient:billing:2.0.3'
|
||||||
implementation 'com.github.topjohnwu.libsu:core:2.5.1'
|
implementation 'com.github.topjohnwu.libsu:core:2.5.1'
|
||||||
implementation 'com.google.android.material:material:1.1.0-alpha10'
|
implementation 'com.google.android.material:material:1.1.0-beta01'
|
||||||
implementation 'com.jakewharton.timber:timber:4.7.1'
|
implementation 'com.jakewharton.timber:timber:4.7.1'
|
||||||
implementation 'com.linkedin.dexmaker:dexmaker:2.25.0'
|
implementation 'com.linkedin.dexmaker:dexmaker:2.25.0'
|
||||||
implementation 'com.takisoft.preferencex:preferencex-simplemenu:1.0.0'
|
implementation 'com.takisoft.preferencex:preferencex-simplemenu:1.0.0'
|
||||||
implementation 'net.glxn.qrgen:android:2.0'
|
implementation 'net.glxn.qrgen:android:2.0'
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-collections-immutable:0.2'
|
implementation 'org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3'
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.1'
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2'
|
||||||
for (dep in aux) {
|
for (dep in aux) {
|
||||||
freedomImplementation dep
|
freedomImplementation dep
|
||||||
googleImplementation dep
|
googleImplementation dep
|
||||||
@@ -104,5 +103,5 @@ dependencies {
|
|||||||
androidTestImplementation "androidx.room:room-testing:$roomVersion"
|
androidTestImplementation "androidx.room:room-testing:$roomVersion"
|
||||||
androidTestImplementation 'androidx.test:runner:1.2.0'
|
androidTestImplementation 'androidx.test:runner:1.2.0'
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||||
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.1-beta01'
|
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.1'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import be.mygod.vpnhotspot.util.StickyEvent1
|
|||||||
import be.mygod.vpnhotspot.util.broadcastReceiver
|
import be.mygod.vpnhotspot.util.broadcastReceiver
|
||||||
import be.mygod.vpnhotspot.widget.SmartSnackbar
|
import be.mygod.vpnhotspot.widget.SmartSnackbar
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import timber.log.Timber
|
|
||||||
|
|
||||||
@RequiresApi(26)
|
@RequiresApi(26)
|
||||||
class LocalOnlyHotspotService : IpNeighbourMonitoringService(), CoroutineScope {
|
class LocalOnlyHotspotService : IpNeighbourMonitoringService(), CoroutineScope {
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ class Routing(private val caller: Any, private val downstream: String) : IpNeigh
|
|||||||
private val hostAddress = try {
|
private val hostAddress = try {
|
||||||
val addresses = NetworkInterface.getByName(downstream)!!.interfaceAddresses!!
|
val addresses = NetworkInterface.getByName(downstream)!!.interfaceAddresses!!
|
||||||
.filter { it.address is Inet4Address }
|
.filter { it.address is Inet4Address }
|
||||||
if (addresses.size > 1) Timber.w(IllegalArgumentException("More than one addresses was found: $addresses"))
|
if (addresses.size > 1) error("More than one addresses was found: $addresses")
|
||||||
addresses.first()
|
addresses.first()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
throw InterfaceNotFoundException(e)
|
throw InterfaceNotFoundException(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user