History log of /dalvik/dx/src/com/android/dx/command/Main.java
Revision Date Author Comments
6f3916321e14235a0bceea92a90460215f4c1b73 05-Oct-2017 Orion Hodson <oth@google.com> dx: Revise interface method handling

Adds a new flag --allow-all-interface-method-invokes to allow default
interface methods to be invoked at any API level and static interface
methods to be invoked at API level >= 21. This is primarily present
for app compat and should be used with caution.

Adds warning on {default,static} interface method definition below API
level 24.

Extends error reporting from the simulator to include details of the
method causing the issue.

Bug: 35261456
Test: dalvik/dx/tests/run-test 143
Test: dalvik/dx/tests/run-all-tests
Test: m -j32
Change-Id: I8ce5c8c31e84e4734d6ca3d215030340d93f2964
e9262fc38f6fc3645a209fac7c4919e4d9cda576 04-Jan-2017 Colin Cross <ccross@android.com> Allow invokevirtual, invokespecial, invokestatic on interface methods

Allow default and static methods on interfaces if
--min-sdk-version >= 24.

Test: make checkbuild
Change-Id: I6b617a37256bdb95f4c11e58fe2ebf08cf7aa324
0cec7ba395236edb324ccb9217abdeeabd9d1dc0 21-Feb-2017 Colin Cross <ccross@android.com> Reflow dx help text

Rewrap the dx help text so that it all fits on 80 character display,
while also removing extra line wrapping at 80 characters in the code
that was making the code less readable.

Test: dx --help
Change-Id: I9c7fbd76744a0ee51c6b07a272b3a9aa9f7c72f2
8f68769869e02895dc6474a5cd0bca20977e5ecd 21-Nov-2016 Chris Warrington <cmw@google.com> Make dx code re-entrant

Remove static state, clear biggest caches after running.

Test: TBD.

Change-Id: Ib41a61687b48bfb46f7e104c41d784cad61f306a
e345a3565597b76ee5bf6bfbf2c84ce9271be079 31-Oct-2014 Csaba Kozák <kozakcsabi@gmail.com> Command line option for disabling warnings

This commit adds a new command line option to dx:
--no-warning.
If the caller appends this to the arguments, dx won't print
warnings to System.err. This can be useful if the user
dexes external jars with old class format, so dx would
print lot of warning about those.

Bug: https://code.google.com/p/android/issues/detail?id=78285

Signed-off-by: Csaba Kozák <kozakcsabi@gmail.com>

(cherry picked from commit ef1de423e70704c478ee77956f44b0a040d8bede)

Change-Id: I6d09c684b5eb97aa28e0b12e3ef44b46293c7dec
ef1de423e70704c478ee77956f44b0a040d8bede 31-Oct-2014 Csaba Kozák <kozakcsabi@gmail.com> Command line option for disabling warnings

This commit adds a new command line option to dx:
--no-warning.
If the caller appends this to the arguments, dx won't print
warnings to System.err. This can be useful if the user
dexes external jars with old class format, so dx would
print lot of warning about those.

Bug: https://code.google.com/p/android/issues/detail?id=78285

Change-Id: Ic2da274ec72e096bcf871c1f4512c54ddc228721
Signed-off-by: Csaba Kozák <kozakcsabi@gmail.com>
8a5d5ccc26c97d555024c36f54140f07a4b40b8c 08-Aug-2014 John Fazekas <jfazekas@fd-software.com> Fixes command line too long error on Windows

On Windows machines the command line can only accept
commands that are 8192 characters or less. This can
cause a problem when a project has many dependencies
and many libraries are being passed to dex at once.

This fixes it by adding a new option to dex called
--input-list that can read inputs from a file.
This way we only have to pass a single file name
instead of a ton of jar files. This keeps the command
short so Windows will not complain about it.

Bug: 17438982

Signed-off-by: John Fazekas <jfazekas@fd-software.com>

(cherry picked from commit 914f2263ca57b21dc4ef1fb218e345a16a5a5db5)

Change-Id: I6edd1e7c1d1fddc8d6bf4c4963295d4f4e64032e
914f2263ca57b21dc4ef1fb218e345a16a5a5db5 08-Aug-2014 John Fazekas <jfazekas@fd-software.com> Fixes command line too long error on Windows

On Windows machines the command line can only accept
commands that are 8192 characters or less. This can
cause a problem when a project has many dependencies
and many libraries are being passed to dex at once.

This fixes it by adding a new option to dex called
--input-list that can read inputs from a file.
This way we only have to pass a single file name
instead of a ton of jar files. This keeps the command
short so Windows will not complain about it.

