Commit Graph

144 Commits

Author SHA1 Message Date
Connor Tumbleson 679c133d21
feat: make aapt2 default (#3370) 2023-10-04 20:52:28 -04:00
Connor Tumbleson 23d9ec0e58
refactor: support more resource-mode params (#3354) 2023-10-01 06:26:54 -04:00
Connor Tumbleson 93c66ef373
build: migrate towards "libs.versions.toml" (#3353) 2023-10-01 06:08:47 -04:00
Connor Tumbleson 6e3fac2414
refactor: make _options lowercase (#3324) 2023-09-09 09:47:41 -04:00
Connor Tumbleson a117132e39
Feat: Introduce "res-mode" options. (#3318)
* Revert "Remove Apktool Dummys. (#3258)"

This reverts commit 0e226928ce.

* feat: properly add dummys

* refactor: shorten ResTypeSpec

* style: remove extra space

* refactor: extract FlagItem into own class

* refactor: notate which type is null

* fix: only add dummys if enabled

* feat: skip unknown (if enabled)

* feat: introduce "res-mode"

* feat: expose config on res table

* feat: add method to base attr for res skips

* fix: ensure autobuild doesn't choke

* refactor: remove java17 enhanced switch

* refactor: rename methods

* refactor: cleanup res-mode param

* test: introduction of test/sample apk

* refactor: make ResXmlPatcher public for loading XML

* test: assertions for dummy|leave|retain

* fix: prevent using `@null` as a name

* refactor: shorten long param for 'resm'

* refactor: leave for preserve
2023-09-09 07:29:39 -04:00
Connor Tumbleson dcb6788243
refactor: verbose doesn't adapt handler (#3310) 2023-09-03 07:06:44 -04:00
Connor Tumbleson 7d76829ad9
feat: shorten archive name to apktool-{version}.jar (#3289) 2023-08-23 07:26:21 -04:00
Connor Tumbleson 342ff67a4c
Migrate to Gradle Kotlin DSL (#3249)
* feat: initial migration to kotlin

* feat: initial migration to kotlin

* fix: wire up dependencies

* fix: Deprecated tag for kotlin detection

* refactor: put all modules into sub-projects

* fix: include jar file (android framework)

* fix: add version message/info

* fix: wire up version/gitrev to properties

* fix: wire up proguard on cli

* fix: wire up proguard

* fix: wire up output cleaning command

* fix: drop license header on gradle files

 - fully rewritten from scratch by myself
 - no longer including license header on build files

* fix: add compile utf8/flags for java8

* refactor: remove unneeded curly braces

* feat: progress towards maven-publish

* build: publish to maven

* docs: update documentation

* refactor: prevent implicit order by removal of afterEvaluate

* build: remove unused license plugin
2023-08-05 06:28:31 -04:00
Igor Eisberg 33ca2929c9
refactor: clean up style and redundancy (#3232)
* refactor: clean up redundancy

* refactor: no need for both setApkFile and setApkFileName
2023-07-29 18:56:27 -04:00
Connor Tumbleson ce180dce87
fix: un-deprecate --copy-original
-- fixes: #2129
2023-07-29 06:51:29 -04:00
sv99 62b9eedb9e
Remove SnakeYAML for manual YAML Parser (#3191)
* Simple straitforward yaml serialization with minimal needed functionality

* Consolidate ApkInfo tests in the package brut.androlib.apk, unify interface YamlReader and add ApkInfoSerializationTest read -> write -> read test

* remove dependencies from snakeyaml

* remove unused methods

* correct indent test value

* correct style with curly braces

* add test item with hieroglyph
2023-07-29 05:59:15 -04:00
Igor Eisberg 79b2173b85
style: normalize command descs and redundancy (#3188) 2023-07-21 06:08:30 -04:00
sv99 e3e2a7e1d6
Allows run app from gradle for debugging purposes (#3179)
Co-authored-by: Connor Tumbleson <iBotPeaches@users.noreply.github.com>
2023-07-20 06:03:47 -04:00
Connor Tumbleson 1493d9d357
fix: opt out of stricter java rules for zip64 and dot entries (#3178)
* fix: opt out of stricter java rules for zip64 and dot entries

* test: assert specific system properties for test suite
2023-07-20 05:01:21 -04:00
Connor Tumbleson ba2f1283ed
fix: update links for apktool/baksmali/smali on usage 2023-07-17 06:55:08 -04:00
sv99 a7e2e3e5e1
Extract into ApkInvoker and split into data classes. (#3124)
* extract AaptInvoker and rename MetaFile to ApkInfo, all decode methods from AndrolibResources moved to the ApkDecoder

* extract ARSCData and FlagsOffset from ARSCDecoder and remove unused imports

* rebase to master

* move decodeManifest and decodeResources to the ResourceDecoder

* remove commented old code
2023-07-03 18:38:52 -04:00
sv99 40d427e5bd
Extract class Framework from AndrolibResources (#3105) 2023-06-27 10:51:26 -04:00
sv99 9c495cae29
Move build functions from Androlib to the ApkBuilder (#3103) 2023-06-27 08:25:27 -04:00
Connor Tumbleson 10495cbe96
Refactor into common config object. (#3100)
* extract Config

* extract Config

* style: linting

---------

Co-authored-by: Slava Volkov <sv99@inbox.ru>
2023-06-25 15:07:23 -04:00
sv99 168aa1abc0
move AndrolidExceptions to the package brut.androlib.exceptions (renamed from brut.androlib.err) (#3088) 2023-06-10 13:16:31 -04:00
sv99 80dcdd1d34
add application plugin to the apktool-cli (#3070) 2023-05-20 13:53:29 -04:00
Connor Tumbleson 67a936f1c7
build: include bleeding edge smali from source via jitpack (#2941)
* build: include smali from source

* refactor: adjust build.gradle for repositories
2022-11-24 06:15:41 -05:00
erev0s 8fab4bfb3d
added option to include generic/permissive network security config file durin… (#2791)
* added option to include permissive network security config file during build

* added tests for app with existing network config and for app without

* minor fixes for pull 2791

* refactor: slim down test app for network config

* style: remove extra newlines

* refactor: moved network tests to aapt2

* refactor: remove unused exceptions

* test (aapt2): ensure aapt2 is used for net-sec-conf

* fix (cli): block use of net-sec-conf on aapt1

* fix conflict

Co-authored-by: Connor Tumbleson <connor@sourcetoad.com>
Co-authored-by: Connor Tumbleson <connor.tumbleson@gmail.com>
2022-05-07 06:52:07 -04:00
Al Sutton 95874be448
Replace use of deprecated methods with their recommended replacements (#2713)
* Replace use of deprecated methods with their recommended replacements

* Add scripting jmod to proguard inputs
2021-12-13 06:27:19 -05:00
Connor Tumbleson 9bdf385538 style: cleanup build vs Build 2021-09-06 06:59:30 -04:00
Connor Tumbleson 0f690e4654 refactor: remove redundant suppression 2021-09-06 06:59:30 -04:00
Connor Tumbleson 3118b54632 refactor: extract common element from if statement 2021-09-06 06:59:30 -04:00
Connor Tumbleson d48b407f5b fix: remove unused exceptions in CLI 2021-09-06 06:59:30 -04:00
Connor Tumbleson 3b179f8750 refactor: rename ApkOptions -> Options/BuildOptions 2021-09-06 06:59:30 -04:00
Connor Tumbleson 5fa165a023
refactor: deprecations for 2.6.0 are now 3.0.0
* 2.6.0 -> 2.6.1 (fixes, quicker release)
 * 2.6.0 -> 3.0.0 (big picture, breaking change, slower release)
2021-09-01 07:25:58 -04:00
Goooler 94ed86db28 Code cleanups 2021-08-27 01:16:46 +08:00
Goooler e25c3636ff Update docs & licenses to use https 2021-08-26 07:40:32 -04:00
Connor Tumbleson eaab729be5
build: remove deprecated jcenter repo location 2021-07-05 19:44:30 -04:00
IgorEisberg 992de66bac Handle setAnalysisMode properly 2021-07-03 22:17:00 +03:00
IgorEisberg bb42159880 style: rename vars for consistency 2021-07-03 21:26:16 +03:00
Goooler 3352088d00 Add proguard rule 2021-04-14 06:33:21 -04:00
Connor Tumbleson 447ba50332
refactor: drop author tags and support javadocs 2021-03-07 15:06:45 -05:00
Connor Tumbleson e9a897febe
build: syntax updates for gradle files 2021-03-04 07:21:22 -05:00
Connor Tumbleson db1fe98524 feat: usage output for list-frameworks 2020-11-30 07:11:08 -05:00
Connor Tumbleson 2d41305998
fix: v2.6.0 not v1.6.0 2020-11-28 21:15:30 -05:00
Connor Tumbleson 4f13bcad48 fix: add message explaining deprecation of 32bit 2020-11-28 16:26:00 -05:00
Connor Tumbleson a91aad461e
fix: secure links in usage output 2020-11-28 16:18:54 -05:00
Connor Tumbleson 693d8d1fbf
style: copyright year to start of project 2020-11-28 16:18:40 -05:00
Connor Tumbleson 590f9c1392
fix: remove warning about smali-debugging 2020-11-28 09:10:37 -05:00
Connor Tumbleson 94e224ee3f
fix: delay -c removal till 2.6 2020-11-28 08:59:48 -05:00
Giacomo Ferretti d3f9d5acd2 build: update 'proguard' from 6.1.1 to 7.0.0
`jcenter()` it's needed because they didn't upload to Maven Central yet. https://github.com/Guardsquare/proguard/issues/54

There are some minor issues with proguard still.
It produces a lot of warnings since Gradle 6.0, but it's fixable on their side. https://github.com/Guardsquare/proguard/issues/14
2020-08-14 07:56:52 -04:00
Giacomo Ferretti 4c3f1f335a refactor: 'compile' it's deprecated
`compile` it's deprecated since Gradle 6.0 and been discouraged since Gradle 3.4.

We should use `implementation` and `api` instead because `compile` will be removed in Gradle 7.0.

https://docs.gradle.org/6.5.1/userguide/upgrading_version_5.html#deprecations
2020-08-14 07:56:52 -04:00
Leo Wandersleb 546577df6a exit code 1 if parameters are wrong
for use in scripts, it's not convenient to get an exit code 0 on
failure.
2020-06-16 06:18:57 -04:00
Connor Tumbleson 3f831c8221
refactor: copyright year should be year started, not current year 2020-04-11 06:33:05 -04:00
Frieder Bluemle 81ca785e02
Fix file header comment format 2020-02-29 17:37:46 -08:00