Recent

Author Topic: LAMW with FPCUPDeluxe (latest android command line tools and gradle)  (Read 2396 times)

WayneSherman

  • Sr. Member
  • ****
  • Posts: 257
In recent testing I discovered the following:

As of 2023-Nov-21, the latest android command line tools are version 10406996
( from https://developer.android.com/studio/#downloads )

These require java class file 61 or greater. ( i.e. OpenJDK 17)

But the version of gradle (6.8.3) used by fpcupdeluxe (v2.4.0a) does not work with class file 61 / OpenJDK 17:
"Unsupported class file major version 61"
« Last Edit: November 22, 2023, 12:41:01 am by WayneSherman »

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1877
Re: LAMW with FPCUPDeluxe (latest android command line tools and gradle)
« Reply #1 on: November 22, 2023, 07:14:22 am »
That can be changed naturally. What Gradle version should be used ?

WayneSherman

  • Sr. Member
  • ****
  • Posts: 257
Re: LAMW with FPCUPDeluxe (latest android command line tools and gradle)
« Reply #2 on: November 22, 2023, 03:39:08 pm »
That can be changed naturally. What Gradle version should be used ?

Gradle 7.3 is the first one that support Java 17 / OpenJDK 17:
https://docs.gradle.org/current/userguide/compatibility.html

I haven't recently tested, but according to LAMW docs, Gradle 7 is not supported yet:
https://github.com/jmpessoa/lazandroidmodulewizard

Quote
recommended version 6.6.1
        warning: Gradle >= 7 don't supported by LAMW, yet!
        warning: Gradle 6.x.y don't support Java > 13!

See also:
https://forum.lazarus.freepascal.org/index.php?topic=55005.0
https://github.com/jmpessoa/lazandroidmodulewizard/pull/455


WayneSherman

  • Sr. Member
  • ****
  • Posts: 257
Re: LAMW with FPCUPDeluxe (latest android command line tools and gradle)
« Reply #3 on: January 14, 2024, 03:56:24 am »
That can be changed naturally. What Gradle version should be used ?

There have been recent updates to LAMW (thank you jmpessoa!).  LAMW now supports:
Quote
recommended: Java JDK 21 + Gradle version >= 8.5
recommended: Java JDK 17 + Gradle version >= 8.1.1

Android Studio is distributed with and recommends using JetBrains Runtime (JBR) which is an enhanced OpenJDK.  The latest release is based on OpenJDK 17.

Gradle is tested with Android Gradle Plugin 7.3 through 8.1.

Based on the above, probably the most stable config is to use Gradle 8.1.1 (along with OpenJDK 17).

« Last Edit: January 14, 2024, 04:00:05 am by WayneSherman »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2330
Re: LAMW with FPCUPDeluxe (latest android command line tools and gradle)
« Reply #4 on: January 17, 2024, 06:27:42 pm »
Quote
Based on the above, probably the most stable config is to use Gradle 8.1.1 (along with OpenJDK 17).

We can configure it for 8.2.1 and thus open a LAMW project in Android Studio "Hedgehog" without complaints...

that is:  JDK 17 + Gradle 8.2.1 + Android SDK "platform-34" !
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

WayneSherman

  • Sr. Member
  • ****
  • Posts: 257
Re: LAMW with FPCUPDeluxe (latest android command line tools and gradle)
« Reply #5 on: January 20, 2024, 05:19:17 pm »
We can configure it for 8.2.1 and thus open a LAMW project in Android Studio "Hedgehog" without complaints...
that is:  JDK 17 + Gradle 8.2.1 + Android SDK "platform-34" !

Yes, I think that is a good combination.  It is very recent, but not bleeding edge.

https://developer.android.com/build/releases/gradle-plugin#8-2-0
"8.2.0 (November 2023) - Android Gradle plugin 8.2.0 is a major release that includes a variety of new features and improvements."

https://developer.android.com/build/releases/gradle-plugin?buildsystem=ndk-build#updating-gradle
"For the best performance, you should use the latest possible version of both Gradle and the plugin."

 

TinyPortal © 2005-2018