本文整理汇总了Java中org.gradle.util.GradleVersion.current方法的典型用法代码示例。如果您正苦于以下问题:Java GradleVersion.current方法的具体用法?Java GradleVersion.current怎么用?Java GradleVersion.current使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.gradle.util.GradleVersion
的用法示例。
在下文中一共展示了GradleVersion.current方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
public void run() {
GradleVersion currentVersion = GradleVersion.current();
final StringBuilder sb = new StringBuilder();
sb.append("\n------------------------------------------------------------\nGradle ");
sb.append(currentVersion.getVersion());
sb.append("\n------------------------------------------------------------\n\nBuild time: ");
sb.append(currentVersion.getBuildTime());
sb.append("\nRevision: ");
sb.append(currentVersion.getRevision());
sb.append("\n\nGroovy: ");
sb.append(GroovySystem.getVersion());
sb.append("\nAnt: ");
sb.append(Main.getAntVersion());
sb.append("\nJVM: ");
sb.append(Jvm.current());
sb.append("\nOS: ");
sb.append(OperatingSystem.current());
sb.append("\n");
System.out.println(sb.toString());
}
示例2: run
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
public void run() {
GradleVersion currentVersion = GradleVersion.current();
final StringBuilder sb = new StringBuilder();
sb.append("\n------------------------------------------------------------\nGradle ");
sb.append(currentVersion.getVersion());
sb.append("\n------------------------------------------------------------\n\nBuild time: ");
sb.append(currentVersion.getBuildTime());
sb.append("\nBuild number: ");
sb.append(currentVersion.getBuildNumber());
sb.append("\nRevision: ");
sb.append(currentVersion.getRevision());
sb.append("\n\nGroovy: ");
sb.append(GroovySystem.getVersion());
sb.append("\nAnt: ");
sb.append(Main.getAntVersion());
sb.append("\nJVM: ");
sb.append(Jvm.current());
sb.append("\nOS: ");
sb.append(OperatingSystem.current());
sb.append("\n");
System.out.println(sb.toString());
}
示例3: Wrapper
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
public Wrapper() {
scriptFile = "gradlew";
jarFile = "gradle/wrapper/gradle-wrapper.jar";
distributionPath = DEFAULT_DISTRIBUTION_PARENT_NAME;
archivePath = DEFAULT_DISTRIBUTION_PARENT_NAME;
gradleVersion = GradleVersion.current();
}
示例4: checkGradleVersion
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
private void checkGradleVersion(Project project) {
if (GRADLE_MIN_VERSION.compareTo(GradleVersion.current()) > 0) {
throw new GradleException(
"Detected "
+ GradleVersion.current()
+ ", but the appengine-gradle-plugin requires "
+ GRADLE_MIN_VERSION
+ " or higher.");
}
}
示例5: checkMinimumGradleVersion
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
static void checkMinimumGradleVersion() throws IOException {
GradleVersion gradleVersionMinimum = GradleVersion.version("2.14.1");
GradleVersion gradleVersionCurrent = GradleVersion.current();
if (gradleVersionCurrent.compareTo(gradleVersionMinimum) > 0) {
throw new IOException("Execution on older Gradle version ("+gradleVersionCurrent.getVersion()+
") than is defined as the minimum ("+gradleVersionMinimum.getVersion()+")");
}
}
示例6: createCacheRepository
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
protected CacheRepository createCacheRepository() {
CacheFactory factory = get(CacheFactory.class);
StartParameter startParameter = get(StartParameter.class);
DefaultCacheScopeMapping scopeMapping = new DefaultCacheScopeMapping(startParameter.getGradleUserHomeDir(), startParameter.getProjectCacheDir(), GradleVersion.current());
return new DefaultCacheRepository(
scopeMapping,
factory);
}
示例7: createCacheRepository
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
protected CacheRepository createCacheRepository() {
CacheFactory factory = get(CacheFactory.class);
StartParameter startParameter = get(StartParameter.class);
DefaultCacheScopeMapping scopeMapping = new DefaultCacheScopeMapping(startParameter.getGradleUserHomeDir(), startParameter.getProjectCacheDir(), GradleVersion.current());
return new DefaultCacheRepository(
scopeMapping,
startParameter.getCacheUsage(),
factory);
}
示例8: AbstractGradleExecuter
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
protected AbstractGradleExecuter(GradleDistribution distribution, TestDirectoryProvider testDirectoryProvider) {
this(distribution, testDirectoryProvider, GradleVersion.current());
}
示例9: AbstractDelegatingGradleExecuter
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
protected AbstractDelegatingGradleExecuter(GradleDistribution distribution, TestDirectoryProvider testDirectoryProvider, IntegrationTestBuildContext buildContext) {
super(distribution, testDirectoryProvider, GradleVersion.current(), buildContext);
}
示例10: getVersion
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
public GradleVersion getVersion() {
return GradleVersion.current();
}
示例11: DocumentationRegistry
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
public DocumentationRegistry() {
this.gradleVersion = GradleVersion.current();
}
示例12: createTaskOutputOriginFactory
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
TaskOutputOriginFactory createTaskOutputOriginFactory(TimeProvider timeProvider, InetAddressFactory inetAddressFactory, GradleInternal gradleInternal) {
File rootDir = gradleInternal.getRootProject().getRootDir();
return new TaskOutputOriginFactory(timeProvider, inetAddressFactory, rootDir, SystemProperties.getInstance().getUserName(), OperatingSystem.current().getName(), GradleVersion.current());
}
示例13: createCacheScopeMapping
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
protected CacheScopeMapping createCacheScopeMapping() {
return new DefaultCacheScopeMapping(gradleUserHomeDir, projectCacheDir, GradleVersion.current());
}
示例14: ExtraModelBuilder
import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
public ExtraModelBuilder() {
this.myCurrentGradleVersion = GradleVersion.current();
}