android-orb icon indicating copy to clipboard operation
android-orb copied to clipboard

Change java version doesn't work

Open guyaumetremblay opened this issue 1 year ago • 0 comments

Orb version

2.5.0

What happened

Using gradle 8.9 and cimg/android:2024.07

Running

      - android/change-java-version:
          java-version: 17
      - run:
          name: Print build environment
          command: ./gradlew buildEnvironment

Print respectively :

Current Java Version: 21
Current Java Compiler Version : 21
^@^@update-alternatives: using /usr/lib/jvm/java-17-openjdk-amd64/bin/java to provide /usr/bin/java (java) in manual mode
update-alternatives: using /usr/lib/jvm/java-17-openjdk-amd64/bin/javac to provide /usr/bin/javac (javac) in manual mode
New Java Version : 17
New Java Compiler Version : 17

And

> Task :buildEnvironment
Daemon JVM: Ubuntu JDK 21.0.3+9-Ubuntu-1ubuntu122.04.1
  | Location:           /usr/lib/jvm/java-21-openjdk-amd64
  | Language Version:   21
  | Vendor:             Ubuntu
  | Architecture:       amd64
  | Is JDK:             true

Expected behavior

The gradle task should use the requested jdk

guyaumetremblay avatar Aug 01 '24 18:08 guyaumetremblay