Change-Id: Ia62ed125c66b24ac81799d3bbac460ae07495b25
Signed-off-by: John Fazekas <jfazekas@fd-software.com>
4c656e4ec2f5c5036dc67fb4034c1e7ff7abf343 31-Jul-2013 Benoit Lamarche <benoitlamarche@google.com> Introduce --multi-dex option in dx.

Add --multi-dex options to dx command line to allow the generation of
several dex files when method index limit is about to be reached.
Also add
--main-dex-list allowing to force some classes in the main dex.
--minimal-main-dex to keep in main edx only classes specified by
main-dex-list.
--set-max-idx-number to set an arbitrary idx limit for the
splitting.

(cherry picked from commit c7daf656da3a4854296b6a8bb702e3ee418450e5)

Change-Id: I2b42272be91484a75783eb94cd30581159948975
c7daf656da3a4854296b6a8bb702e3ee418450e5 31-Jul-2013 Benoit Lamarche <benoitlamarche@google.com> Introduce --multi-dex option in dx.

Add --multi-dex options to dx command line to allow the generation of
several dex files when method index limit is about to be reached.
Also add
--main-dex-list allowing to force some classes in the main dex.
--minimal-main-dex to keep in main edx only classes specified by
main-dex-list.
--set-max-idx-number to set an arbitrary idx limit for the
splitting.

Change-Id: I57d0860b6156e53355e08151b64c1320b7984004
f870f2dce9300c8dec620613371f08e5c234245b 16-Oct-2012 jeffhao <jeffhao@google.com> Add dx option to always generate const-string/jumbo.do not merge.

This allows large dex files with many strings to be merged properly.

(cherry picked from commit 266f45ff7da18022faf5f77df76c69f8cdad313f)

Change-Id: I5fe4c55d84a91101a4f89f590117aa6dc0bfc0f2
9db54b1e21b8e994658890328e57caa822e444a7 16-Oct-2012 jeffhao <jeffhao@google.com> Add dx option to always generate const-string/jumbo. do not merge.

This allows large dex files with many strings to be merged properly.

(cherry picked from commit 266f45ff7da18022faf5f77df76c69f8cdad313f)

Change-Id: I0277b1a0a81b3a77092a9e9f8f648ff190e29723
69dd411c7ef47e3ea3f6ff8be9a4d903f545f0d5 16-Oct-2012 jeffhao <jeffhao@google.com> Add dx option to always generate const-string/jumbo. do not merge.

This allows large dex files with many strings to be merged properly.

(cherry picked from commit 266f45ff7da18022faf5f77df76c69f8cdad313f)

Change-Id: I5e85346610c4c5280ecdd9e97c63eaef4420642e
266f45ff7da18022faf5f77df76c69f8cdad313f 16-Oct-2012 jeffhao <jeffhao@google.com> Add dx option to always generate const-string/jumbo.

This allows large dex files with many strings to be merged properly.

Change-Id: I2c32b03ddb42735d16bc6155c1a1096159fb15ed
4cd7b39876bcec03bb1d0c2afa61cbdb7d119eba 09-Dec-2011 Jesse Wilson <jessewilson@google.com> Remove dx's copy of JUnit.

Instead, use JUnit the same way other code uses JUnit: by depending
on the copy in external. There is no longer a top-level option in
dx to run JUnit tests on itself.

There are two failing tests in dx/junit-tests. Both of these are in
the recently created DexGeneratorTest; I intend to fix these in another
change.

Bug: http://b/2286423
Change-Id: I3a173a0302c7ccc81be3b5a2a4d766000d1c242b
36db01eeaa04e3af3401c5bd6a399d3fb7b040e3 23-Aug-2011 jeffhao <jeffhao@google.com> Removed parsing and output for unused --target-api switch in dx.

This is cherry-picked from dalvik-dev.

Change-Id: I74627e4c261e086e8c2c7cf38591cd3e9f5707e6
a7ab2182266fb9ea1e4e8d1347fc6d6da35760d4 16-Jun-2011 Elliott Hughes <enh@google.com> Fix unbundled apps on pre-ICS devices.

Change-Id: I4aa58b5395423ec2f05be3dcb1783d0e35eabb2c
7baeded82e40352ebfb43b716e0b1dd752e72e7e 15-Jun-2011 jeffhao <jeffhao@google.com> Dx defaults to emitting dexfiles without jumbo opcodes.

There's compatibility issues with going back and forth between versions,
and it's best to have dx default to a stable point and allow
optimizations to be controlled by switches. For jumbo opcodes to be
enabled, dx can be given the switch "--target-api=14".

