当前位置: 首页>>代码示例>>Java>>正文


Java GradleVersion.current方法代码示例

本文整理汇总了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());
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:23,代码来源:CommandLineActionFactory.java

示例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());
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:25,代码来源:CommandLineActionFactory.java

示例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();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:8,代码来源:Wrapper.java

示例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.");
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:app-gradle-plugin,代码行数:11,代码来源:AppEnginePlugin.java

示例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()+")");
    }
}
 
开发者ID:ctco,项目名称:gradle-mobile-plugin,代码行数:9,代码来源:MobilePluginUtil.java

示例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);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:9,代码来源:BuildScopeServices.java

示例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);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:10,代码来源:BuildScopeServices.java

示例8: AbstractGradleExecuter

import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
protected AbstractGradleExecuter(GradleDistribution distribution, TestDirectoryProvider testDirectoryProvider) {
    this(distribution, testDirectoryProvider, GradleVersion.current());
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:AbstractGradleExecuter.java

示例9: AbstractDelegatingGradleExecuter

import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
protected AbstractDelegatingGradleExecuter(GradleDistribution distribution, TestDirectoryProvider testDirectoryProvider, IntegrationTestBuildContext buildContext) {
    super(distribution, testDirectoryProvider, GradleVersion.current(), buildContext);
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:AbstractDelegatingGradleExecuter.java

示例10: getVersion

import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
public GradleVersion getVersion() {
    return GradleVersion.current();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:IntegrationTestBuildContext.java

示例11: DocumentationRegistry

import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
public DocumentationRegistry() {
    this.gradleVersion = GradleVersion.current();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:DocumentationRegistry.java

示例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());
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:TaskExecutionServices.java

示例13: createCacheScopeMapping

import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
protected CacheScopeMapping createCacheScopeMapping() {
    return new DefaultCacheScopeMapping(gradleUserHomeDir, projectCacheDir, GradleVersion.current());
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:CacheRepositoryServices.java

示例14: ExtraModelBuilder

import org.gradle.util.GradleVersion; //导入方法依赖的package包/类
public ExtraModelBuilder() {
  this.myCurrentGradleVersion = GradleVersion.current();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ExtraModelBuilder.java


注:本文中的org.gradle.util.GradleVersion.current方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。