public final class GradleDistributionManager.GradleDistribution extends Object implements Comparable<GradleDistributionManager.GradleDistribution>
Modifier and Type | Method and Description |
---|---|
int |
compareTo(GradleDistributionManager.GradleDistribution o)
This method only compare the version attribute.
|
boolean |
equals(Object obj) |
File |
getDistributionDir()
The Gradle distribution directory.
|
URI |
getDistributionURI()
The Gradle distribution URI.
|
File |
getGradleUserHome()
The Gradle user home directory of this distribution.
|
String |
getVersion()
The Gradle version of this distribution.
|
int |
hashCode() |
Future<Void> |
install()
Start to download and install this distribution from its
distribution URI to its distribution directory asynchronous.
|
boolean |
isAvailable()
Checks if this distribution is downloaded and available to use.
|
boolean |
isBlackListed()
Checks if this distribution has known issues to be used with NetBeans.
|
boolean |
isCompatibleWithJava(int jdkMajorVersion)
Checks if this Gradle distribution is compatible with the given
major version of Java.
|
boolean |
isCompatibleWithSystemJava()
Deprecated.
shall be no reason to be used.
|
int |
lastSupportedJava()
Returns the newest major JDK version that is supported with this
distribution.
|
String |
toString() |
public File getGradleUserHome()
GradleDistributionManager
.public File getDistributionDir()
GradleDistributionManager.GradleDistribution.getDistributionURI()
must
return a valid URI to the distribution source.public URI getDistributionURI()
null
if this
is a manually installed distribution. In that case the
GradleDistributionManager.GradleDistribution.getDistributionDir()
shall return an existing distribution
directory.public String getVersion()
public boolean isCompatibleWithJava(int jdkMajorVersion)
NetBeans uses a built in fixed list of compatibility matrix. That
means it might not know about the compatibility of newer Gradle
versions. Optimistic bias would return true
on these
versions form 2.37.
jdkMajorVersion
- the major version of the JDKtrue
if this version is supported with that JDK.public int lastSupportedJava()
@Deprecated public boolean isCompatibleWithSystemJava()
true
.public boolean isAvailable()
public boolean isBlackListed()
public Future<Void> install()
null
if this distribution is available.
The install task has UI bindings in form of a IDE progress bar and notification entry on the downloading of the distribution.
Future
of the install task or null
if this distribution is already installed.public int compareTo(GradleDistributionManager.GradleDistribution o)
GradleDistributionManager.GradleDistribution.equals(java.lang.Object)
return false as
that is based on comparing the distribution directory.compareTo
in interface Comparable<GradleDistributionManager.GradleDistribution>
o
- the GradleDistribution to compare with.