Change-Id: I824092c795638ca329325b14c435bc41c1ab56d5
e31a42442bbd2cdc69e959f5209b793cf0aa7217 17-Jan-2011 Jesse Wilson <jessewilson@google.com> Make DexMerger's dex reader general purpose.

Use this to implement FindUsages, which prints references to
fields and methods within a dex. This is the FindUsages output
for "Ljava/lang/Number;", "longValue" on libcore's dex file:

Method referenced by Ljava/io/EmulatedFields;#get invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/io/EmulatedFieldsForDumping;#write invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/io/ObjectOutputStream;#writeFieldValues invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method declared by Ljava/lang/Number;#longValue
Method declared by Ljava/lang/Byte;#longValue
Method declared by Ljava/lang/Double;#longValue
Method declared by Ljava/lang/Float;#longValue
Method declared by Ljava/lang/Integer;#longValue
Method declared by Ljava/lang/Long;#longValue
Method declared by Ljava/lang/Short;#longValue
Method referenced by Ljava/lang/reflect/Array;#set invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/math/BigDecimal;#divideBigIntegers invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/math/BigDecimal;#divideBigIntegers invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/math/BigDecimal;#divideBigIntegers invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/math/BigDecimal;#readObject invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/math/BigDecimal;#setUnscaledValue invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/math/BigDecimal;#valueExact invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/math/BigDecimal;#doubleValue invoke-virtual/range {vCCCC..vNNNN}, meth@BBBB
Method referenced by Ljava/math/BigDecimal;#doubleValue invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method declared by Ljava/math/BigDecimal;#longValue
Method referenced by Ljava/math/BigDecimal;#longValue invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method declared by Ljava/math/BigInteger;#longValue
Method referenced by Ljava/math/Conversion;#bigInteger2Double invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/math/Conversion;#bigInteger2Double invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/text/NumberFormat;#format invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/text/DateFormat;#format invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/text/DecimalFormat;#format invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/text/DecimalFormat;#parse invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/text/SimpleDateFormat;#formatToCharacterIterator invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/util/Formatter;#transform invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/util/Formatter;#transformFromDateTime invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/util/Formatter;#transformFromInteger invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/util/Formatter;#transformFromInteger invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/util/Formatter;#transformFromInteger invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/util/Formatter;#transformFromInteger invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/util/Formatter;#transform_g invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/util/Formatter;#transform_g invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/util/Formatter;#transform_g invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/util/Formatter;#transform_g invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Ljava/util/Scanner;#nextLong invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method declared by Ljava/util/concurrent/atomic/AtomicInteger;#longValue
Method declared by Ljava/util/concurrent/atomic/AtomicLong;#longValue
Method referenced by Llibcore/icu/NativeDecimalFormat;#formatToCharacterIterator invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/apache/xalan/xslt/SecuritySupport12;#getLastModified invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/apache/xml/dtm/SecuritySupport12;#getLastModified invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/apache/xml/dtm/ref/SecuritySupport12;#getLastModified invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/apache/xml/serializer/SecuritySupport12;#getLastModified invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/apache/xml/utils/SecuritySupport12;#getLastModified invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/apache/xpath/functions/SecuritySupport12;#getLastModified invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/json/JSON;#toLong invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/json/JSONArray;#getLong invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/json/JSONArray;#optLong invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/json/JSONObject;#numberToString invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/json/JSONObject;#getLong invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC
Method referenced by Lorg/json/JSONObject;#optLong invoke-virtual {vD, vE, vF, vG, vA}, meth@CCCC

Change-Id: Ia50f28f53ce5838799e2d5f03a7a2f1c551299de
d05e4fd966e8b3eaabd006dcdd76a42900110f12 09-Nov-2010 jeffhao <jeffhao@google.com> Added info for parallel dx switch "num-threads" to help message.

Change-Id: I7fa31ab7160956c135ab95f8411ad359f616403d
de75089fb7216d19e9c22cce4dc62a49513477d3 09-Jun-2010 Carl Shapiro <cshapiro@google.com> Remove trailing whitespace.

Change-Id: I95534bb2b88eaf48f2329282041118cd034c812b
72e93344b4d1ffc71e9c832ec23de0657e5b04a5 13-Nov-2009 Jean-Baptiste Queru <jbq@google.com> eclair snapshot
99409883d9c4c0ffb49b070ce307bb33a9dfe9f1 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import //branches/master/...@140412
f6c387128427e121477c1b32ad35cdcaa5101ba3 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
f72d5de56a522ac3be03873bdde26f23a5eeeb3c 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
2ad60cfc28e14ee8f0bb038720836a4696c478ad 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution