diff --git a/.gitignore b/.gitignore index 4a26c48..55e6dfc 100644 --- a/.gitignore +++ b/.gitignore @@ -111,7 +111,4 @@ gradle-app.setting .gradletasknamecache # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 -# gradle/wrapper/gradle-wrapper.properties - -# Avoid ignoring test resources -!src/test/resources/* +# gradle/wrapper/gradle-wrapper.properties \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 0000000..d8e9561 --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/git_toolbox_prj.xml b/.idea/git_toolbox_prj.xml new file mode 100644 index 0000000..02b915b --- /dev/null +++ b/.idea/git_toolbox_prj.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 38167d7..fd01dff 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,7 +1,10 @@ - + + + + \ No newline at end of file diff --git a/build.gradle b/build.gradle deleted file mode 100644 index c8945d1..0000000 --- a/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - id 'org.jetbrains.kotlin.jvm' version '1.6.20' -} - -group 'app.revanced' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() - mavenLocal() - maven { - url = uri("https://maven.pkg.github.com/ReVancedTeam/multidexlib2") - credentials { - username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") - password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") - } - } -} - -dependencies { - implementation("app.revanced:revanced-patcher:1.0.0-dev.8") - implementation("app.revanced:revanced-patches:1.0.0-dev.4") - implementation("com.google.code.gson:gson:2.9.0") - implementation("org.jetbrains.kotlin:kotlin-stdlib") -} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..af31797 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,39 @@ +plugins { + kotlin("jvm") version "1.6.20" + id("com.github.johnrengelman.shadow") version "7.1.2" +} + +group = "app.revanced" +version = "1.0" + +repositories { + mavenCentral() + mavenLocal() + maven { + url = uri("https://maven.pkg.github.com/ReVancedTeam/multidexlib2") + credentials { + username = project.findProperty("gpr.user") as String? ?: System.getenv("GITHUB_ACTOR") // DO NOT CHANGE! + password = project.findProperty("gpr.key") as String? ?: System.getenv("GITHUB_TOKEN") // DO NOT CHANGE! + } + } +} + +dependencies { + implementation(kotlin("stdlib")) + + implementation("app.revanced:revanced-patcher:1.0.0-dev.8") + implementation("app.revanced:revanced-patches:1.0.0-dev.4") + + implementation("com.google.code.gson:gson:2.9.0") +} + +tasks { + build { + dependsOn(shadowJar) + } + shadowJar { + manifest { + attributes(Pair("Main-Class", "app.revanced.cli.MainKt")) + } + } +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index ab6c068..0000000 --- a/settings.gradle +++ /dev/null @@ -1,2 +0,0 @@ -rootProject.name = 'revanced-cli' - diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..028b7bc --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "revanced-cli" \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/cli/utils/SignatureParser.kt b/src/main/kotlin/app/revanced/cli/utils/SignatureParser.kt index 0cfd665..04d0d31 100644 --- a/src/main/kotlin/app/revanced/cli/utils/SignatureParser.kt +++ b/src/main/kotlin/app/revanced/cli/utils/SignatureParser.kt @@ -1,9 +1,10 @@ package app.revanced.cli.utils -import com.google.gson.JsonParser -import java.io.File + import app.revanced.patcher.signature.MethodSignature +import com.google.gson.JsonParser import org.jf.dexlib2.AccessFlags import org.jf.dexlib2.Opcodes +import java.io.File class SignatureParser { companion object {