Skip to content
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

CI builds fails, as it is currently compiling with JDK-8 #32

Closed
sgjesse opened this issue Feb 7, 2024 · 1 comment
Closed

CI builds fails, as it is currently compiling with JDK-8 #32

sgjesse opened this issue Feb 7, 2024 · 1 comment
Assignees

Comments

@sgjesse
Copy link
Collaborator

sgjesse commented Feb 7, 2024

See https://ci.chromium.org/ui/p/r8/builders/ci/smali

Cloning into '/b/s/w/ir/x/t/tmpj3ksmkyq'...
Enter directory: /b/s/w/ir/x/t/tmpj3ksmkyq
HEAD is now at 0363397b Version 3.0.4 (#31)
Building version: 3.0.4
Downloading https://services.gradle.org/distributions/gradle-8.5-all.zip
....................10%.....................20%.....................30%.....................40%.....................50%.....................60%....................70%.....................80%.....................90%.....................100%

Welcome to Gradle 8.5!

Here are the highlights of this release:
 - Support for running on Java 21
 - Faster first use with Kotlin DSL
 - Improved error and warning messages

For more details see https://docs.gradle.org/8.5/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :util:processResources NO-SOURCE
> Task :util:publish UP-TO-DATE
> Task :dexlib2:accessorTestGenerator:processResources
> Task :util:sourcesJar
> Task :dexlib2:accessorTestGenerator:processTestResources NO-SOURCE
> Task :util:processTestResources NO-SOURCE
> Task :baksmali:processResources
> Task :baksmali:publish UP-TO-DATE
> Task :baksmali:sourcesJar
> Task :baksmali:processTestResources
> Task :smali:generateGrammarSource
> Task :smali:jflex
> Task :smali:processResources
> Task :smali:publish UP-TO-DATE
> Task :smali:sourcesJar

> Task :dexlib2:compileJava
/b/s/w/ir/x/t/tmpj3ksmkyq/dexlib2/src/main/java/com/android/tools/smali/dexlib2/dexbacked/OatFile.java:173: error: cannot find symbol
            return Collections.unmodifiableList(List.of());
                                                    ^
  symbol:   method of()
  location: interface java.util.List
/b/s/w/ir/x/t/tmpj3ksmkyq/dexlib2/src/main/java/com/android/tools/smali/dexlib2/dexbacked/OatFile.java:177: error: cannot find symbol
            return Collections.unmodifiableList(List.of());
                                                    ^
  symbol:   method of()
  location: interface java.util.List
/b/s/w/ir/x/t/tmpj3ksmkyq/dexlib2/src/main/java/com/android/tools/smali/dexlib2/DexFileFactory.java:463: error: cannot find symbol
            return unmodifiableList(List.of(entryName));
                                        ^
  symbol:   method of(java.lang.String)
  location: interface java.util.List
/b/s/w/ir/x/t/tmpj3ksmkyq/dexlib2/src/main/java/com/android/tools/smali/dexlib2/dexbacked/DexBackedMethod.java:158: error: cannot find symbol
        return unmodifiableList(List.of());
                                    ^
  symbol:   method of()
  location: interface java.util.List

> Task :smali:generateTestGrammarSource
> Task :smali:processTestResources

> Task :dexlib2:compileJava FAILED
/b/s/w/ir/x/t/tmpj3ksmkyq/dexlib2/src/main/java/com/android/tools/smali/dexlib2/MethodHandleType.java:53: error: cannot find symbol
    private static final Map<Integer, String> methodHandleTypeNames = unmodifiableMap(Map.of(
                                                                                         ^
  symbol:   method of(int,java.lang.String,int,java.lang.String,int,java.lang.String,int,java.lang.String,int,java.lang.String,int,java.lang.String,int,java.lang.String,int,java.lang.String,int,java.lang.String)
  location: interface java.util.Map
/b/s/w/ir/x/t/tmpj3ksmkyq/dexlib2/src/main/java/com/android/tools/smali/dexlib2/dexbacked/instruction/DexBackedArrayPayload.java:84: error: cannot find symbol
            return Collections.unmodifiableList(List.of());
                                                    ^
  symbol:   method of()
  location: interface java.util.List
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
6 errors

> Task :util:generatePomFileForMavenJavaPublication
> Task :baksmali:generatePomFileForMavenJavaPublication
> Task :smali:generatePomFileForMavenJavaPublication

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dexlib2:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 34s
15 actionable tasks: 15 executed
Enter directory: /b/s/w/ir/x/w/r8
Traceback (most recent call last):
  File "tools/archive_smali.py", line 175, in <module>
    sys.exit(Main())
  File "tools/archive_smali.py", line 105, in Main
    subprocess.check_call([
  File "/b/s/w/ir/cipd_bin_packages/cpython3/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['./gradlew', '-Dmaven.repo.local=/b/s/w/ir/x/t/tmpj3ksmkyq/m2', 'release', 'test', 'publishToMavenLocal']' returned non-zero exit status 1.
@sgjesse sgjesse self-assigned this Feb 7, 2024
chachako pushed a commit to chachako/r8 that referenced this issue Feb 7, 2024
Usages of e.g. List.of() requires JDK-9 or later. Using JDK-11.

Fixes: google/smali#32
Change-Id: I1573477859fe1f37a45e6c7083562bc8063722ab
chachako pushed a commit to chachako/r8 that referenced this issue Feb 7, 2024
Fixes: google/smali#32

Change-Id: I379d130f98aaf82841ca70476fc65325c96cfb61
@sgjesse
Copy link
Collaborator Author

sgjesse commented May 14, 2024

The source was modified to compile with JDK-8.

@sgjesse sgjesse closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant