From 055b5fe915cb0a1fa7016ebe5b7ca07e47bdfdf3 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Fri, 18 Nov 2022 07:33:27 -0500 Subject: [PATCH 1/2] build: include smali from source --- brut.apktool/apktool-lib/build.gradle | 8 ++++++++ build.gradle | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/brut.apktool/apktool-lib/build.gradle b/brut.apktool/apktool-lib/build.gradle index 13b69c4ebd..69a320edf1 100644 --- a/brut.apktool/apktool-lib/build.gradle +++ b/brut.apktool/apktool-lib/build.gradle @@ -49,4 +49,12 @@ dependencies { depends.commons_text testImplementation depends.xmlunit + + repositories { + mavenCentral() + + // Obtain baksmali/smali from source builds - https://github.com/iBotPeaches/smali + // Remove when official smali releases come out again. + maven { url 'https://jitpack.io' } + } } diff --git a/build.gradle b/build.gradle index 55415c6784..629901f569 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ import java.nio.charset.StandardCharsets buildscript { ext { depends = [ - baksmali : 'org.smali:baksmali:2.5.2', + baksmali : 'com.github.iBotPeaches.smali:baksmali:403e90375e', commons_cli : 'commons-cli:commons-cli:1.5.0', commons_io : 'commons-io:commons-io:2.11.0', commons_lang : 'org.apache.commons:commons-lang3:3.12.0', @@ -27,14 +27,13 @@ buildscript { junit : 'junit:junit:4.13.2', proguard_gradle: 'com.guardsquare:proguard-gradle:7.1.1', snakeyaml : 'org.yaml:snakeyaml:1.32:android', - smali : 'org.smali:smali:2.5.2', + smali : 'com.github.iBotPeaches.smali:smali:403e90375e', xmlpull : 'xpp3:xpp3:1.1.4c', xmlunit : 'xmlunit:xmlunit:1.6', ] } repositories { - mavenCentral() gradlePluginPortal() } dependencies { From 92352d75aebdd9d79043e0564e78d70c5be3db13 Mon Sep 17 00:00:00 2001 From: Connor Tumbleson Date: Sat, 19 Nov 2022 16:23:02 -0500 Subject: [PATCH 2/2] refactor: adjust build.gradle for repositories --- brut.apktool/apktool-cli/build.gradle | 9 ++++--- brut.apktool/apktool-lib/build.gradle | 35 ++++++++++----------------- brut.j.common/build.gradle | 5 ---- brut.j.dir/build.gradle | 7 +++--- brut.j.util/build.gradle | 5 ++-- build.gradle | 12 ++++++--- 6 files changed, 31 insertions(+), 42 deletions(-) diff --git a/brut.apktool/apktool-cli/build.gradle b/brut.apktool/apktool-cli/build.gradle index 083c7b5243..d115f36dde 100644 --- a/brut.apktool/apktool-cli/build.gradle +++ b/brut.apktool/apktool-cli/build.gradle @@ -23,11 +23,12 @@ dependencies { } buildscript { - repositories { - mavenCentral() - } - dependencies { + repositories { + mavenCentral() + gradlePluginPortal() + } + classpath(depends.proguard_gradle) { exclude group: 'com.android.tools.build' } diff --git a/brut.apktool/apktool-lib/build.gradle b/brut.apktool/apktool-lib/build.gradle index 69a320edf1..080ffb7771 100644 --- a/brut.apktool/apktool-lib/build.gradle +++ b/brut.apktool/apktool-lib/build.gradle @@ -33,28 +33,19 @@ processResources { } dependencies { - testImplementation depends.junit - - api project(':brut.j.dir'), - project(':brut.j.util'), - project(':brut.j.common') - - implementation depends.baksmali, - depends.smali, - depends.snakeyaml, - depends.xmlpull, - depends.guava, - depends.commons_lang, - depends.commons_io, - depends.commons_text + api project(':brut.j.dir') + api project(':brut.j.util') + api project(':brut.j.common') + + implementation depends.baksmali + implementation depends.smali + implementation depends.snakeyaml + implementation depends.xmlpull + implementation depends.guava + implementation depends.commons_lang + implementation depends.commons_io + implementation depends.commons_text + testImplementation depends.junit testImplementation depends.xmlunit - - repositories { - mavenCentral() - - // Obtain baksmali/smali from source builds - https://github.com/iBotPeaches/smali - // Remove when official smali releases come out again. - maven { url 'https://jitpack.io' } - } } diff --git a/brut.j.common/build.gradle b/brut.j.common/build.gradle index 98929c3fc8..41a98796cf 100644 --- a/brut.j.common/build.gradle +++ b/brut.j.common/build.gradle @@ -13,8 +13,3 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -dependencies { - testImplementation depends.junit -} - diff --git a/brut.j.dir/build.gradle b/brut.j.dir/build.gradle index 0512ffe993..0e5e1cfedd 100644 --- a/brut.j.dir/build.gradle +++ b/brut.j.dir/build.gradle @@ -15,8 +15,7 @@ */ dependencies { - implementation project(':brut.j.common'), - project(':brut.j.util'), - depends.commons_io - testImplementation depends.junit + implementation project(':brut.j.common') + implementation project(':brut.j.util') + implementation depends.commons_io } diff --git a/brut.j.util/build.gradle b/brut.j.util/build.gradle index 5e8c7cd504..92d7c9231d 100644 --- a/brut.j.util/build.gradle +++ b/brut.j.util/build.gradle @@ -15,7 +15,6 @@ */ dependencies { - implementation project(':brut.j.common'), - depends.commons_io - testImplementation depends.junit + implementation project(':brut.j.common') + implementation depends.commons_io } diff --git a/build.gradle b/build.gradle index 629901f569..d7b24581ae 100644 --- a/build.gradle +++ b/build.gradle @@ -79,6 +79,14 @@ allprojects { "licenseMain", "licenseTest" ] + + repositories { + mavenCentral() + + // Obtain baksmali/smali from source builds - https://github.com/iBotPeaches/smali + // Remove when official smali releases come out again. + maven { url 'https://jitpack.io' } + } } tasks.withType(JavaCompile).configureEach { @@ -135,10 +143,6 @@ task snapshot { subprojects { apply plugin: 'java' - repositories { - mavenCentral() - } - test { testLogging { exceptionFormat = 'full'