chore: update gradle and dependencies
This commit is contained in:
+2
-4
@@ -8,7 +8,7 @@ import java.util.Locale
|
||||
plugins {
|
||||
id("com.github.ben-manes.versions") version "0.47.0"
|
||||
id("se.patrikerdes.use-latest-versions") version "0.2.18"
|
||||
id("com.diffplug.spotless") version "6.19.0"
|
||||
id("com.diffplug.spotless") version "6.20.0"
|
||||
}
|
||||
|
||||
val jadxVersion by extra { System.getenv("JADX_VERSION") ?: "dev" }
|
||||
@@ -34,9 +34,7 @@ allprojects {
|
||||
commonFormatOptions()
|
||||
}
|
||||
kotlin {
|
||||
ktlint()
|
||||
.setUseExperimental(false)
|
||||
.editorConfigOverride(mapOf("indent_style" to "tab"))
|
||||
ktlint().editorConfigOverride(mapOf("indent_style" to "tab"))
|
||||
commonFormatOptions()
|
||||
}
|
||||
kotlinGradle {
|
||||
|
||||
@@ -17,7 +17,7 @@ dependencies {
|
||||
testImplementation("org.mockito:mockito-core:5.4.0")
|
||||
testImplementation("org.assertj:assertj-core:3.24.2")
|
||||
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.9.3")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
|
||||
testCompileOnly("org.jetbrains:annotations:24.0.1")
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||
distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -8,7 +8,7 @@ dependencies {
|
||||
implementation("com.google.code.gson:gson:2.10.1")
|
||||
|
||||
// TODO: move resources decoding to separate plugin module
|
||||
implementation("com.android.tools.build:aapt2-proto:8.0.2-9289358")
|
||||
implementation("com.android.tools.build:aapt2-proto:8.1.0-10154469")
|
||||
implementation("com.google.protobuf:protobuf-java:3.23.4") // forcing latest version
|
||||
|
||||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
|
||||
@@ -39,7 +39,7 @@ public class DecompilePassWrapper extends AbstractVisitor implements IPassWrappe
|
||||
try {
|
||||
return decompilePass.visit(cls);
|
||||
} catch (Throwable e) {
|
||||
LOG.error("Error in decompile pass init: {}", this, e);
|
||||
LOG.error("Error in decompile pass: {}, class: {}", this, cls, e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ public class DecompilePassWrapper extends AbstractVisitor implements IPassWrappe
|
||||
try {
|
||||
decompilePass.visit(mth);
|
||||
} catch (Throwable e) {
|
||||
LOG.error("Error in decompile pass: {}", this, e);
|
||||
LOG.error("Error in decompile pass: {}, method: {}", this, mth, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ dependencies {
|
||||
|
||||
implementation("io.reactivex.rxjava2:rxjava:2.2.21")
|
||||
implementation("com.github.akarnokd:rxjava2-swing:0.3.7")
|
||||
implementation("com.android.tools.build:apksig:8.0.2")
|
||||
implementation("com.android.tools.build:apksig:8.1.0")
|
||||
implementation("io.github.skylot:jdwp:2.0.0")
|
||||
|
||||
testImplementation(project(":jadx-core").dependencyProject.sourceSets.getByName("test").output)
|
||||
|
||||
@@ -6,7 +6,7 @@ plugins {
|
||||
dependencies {
|
||||
api(project(":jadx-core"))
|
||||
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.6.2")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.7.0")
|
||||
|
||||
testImplementation(project(":jadx-core").dependencyProject.sourceSets.test.get().output)
|
||||
testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@ package jadx.plugins.kotlin.metadata.utils
|
||||
|
||||
import jadx.core.dex.nodes.ClassNode
|
||||
import kotlinx.metadata.KmClass
|
||||
import kotlinx.metadata.isData
|
||||
import kotlinx.metadata.jvm.KotlinClassMetadata
|
||||
|
||||
// don't expose kotlinx.metadata.* types ?
|
||||
@@ -20,7 +21,7 @@ class KmClassWrapper private constructor(
|
||||
KotlinMetadataUtils.mapCompanion(cls, kmCls)
|
||||
|
||||
fun isDataClass() =
|
||||
KotlinUtils.isDataClass(kmCls)
|
||||
kmCls.isData
|
||||
|
||||
// does not require metadata, may be useful for plain java ?
|
||||
fun parseToString() =
|
||||
@@ -34,7 +35,7 @@ class KmClassWrapper private constructor(
|
||||
|
||||
fun ClassNode.getWrapper(): KmClassWrapper? {
|
||||
val metadata = getKotlinClassMetadata()
|
||||
val kmCls = (metadata as? KotlinClassMetadata.Class)?.toKmClass() ?: return null
|
||||
val kmCls = (metadata as? KotlinClassMetadata.Class)?.kmClass ?: return null
|
||||
return KmClassWrapper(this, kmCls)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -5,6 +5,6 @@ import kotlinx.metadata.KmProperty
|
||||
import kotlinx.metadata.jvm.fieldSignature
|
||||
import kotlinx.metadata.jvm.signature
|
||||
|
||||
inline val KmFunction.shortId: String? get() = signature?.asString()
|
||||
inline val KmFunction.shortId: String? get() = signature?.toString()
|
||||
|
||||
inline val KmProperty.shortId: String? get() = fieldSignature?.asString()
|
||||
inline val KmProperty.shortId: String? get() = fieldSignature?.toString()
|
||||
|
||||
-6
@@ -11,16 +11,10 @@ import jadx.core.dex.nodes.FieldNode
|
||||
import jadx.core.dex.nodes.MethodNode
|
||||
import jadx.plugins.kotlin.metadata.model.MethodRename
|
||||
import jadx.plugins.kotlin.metadata.model.ToStringRename
|
||||
import kotlinx.metadata.Flag
|
||||
import kotlinx.metadata.KmClass
|
||||
import java.util.Locale
|
||||
|
||||
object KotlinUtils {
|
||||
|
||||
fun isDataClass(kmCls: KmClass): Boolean {
|
||||
return Flag.Class.IS_DATA(kmCls.flags)
|
||||
}
|
||||
|
||||
fun parseToString(cls: ClassNode): ToStringRename? {
|
||||
val mthToString = cls.searchMethodByShortId(Consts.MTH_TOSTRING_SIGNATURE)
|
||||
?: return null
|
||||
|
||||
@@ -11,6 +11,6 @@ dependencies {
|
||||
implementation(kotlin("scripting-compiler-embeddable"))
|
||||
implementation(kotlin("scripting-ide-services"))
|
||||
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
||||
implementation("io.github.microutils:kotlin-logging-jvm:3.0.5")
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ dependencies {
|
||||
implementation(kotlin("scripting-dependencies"))
|
||||
implementation(kotlin("scripting-dependencies-maven"))
|
||||
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
||||
implementation("io.github.microutils:kotlin-logging-jvm:3.0.5")
|
||||
|
||||
runtimeOnly(project(":jadx-plugins:jadx-dex-input"))
|
||||
|
||||
Reference in New Issue
Block a user