PCGen / pcgen

Main code and data development for pcgen program release
http://pcgen.org
GNU Lesser General Public License v2.1
431 stars 340 forks source link

[Build] A fresh clone tries to download JDKs for every platform #6434

Open io7m opened 3 years ago

io7m commented 3 years ago

Describe the bug I want to build the sources on Linux. I clone the project, and then execute ./gradle tasks to see which build tasks are available. This results in the build script immediately trying to download at least one large JDK for multiple platforms.

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/PCGen/pcgen
  2. cd pcgen
  3. ./gradlew tasks
  4. Note that you're downloading many JDKs, each around ~200mb in size.

Expected behavior Let me use the JDK I already have. :smile: I understand why you want to download JDKs for each platform; I do the same myself when producing application distributions. I think you may be executing the download tasks too eagerly, however...

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):


$ java -version
openjdk version "14.0.2" 2020-07-14
OpenJDK Runtime Environment (build 14.0.2+12)
OpenJDK 64-Bit Server VM (build 14.0.2+12, mixed mode)
LegacyKing commented 3 years ago

Sounds like we need to move some things around.

Vest commented 1 year ago

I can contribute into this issue, that today (in 2022) the file build.gradle tries to load JDK that doesn't even exist:

* What went wrong:
A problem occurred evaluating root project 'pcgen'.
> Failed to calculate the value of task ':compileJava' property 'javaCompiler'.
   > Unable to download toolchain matching these requirements: {languageVersion=16, vendor=any, implementation=vendor-specific}
      > Unable to download toolchain. This might indicate that the combination (version, architecture, release/early access, ...) for the requested JDK is not available.
         > Could not read 'https://api.adoptopenjdk.net/v3/binary/latest/16/ga/mac/aarch64/jdk/hotspot/normal/adoptopenjdk' as it does not exist.

I don't know, if we are ready for Java 17 (see PR #6727), but I can try to prepare a PR-fix for this issue.

karianna commented 1 year ago

https://github.com/PCGen/pcgen/pull/6727 is in theory sorting this out

Vest commented 1 year ago

@karianna do you know, if your PR will be ever approved?

karianna commented 1 year ago

:-D - A very fair question. I'm still battling the Gradle build here locally as it doesn't always place the JavaFX module components in the target uber JAR binaries. If your'e a Gradle expert then I'd love to pair on it.