chore: upgrade to kotlin-logging 5 (PR #1966)
* upgrade to kotlin-logging 5 * apply code autoformatting * resolve deprecation warnings --------- Co-authored-by: Skylot <skylot@gmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ dependencies {
|
|||||||
implementation(kotlin("stdlib-common"))
|
implementation(kotlin("stdlib-common"))
|
||||||
implementation(kotlin("script-runtime"))
|
implementation(kotlin("script-runtime"))
|
||||||
|
|
||||||
implementation("io.github.microutils:kotlin-logging-jvm:3.0.5")
|
implementation("io.github.oshai:kotlin-logging-jvm:5.0.1")
|
||||||
|
|
||||||
// script context support in IDE is poor, use stubs and manual imports for now
|
// script context support in IDE is poor, use stubs and manual imports for now
|
||||||
// kotlinScriptDef(project(":jadx-plugins:jadx-script:jadx-script-runtime"))
|
// kotlinScriptDef(project(":jadx-plugins:jadx-script:jadx-script-runtime"))
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
@file:Suppress("MayBeConstant", "unused")
|
@file:Suppress("MayBeConstant", "unused")
|
||||||
|
|
||||||
|
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||||
import jadx.plugins.script.runtime.JadxScriptInstance
|
import jadx.plugins.script.runtime.JadxScriptInstance
|
||||||
import mu.KotlinLogging
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stubs for JadxScriptBaseClass script super class
|
* Stubs for JadxScriptBaseClass script super class
|
||||||
|
|||||||
@@ -12,5 +12,5 @@ dependencies {
|
|||||||
implementation(kotlin("scripting-ide-services"))
|
implementation(kotlin("scripting-ide-services"))
|
||||||
|
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
||||||
implementation("io.github.microutils:kotlin-logging-jvm:3.0.5")
|
implementation("io.github.oshai:kotlin-logging-jvm:5.0.1")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ dependencies {
|
|||||||
implementation(kotlin("scripting-jvm"))
|
implementation(kotlin("scripting-jvm"))
|
||||||
implementation(kotlin("scripting-jvm-host"))
|
implementation(kotlin("scripting-jvm-host"))
|
||||||
|
|
||||||
implementation("io.github.microutils:kotlin-logging-jvm:3.0.5")
|
implementation("io.github.oshai:kotlin-logging-jvm:5.0.1")
|
||||||
|
|
||||||
testImplementation(project(":jadx-core"))
|
testImplementation(project(":jadx-core"))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ dependencies {
|
|||||||
implementation(kotlin("scripting-dependencies-maven"))
|
implementation(kotlin("scripting-dependencies-maven"))
|
||||||
|
|
||||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
||||||
implementation("io.github.microutils:kotlin-logging-jvm:3.0.5")
|
implementation("io.github.oshai:kotlin-logging-jvm:5.0.1")
|
||||||
|
|
||||||
runtimeOnly(project(":jadx-plugins:jadx-dex-input"))
|
runtimeOnly(project(":jadx-plugins:jadx-dex-input"))
|
||||||
runtimeOnly(project(":jadx-plugins:jadx-smali-input"))
|
runtimeOnly(project(":jadx-plugins:jadx-smali-input"))
|
||||||
|
|||||||
+2
-2
@@ -44,11 +44,11 @@ abstract class JadxScriptTemplate(
|
|||||||
fun getJadxInstance() = scriptInstance
|
fun getJadxInstance() = scriptInstance
|
||||||
|
|
||||||
fun println(message: Any?) {
|
fun println(message: Any?) {
|
||||||
log.info(message?.toString())
|
log.info { message }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun print(message: Any?) {
|
fun print(message: Any?) {
|
||||||
log.info(message?.toString())
|
log.info { message }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
package jadx.plugins.script.runtime
|
package jadx.plugins.script.runtime
|
||||||
|
|
||||||
|
import io.github.oshai.kotlinlogging.KLogger
|
||||||
|
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||||
import jadx.api.JadxArgs
|
import jadx.api.JadxArgs
|
||||||
import jadx.api.JadxDecompiler
|
import jadx.api.JadxDecompiler
|
||||||
import jadx.api.JavaClass
|
import jadx.api.JavaClass
|
||||||
@@ -18,8 +20,6 @@ import jadx.plugins.script.runtime.data.Rename
|
|||||||
import jadx.plugins.script.runtime.data.Replace
|
import jadx.plugins.script.runtime.data.Replace
|
||||||
import jadx.plugins.script.runtime.data.Search
|
import jadx.plugins.script.runtime.data.Search
|
||||||
import jadx.plugins.script.runtime.data.Stages
|
import jadx.plugins.script.runtime.data.Stages
|
||||||
import mu.KLogger
|
|
||||||
import mu.KotlinLogging
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
const val JADX_SCRIPT_LOG_PREFIX = "JadxScript:"
|
const val JADX_SCRIPT_LOG_PREFIX = "JadxScript:"
|
||||||
|
|||||||
Reference in New Issue
Block a user