Compare commits

..

9 Commits

Author SHA1 Message Date
semantic-release-bot
0545341f9a chore(release): 1.1.5-dev.1 [skip ci]
## [1.1.5-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.4...v1.1.5-dev.1) (2023-10-23)
2023-10-23 00:03:37 +00:00
oSumAtrIX
035870e08d build: Simplify declaration of repositories 2023-10-22 23:37:19 +02:00
oSumAtrIX
b58ea35f6a build(Needs bump): Bump dependencies 2023-10-22 23:36:31 +02:00
oSumAtrIX
3f61394f0a build: Bump Kotlin Gradle plugin version 2023-10-22 16:14:45 +02:00
semantic-release-bot
9536413fa3 chore(release): 1.1.4 [skip ci]
## [1.1.4](https://github.com/ReVanced/revanced-library/compare/v1.1.3...v1.1.4) (2023-10-12)

### Bug Fixes

* Ask for root permissions before trying to use them ([aea1d69](aea1d69157))
* Execute ADB commands sequentially to fix mounting issues ([#12](https://github.com/ReVanced/revanced-library/issues/12)) ([fda3eca](fda3eca74f))
2023-10-12 19:49:25 +00:00
oSumAtrIX
7b1ca25a6c chore: Merge branch dev to main (#13) 2023-10-12 21:47:46 +02:00
semantic-release-bot
79640bcb8c chore(release): 1.1.4-dev.2 [skip ci]
## [1.1.4-dev.2](https://github.com/ReVanced/revanced-library/compare/v1.1.4-dev.1...v1.1.4-dev.2) (2023-10-10)

### Bug Fixes

* Ask for root permissions before trying to use them ([aea1d69](aea1d69157))
2023-10-10 08:25:22 +00:00
oSumAtrIX
aea1d69157 fix: Ask for root permissions before trying to use them 2023-10-10 10:23:39 +02:00
oSumAtrIX
7a6977aff2 refactor: Remove unnecessary function 2023-10-10 10:23:00 +02:00
6 changed files with 32 additions and 23 deletions

View File

@@ -1,3 +1,20 @@
## [1.1.5-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.4...v1.1.5-dev.1) (2023-10-23)
## [1.1.4](https://github.com/ReVanced/revanced-library/compare/v1.1.3...v1.1.4) (2023-10-12)
### Bug Fixes
* Ask for root permissions before trying to use them ([aea1d69](https://github.com/ReVanced/revanced-library/commit/aea1d6915766d9757075ee459955aa335d906bab))
* Execute ADB commands sequentially to fix mounting issues ([#12](https://github.com/ReVanced/revanced-library/issues/12)) ([fda3eca](https://github.com/ReVanced/revanced-library/commit/fda3eca74f30b968d8ee816d63a3dcf493e026de))
## [1.1.4-dev.2](https://github.com/ReVanced/revanced-library/compare/v1.1.4-dev.1...v1.1.4-dev.2) (2023-10-10)
### Bug Fixes
* Ask for root permissions before trying to use them ([aea1d69](https://github.com/ReVanced/revanced-library/commit/aea1d6915766d9757075ee459955aa335d906bab))
## [1.1.4-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.3...v1.1.4-dev.1) (2023-10-09) ## [1.1.4-dev.1](https://github.com/ReVanced/revanced-library/compare/v1.1.3...v1.1.4-dev.1) (2023-10-09)

View File

@@ -1,11 +1,18 @@
plugins { plugins {
kotlin("jvm") version "1.9.0" kotlin("jvm") version "1.9.10"
alias(libs.plugins.binary.compatibility.validator) alias(libs.plugins.binary.compatibility.validator)
`maven-publish` `maven-publish`
} }
group = "app.revanced" group = "app.revanced"
repositories {
mavenCentral()
mavenLocal()
maven { url = uri("https://jitpack.io") }
google()
}
dependencies { dependencies {
implementation(libs.revanced.patcher) implementation(libs.revanced.patcher)
implementation(libs.kotlin.reflect) implementation(libs.kotlin.reflect)

View File

@@ -1,4 +1,4 @@
org.gradle.parallel = true org.gradle.parallel = true
org.gradle.caching = true org.gradle.caching = true
kotlin.code.style = official kotlin.code.style = official
version = 1.1.4-dev.1 version = 1.1.5-dev.1

View File

@@ -5,7 +5,7 @@ jackson-module-kotlin = "2.14.3"
jadb = "1.2.1" jadb = "1.2.1"
kotlin-reflect = "1.9.0" kotlin-reflect = "1.9.0"
kotlin-test = "1.8.20-RC" kotlin-test = "1.8.20-RC"
revanced-patcher = "17.0.0" revanced-patcher = "18.0.0"
binary-compatibility-validator = "0.13.2" binary-compatibility-validator = "0.13.2"
[libraries] [libraries]
@@ -15,7 +15,7 @@ jackson-module-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-
jadb = { module = "app.revanced:jadb", version.ref = "jadb" } jadb = { module = "app.revanced:jadb", version.ref = "jadb" }
kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin-reflect" } kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin-reflect" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin-test" } kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin-test" }
revanced-patcher = { module = "app.revanced.revanced-patcher:revanced-patcher", version.ref = "revanced-patcher" } revanced-patcher = { module = "app.revanced:revanced-patcher", version.ref = "revanced-patcher" }
[plugins] [plugins]
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" } binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binary-compatibility-validator" }

View File

@@ -1,10 +1 @@
dependencyResolutionManagement {
repositories {
mavenCentral()
mavenLocal()
maven { url = uri("https://jitpack.io") }
google()
}
}
rootProject.name = "revanced-library" rootProject.name = "revanced-library"

View File

@@ -2,7 +2,6 @@ package app.revanced.library.adb
import se.vidstige.jadb.JadbDevice import se.vidstige.jadb.JadbDevice
import se.vidstige.jadb.RemoteFile import se.vidstige.jadb.RemoteFile
import se.vidstige.jadb.ShellProcess
import se.vidstige.jadb.ShellProcessBuilder import se.vidstige.jadb.ShellProcessBuilder
import java.io.File import java.io.File
@@ -16,19 +15,14 @@ internal fun JadbDevice.buildCommand(command: String, su: Boolean = true): Shell
return shellProcessBuilder(cmd, *args.toTypedArray()) return shellProcessBuilder(cmd, *args.toTypedArray())
} }
internal fun JadbDevice.run(command: String, su: Boolean = true): ShellProcess { internal fun JadbDevice.run(command: String, su: Boolean = true) =
return this.buildCommand(command, su).start()!! this.buildCommand(command, su).start()
}
internal fun JadbDevice.hasSu() = internal fun JadbDevice.hasSu() =
this.startCommand("which su", false).waitFor() == 0 this.run("whoami", true).waitFor() == 0
internal fun JadbDevice.push(file: File, targetFilePath: String) = internal fun JadbDevice.push(file: File, targetFilePath: String) =
push(file, RemoteFile(targetFilePath)) push(file, RemoteFile(targetFilePath))
internal fun JadbDevice.createFile(targetFile: String, content: String) = internal fun JadbDevice.createFile(targetFile: String, content: String) =
push(content.byteInputStream(), System.currentTimeMillis(), 644, RemoteFile(targetFile)) push(content.byteInputStream(), System.currentTimeMillis(), 644, RemoteFile(targetFile))
private fun JadbDevice.startCommand(command: String, su: Boolean) =
shellProcessBuilder(if (su) "su -c '$command'" else command).start()