New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin.Android.Build.Tasks] use `--input-list` for CompileToDalvik. #2187

Merged
merged 2 commits into from Sep 21, 2018

Conversation

Projects
None yet
3 participants
@dellis1972
Contributor

dellis1972 commented Sep 16, 2018

The dx tool has an additional argument --input-list which
can be used to provide a list of .jar, .class or .zip
files to the tool.

This will help with reducing the length of the command line
on larger apps with allot of java references.

@dellis1972 dellis1972 requested a review from jonathanpeppers Sep 17, 2018

@jonathanpeppers

I think this one is good if the Windows build is green.

@dellis1972

This comment has been minimized.

Show comment
Hide comment
@dellis1972

dellis1972 Sep 18, 2018

Contributor

@jonpryor OK so I tested the Input list on Windows. If you include Quotes you get the same error as you do on Mac

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: "C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v8.1\mono.android.jar": file not found
        at com.android.dex.util.FileUtils.readFile(FileUtils.java:51)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:169)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:679)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:576)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:313)
        at com.android.dx.command.dexer.Main.runDx(Main.java:291)
        at com.android.dx.command.dexer.Main.main(Main.java:247)
        at com.android.dx.command.Main.main(Main.java:94)

Without Quotes, paths with spaces work fine. Here is a sample of the test one I used on Windows

c:\Sandbox\Some Folder\AppWithSpaces\AppWithSpaces\obj\Debug\81\android\bin\classes.zip
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v8.1\mono.android.jar
obj\Debug\81\lp\1\jl\arch-core-common.jar
obj\Debug\81\lp\10\jl\bin\classes.jar
obj\Debug\81\lp\11\jl\bin\classes.jar
obj\Debug\81\lp\12\jl\bin\classes.jar
obj\Debug\81\lp\13\jl\bin\classes.jar
obj\Debug\81\lp\14\jl\bin\classes.jar
obj\Debug\81\lp\15\jl\bin\classes.jar
obj\Debug\81\lp\2\jl\arch-lifecycle-common.jar
obj\Debug\81\lp\3\jl\bin\classes.jar
obj\Debug\81\lp\4\jl\bin\classes.jar
obj\Debug\81\lp\6\jl\bin\classes.jar
obj\Debug\81\lp\7\jl\bin\classes.jar
obj\Debug\81\lp\8\jl\bin\classes.jar
obj\Debug\81\lp\9\jl\bin\classes.jar
Contributor

dellis1972 commented Sep 18, 2018

@jonpryor OK so I tested the Input list on Windows. If you include Quotes you get the same error as you do on Mac

UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: "C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v8.1\mono.android.jar": file not found
        at com.android.dex.util.FileUtils.readFile(FileUtils.java:51)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:169)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
        at com.android.dx.command.dexer.Main.processOne(Main.java:679)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:576)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:313)
        at com.android.dx.command.dexer.Main.runDx(Main.java:291)
        at com.android.dx.command.dexer.Main.main(Main.java:247)
        at com.android.dx.command.Main.main(Main.java:94)

Without Quotes, paths with spaces work fine. Here is a sample of the test one I used on Windows

c:\Sandbox\Some Folder\AppWithSpaces\AppWithSpaces\obj\Debug\81\android\bin\classes.zip
C:\Program Files (x86)\Microsoft Visual Studio\Preview\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v8.1\mono.android.jar
obj\Debug\81\lp\1\jl\arch-core-common.jar
obj\Debug\81\lp\10\jl\bin\classes.jar
obj\Debug\81\lp\11\jl\bin\classes.jar
obj\Debug\81\lp\12\jl\bin\classes.jar
obj\Debug\81\lp\13\jl\bin\classes.jar
obj\Debug\81\lp\14\jl\bin\classes.jar
obj\Debug\81\lp\15\jl\bin\classes.jar
obj\Debug\81\lp\2\jl\arch-lifecycle-common.jar
obj\Debug\81\lp\3\jl\bin\classes.jar
obj\Debug\81\lp\4\jl\bin\classes.jar
obj\Debug\81\lp\6\jl\bin\classes.jar
obj\Debug\81\lp\7\jl\bin\classes.jar
obj\Debug\81\lp\8\jl\bin\classes.jar
obj\Debug\81\lp\9\jl\bin\classes.jar
@dellis1972

This comment has been minimized.

Show comment
Hide comment
@dellis1972

dellis1972 Sep 18, 2018

Contributor

build

Contributor

dellis1972 commented Sep 18, 2018

build

@dellis1972

This comment has been minimized.

Show comment
Hide comment
@dellis1972

dellis1972 Sep 19, 2018

Contributor

build

Contributor

dellis1972 commented Sep 19, 2018

build

dellis1972 added some commits Sep 16, 2018

[Xamarin.Android.Build.Tasks] use `--input-list` for CompileToDalvik.
The `dx` tool has an additional argument `--input-list` which
can be used to provide a list of `.jar`, `.class` or `.zip`
files to the tool.

This will help with reducing the length of the command line
on larger apps with allot of jav references.

@jonpryor jonpryor merged commit 8571a7f into xamarin:master Sep 21, 2018

2 of 4 checks passed

Ubuntu PR Build Build finished. No test results found.
Details
macOS PR Build Build finished. 62864 tests run, 895 skipped, 2 failed.
Details
Xamarin.Android (Windows) #2047751 succeeded
Details
license/cla All CLA requirements met.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment