1. 下载basescansDemo:https://github.com/gradle/gradle-build-scan-quickstart

  2. 新建javaProject

  3. 拷贝baseScansDemo中的内容到javaProject

  4. 确认build.gradle的配置信息

    gradle:creating-build-scans_第1张图片

  5. cmd,进入javaProject的rootPath,运行gradlew build --scan

    gradle:creating-build-scans_第2张图片

  6. 进入online版build scan

    1. 入上图绿色链接,填写关联邮箱,其他默认操作,之后进入邮箱打开邮件,点击链接就可进入

      gradle:creating-build-scans_第3张图片

  7. 启用对所有build的buildscan

    1. 进入init.d目录,新建buildScan.gradle

      gradle:creating-build-scans_第4张图片

    2. 添加下面内容到buildScan.gradle

    3. initscript {
          repositories {
              maven { url 'https://plugins.gradle.org/m2' }
          }
      
          dependencies {
              classpath 'com.gradle:build-scan-plugin:1.10.2'
          }
      }
      
      rootProject {
          apply plugin: com.gradle.scan.plugin.BuildScanPlugin
      
          buildScan {
              licenseAgreementUrl = 'https://gradle.com/terms-of-service'
              licenseAgree = 'yes'
          }
      }