Commit 1983dec1 authored by Mygod's avatar Mygod

Update dependencies

parent 181ef532
...@@ -22,7 +22,7 @@ buildscript { ...@@ -22,7 +22,7 @@ buildscript {
classpath("com.google.gms:google-services:4.3.5") classpath("com.google.gms:google-services:4.3.5")
classpath("com.vanniktech:gradle-maven-publish-plugin:0.14.2") classpath("com.vanniktech:gradle-maven-publish-plugin:0.14.2")
classpath("gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3") classpath("gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.30") classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.4.32")
} }
} }
......
...@@ -11,7 +11,7 @@ import org.gradle.kotlin.dsl.getByName ...@@ -11,7 +11,7 @@ import org.gradle.kotlin.dsl.getByName
import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions
import java.util.* import java.util.*
const val lifecycleVersion = "2.3.0-rc01" const val lifecycleVersion = "2.3.1"
private val Project.android get() = extensions.getByName<BaseExtension>("android") private val Project.android get() = extensions.getByName<BaseExtension>("android")
......
...@@ -64,12 +64,12 @@ tasks.register<Exec>("cargoClean") { ...@@ -64,12 +64,12 @@ tasks.register<Exec>("cargoClean") {
tasks.clean.dependsOn("cargoClean") tasks.clean.dependsOn("cargoClean")
dependencies { dependencies {
val coroutinesVersion = "1.4.2" val coroutinesVersion = "1.5.0-RC"
val roomVersion = "2.3.0-rc01" val roomVersion = "2.3.0"
val workVersion = "2.5.0" val workVersion = "2.5.0"
api(project(":plugin")) api(project(":plugin"))
api("androidx.core:core-ktx:1.5.0-rc01") api("androidx.core:core-ktx:1.5.0-rc02")
api("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion") api("androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion")
api("androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion") api("androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion")
......
...@@ -114,7 +114,7 @@ data class Profile( ...@@ -114,7 +114,7 @@ data class Profile(
if (match != null) { if (match != null) {
val profile = Profile() val profile = Profile()
feature?.copyFeatureSettingsTo(profile) feature?.copyFeatureSettingsTo(profile)
profile.method = match.groupValues[1].toLowerCase(Locale.ENGLISH) profile.method = match.groupValues[1].lowercase(Locale.ENGLISH)
profile.password = match.groupValues[2] profile.password = match.groupValues[2]
profile.host = match.groupValues[3] profile.host = match.groupValues[3]
profile.remotePort = match.groupValues[4].toInt() profile.remotePort = match.groupValues[4].toInt()
......
...@@ -29,7 +29,8 @@ import android.system.Os ...@@ -29,7 +29,8 @@ import android.system.Os
import android.system.OsConstants import android.system.OsConstants
import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.channels.sendBlocking import kotlinx.coroutines.channels.onFailure
import kotlinx.coroutines.channels.trySendBlocking
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import timber.log.Timber import timber.log.Timber
import java.io.File import java.io.File
...@@ -61,7 +62,7 @@ abstract class LocalSocketListener(name: String, socketFile: File) : Thread(name ...@@ -61,7 +62,7 @@ abstract class LocalSocketListener(name: String, socketFile: File) : Thread(name
} }
} }
} }
closeChannel.sendBlocking(Unit) closeChannel.trySendBlocking(Unit).onFailure { throw it!! }
} }
@SuppressLint("NewApi") @SuppressLint("NewApi")
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
# The setting is particularly useful for tweaking memory settings. # The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true android.enableJetifier=true
android.enableR8.fullMode=true android.enableR8.fullMode=true
android.enableResourceOptimizations=false
android.useAndroidX=true android.useAndroidX=true
kapt.incremental.apt=true kapt.incremental.apt=true
......
...@@ -12,12 +12,12 @@ setupApp() ...@@ -12,12 +12,12 @@ setupApp()
android.defaultConfig.applicationId = "com.github.shadowsocks" android.defaultConfig.applicationId = "com.github.shadowsocks"
dependencies { dependencies {
val cameraxVersion = "1.0.0-rc04" val cameraxVersion = "1.0.0"
implementation("androidx.browser:browser:1.3.0") implementation("androidx.browser:browser:1.3.0")
implementation("androidx.camera:camera-camera2:$cameraxVersion") implementation("androidx.camera:camera-camera2:$cameraxVersion")
implementation("androidx.camera:camera-lifecycle:$cameraxVersion") implementation("androidx.camera:camera-lifecycle:$cameraxVersion")
implementation("androidx.camera:camera-view:1.0.0-alpha23") implementation("androidx.camera:camera-view:1.0.0-alpha24")
implementation("androidx.constraintlayout:constraintlayout:2.0.4") implementation("androidx.constraintlayout:constraintlayout:2.0.4")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion") implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion")
implementation("com.google.mlkit:barcode-scanning:16.1.1") implementation("com.google.mlkit:barcode-scanning:16.1.1")
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
package com.github.shadowsocks package com.github.shadowsocks
import android.annotation.SuppressLint
import android.content.ActivityNotFoundException import android.content.ActivityNotFoundException
import android.content.Intent import android.content.Intent
import android.graphics.Bitmap import android.graphics.Bitmap
...@@ -49,7 +48,7 @@ import com.github.shadowsocks.bg.BaseService ...@@ -49,7 +48,7 @@ import com.github.shadowsocks.bg.BaseService
import com.github.shadowsocks.database.Profile import com.github.shadowsocks.database.Profile
import com.github.shadowsocks.database.ProfileManager import com.github.shadowsocks.database.ProfileManager
import com.github.shadowsocks.plugin.PluginConfiguration import com.github.shadowsocks.plugin.PluginConfiguration
import com.github.shadowsocks.plugin.showAllowingStateLoss import com.github.shadowsocks.plugin.fragment.showAllowingStateLoss
import com.github.shadowsocks.preference.DataStore import com.github.shadowsocks.preference.DataStore
import com.github.shadowsocks.utils.Action import com.github.shadowsocks.utils.Action
import com.github.shadowsocks.utils.OpenJson import com.github.shadowsocks.utils.OpenJson
...@@ -85,7 +84,6 @@ class ProfilesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener, Sea ...@@ -85,7 +84,6 @@ class ProfilesFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener, Sea
private fun isProfileEditable(id: Long) = private fun isProfileEditable(id: Long) =
(activity as MainActivity).state == BaseService.State.Stopped || id !in Core.activeProfileIds (activity as MainActivity).state == BaseService.State.Stopped || id !in Core.activeProfileIds
@SuppressLint("ValidFragment")
class QRCodeDialog() : DialogFragment() { class QRCodeDialog() : DialogFragment() {
constructor(url: String) : this() { constructor(url: String) : this() {
arguments = bundleOf(Pair(KEY_URL, url)) arguments = bundleOf(Pair(KEY_URL, url))
......
* 2.0.1: * 2.0.1:
* Moved `AlertDialogFragment` and related utilities to `fragment` package, with support for Fragment Result API from AndroidX Fragment 1.3. * Moved `AlertDialogFragment` and related utilities to `fragment` package, with support for Fragment Result API from AndroidX Fragment 1.3.
* Dependency updates: * Dependency updates:
- `androidx.fragment:fragment-ktx:1.3.2`; - `androidx.fragment:fragment-ktx:1.3.3`;
- `com.google.android.material:material:1.3.0`; - `com.google.android.material:material:1.3.0`;
- `org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32`. - `org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.32`.
* 2.0.0: * 2.0.0:
......
...@@ -26,6 +26,6 @@ dependencies { ...@@ -26,6 +26,6 @@ dependencies {
api("androidx.core:core-ktx:1.3.2") api("androidx.core:core-ktx:1.3.2")
// https://android-developers.googleblog.com/2019/07/android-q-beta-5-update.html // https://android-developers.googleblog.com/2019/07/android-q-beta-5-update.html
api("androidx.drawerlayout:drawerlayout:1.1.1") api("androidx.drawerlayout:drawerlayout:1.1.1")
api("androidx.fragment:fragment-ktx:1.3.2") api("androidx.fragment:fragment-ktx:1.3.3")
api("com.google.android.material:material:1.3.0") api("com.google.android.material:material:1.3.0")
} }
rootProject.extra.apply { rootProject.extra.apply {
set("androidPlugin", "com.android.tools.build:gradle:4.1.3") set("androidPlugin", "com.android.tools.build:gradle:4.2.0")
set("kotlinVersion", "1.4.32") set("kotlinVersion", "1.5.0")
} }
repositories { repositories {
......
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