Class JextractDataStore

java.lang.Object
de.infolektuell.gradle.jextract.model.JextractDataStore

public class JextractDataStore extends Object
Helpers for consistent paths and filenames for Jextract, depending on version and platform
  • Method Details

    • create

      public static JextractDataStore create(Path path)
      Tries to create an instance of JextractDataStore using data from a properties file
      Parameters:
      path - The file that contains the Jextract distribution data to be loaded
      Returns:
      a JextractDataStore instance
    • create

      public static JextractDataStore create()
      Tries to create an instance of JextractDataStore using the default distribution data
      Returns:
      a JextractDataStore instance
    • getExecutableFilename

      public String getExecutableFilename()
      Constructs the file name of the Jextract executable depending on the current operating system
      Returns:
      The constructed file name
    • version

      public int version(int javaVersion)
      Finds the matching Jextract version for a given Java major version
      Parameters:
      javaVersion - A major Java language version
      Returns:
      The most appropriate Jextract version
    • resource

      public DownloadClient.Resource resource(int javaVersion)
      Creates a downloadable resource for the specified Jextract version
      Parameters:
      javaVersion - A major Java language version
      Returns:
      The constructed resource matching the java version
    • filename

      public String filename(int javaVersion)
      Constructs an archive filename for the specified Jextract version
      Parameters:
      javaVersion - A major Java language version
      Returns:
      the constructed file name