From 5069201c34184e3df0f6d5cb5fd3ec5e05ce9c23 Mon Sep 17 00:00:00 2001 From: XhstormR <10527522+XhstormR@users.noreply.github.com> Date: Fri, 19 Feb 2021 17:58:20 +0800 Subject: [PATCH] Update Signed-off-by: XhstormR <10527522+XhstormR@users.noreply.github.com> --- .gitignore | 25 ++++++++++++++----- app/build.gradle.kts | 4 +-- .../leo/monitor/client/BackendService.kt | 2 +- build.gradle.kts | 8 +++--- gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index bb62f78..42ab695 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ -# Created by https://www.gitignore.io/api/gradle,android,androidstudio,jetbrains+all -# Edit at https://www.gitignore.io/?templates=gradle,android,androidstudio,jetbrains+all +# Created by https://www.toptal.com/developers/gitignore/api/gradle,android,androidstudio,jetbrains+all +# Edit at https://www.toptal.com/developers/gitignore?templates=gradle,android,androidstudio,jetbrains+all ### Android ### # Built application files *.apk +*.aar *.ap_ *.aab @@ -18,7 +19,8 @@ bin/ gen/ out/ -release/ +# Uncomment the following line in case you need and you don't have the release build type files in your app +# release/ # Gradle files .gradle/ @@ -60,6 +62,7 @@ captures/ # External native build folder generated in Android Studio 2.2 and later .externalNativeBuild +.cxx/ # Google Services (e.g. APIs or Firebase) # google-services.json @@ -92,10 +95,9 @@ output.json # Replacement of .externalNativeBuild directories introduced # with Android Studio 3.5. -.cxx/ ### JetBrains+all ### -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff @@ -125,6 +127,9 @@ output.json # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml # .idea/modules.xml # .idea/*.iml # .idea/modules @@ -227,6 +232,13 @@ gradle-app.setting *~ *.swp +# Keystore files +*.jks +*.keystore + +# Google Services (e.g. APIs or Firebase) +# google-services.json + # Android Patch # External native build folder generated in Android Studio 2.2 and later @@ -253,6 +265,7 @@ obj/ .idea/sqlDataSources.xml .idea/dynamic.xml .idea/uiDesigner.xml +.idea/jarRepositories.xml # OS-specific files .DS_Store @@ -294,4 +307,4 @@ hs_err_pid* !/gradle/wrapper/gradle-wrapper.jar -# End of https://www.gitignore.io/api/gradle,android,androidstudio,jetbrains+all +# End of https://www.toptal.com/developers/gitignore/api/gradle,android,androidstudio,jetbrains+all diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 5867096..1b2fb8a 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -64,7 +64,7 @@ dependencies { compileOnly("de.robv.android.xposed:api:82") implementation(kotlin("stdlib-jdk8", KotlinCompilerVersion.VERSION)) - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3") implementation("androidx.core:core-ktx:1.3.2") implementation("androidx.preference:preference-ktx:1.1.1") @@ -75,7 +75,7 @@ dependencies { implementation("com.squareup.moshi:moshi:1.11.0") kapt("com.squareup.moshi:moshi-kotlin-codegen:1.11.0") - implementation("com.github.topjohnwu.libsu:io:3.0.2") + implementation("com.github.topjohnwu.libsu:io:3.1.1") } /* diff --git a/app/src/main/java/com/example/leo/monitor/client/BackendService.kt b/app/src/main/java/com/example/leo/monitor/client/BackendService.kt index 4a19528..18489fc 100644 --- a/app/src/main/java/com/example/leo/monitor/client/BackendService.kt +++ b/app/src/main/java/com/example/leo/monitor/client/BackendService.kt @@ -94,7 +94,7 @@ object BackendService { suspend fun uploadDex(dexPayload: DexPayload) = doResponseAction { val (appHash, payload) = dexPayload - val bytes = SuFileInputStream(payload).buffered().use { it.readBytes() } + val bytes = SuFileInputStream.open(payload).buffered().use { it.readBytes() } val formData = RequestBody.create(OCTET_STREAM_TYPE, bytes) .let { MultipartBody.Part.createFormData("file", payload.name, it) } diff --git a/build.gradle.kts b/build.gradle.kts index 157f4f7..d7817cb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,13 +4,13 @@ buildscript { maven("https://mirrors.huaweicloud.com/repository/maven") } dependencies { - classpath("com.android.tools.build:gradle:4.1.1") - classpath(kotlin("gradle-plugin", version = "1.4.21")) + classpath("com.android.tools.build:gradle:4.1.3") + classpath(kotlin("gradle-plugin", version = "1.4.32")) } } plugins { - id("org.jlleitschuh.gradle.ktlint") version "9.4.1" + id("org.jlleitschuh.gradle.ktlint") version "10.0.0" } allprojects { @@ -30,7 +30,7 @@ tasks { } withType { - gradleVersion = "6.7" + gradleVersion = "6.8.2" distributionType = Wrapper.DistributionType.ALL } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 14e30f7..25d3265 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.7-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists