Coder Social home page Coder Social logo

gradle / gradle-build-scan-quickstart Goto Github PK

View Code? Open in Web Editor NEW
144.0 49.0 274.0 943 KB

An example project to experience the Build Scan® service of Develocity with Gradle builds.

Home Page: https://scans.gradle.com

License: Apache License 2.0

Java 100.00%

gradle-build-scan-quickstart's Introduction

Build Scan® quickstart

This is an example project that you can use to experience the Build Scan® service of Develocity.

It is a small Java project that has the Develocity Gradle Plugin already applied.

Create a Build Scan®

Follow these simple steps to create and publish a Build Scan® on scans.gradle.com:

  1. Clone this project
  2. Run ./gradlew build --scan
  3. Agree to the Terms of Service on the command line

The build should end with something similar to:

Publishing build scan...
https://gradle.com/s/ria2s2x5oaazq

Follow the green link shown at the end of the build to view your Build Scan® on scans.gradle.com.

Note: If you run a build without the --scan flag, no Build Scan® will be created and no information will be sent.

Experiment with Build Scans

Create different kinds of Build Scans by locally modifying this quickstart project. Here are some ideas:

  • Edit src/main/java/example/Example.java to introduce compile errors
  • Edit src/test/java/example/ExampleTest.java to introduce test failures
  • Add more dependencies, more plugins, and more projects

Alternatively, enable one of your own builds to produce Build Scans by following the step-by-step instructions.

Learn more

Read the Develocity Gradle Plugin User Manual to learn more about the Build Scan® service of Develocity and the Develocity Gradle Plugin.

Need help?

Talk to us on the Gradle forum.

If you are completely new to the Gradle Build Tool, start here.

License

The Build Scan™ quickstart project is open-source software released under the Apache 2.0 License.

gradle-build-scan-quickstart's People

Contributors

alextu avatar bigdaz avatar bot-githubaction avatar breskeby avatar britter avatar c00ler avatar clayburn avatar dejankos avatar dependabot[bot] avatar etiennestuder avatar facewindu avatar felipefzdz avatar guylabs avatar jean-andre-gauthier avatar jonnybbb avatar kate0 avatar ldaley avatar leonard84 avatar marcphilipp avatar pbielicki avatar pshevche avatar rhart avatar rpygithub avatar runningcode avatar snoopcheri avatar sorin-florea avatar tylerbertrand avatar welandaz avatar wusatosi avatar zielezin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gradle-build-scan-quickstart's Issues

Issues in build.gradle

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 31

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.tridentmotocorp.taxicxapp"
    minSdkVersion 16
    targetSdkVersion 31
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}
buildTypes {
    release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        signingConfig signingConfigs.debug
    }

Problem

Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

  • Where:
    Build file 'D:\app\android\app\build.gradle' line: 58

  • What went wrong:
    A problem occurred evaluating project ':app'.

Could not find method classpath() for arguments [com.google.gms:google-services:4.3.10] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s
Exception: Gradle task assembleDebug failed with exit code 1

Gradle

Gradle build scan quickstart

To make it clearer what the issue is, we have a [testing] repository which also contains automake:

To make it clearer what the issue is, we have a [testing] repository which also contains automake:

[{'name': 'automake',
  'version': '1.16.2-3',
  'status': 'GOOD',
  'distro': 'archlinux',
  'suite': 'core',
  'architecture': 'any',
  'url': 'https://mirror.pkgbuild.com/core/os/x86_64/automake-1.16.2-3-any.pkg.tar.zst',
  'build_id': None,
  'built_at': None,
  'attestation': None,
  'next_retry': None},
 {'name': 'automake',
  'version': '1.16.3-1',
  'status': 'GOOD',
  'distro': 'archlinux',
  'suite': 'testing',
  'architecture': 'any',
  'url': 'https://mirror.pkgbuild.com/testing/os/x86_64/automake-1.16.3-1-any.pkg.tar.zst',
  'build_id': 4393,
  'built_at': '2020-12-03T19:13:37.531988504',
  'attestation': None,
  'next_retry': None}]

Originally posted by @jelly in kpcyrd/ismyarchverifiedyet#4 (comment)

A

apply plugin: 'com.android.application'

...

dependencies {
implementation 'com.google.android.gms:play-services-location:21.0.1'
}

Publishing build scan failed due to network error 'java.net.SocketException: Unexpected end of file from server'

I am following the instruction to create a Build Scan using the starter project.

After cloning the repository, and running ./gradlew build --scan I continue getting the same error

BUILD SUCCESSFUL in 616ms
4 actionable tasks: 4 up-to-date

Publishing a build scan to scans.gradle.com requires accepting the Gradle Terms of Service defined at https://gradle.com/terms-of-service. Do you accept these terms? [yes, no] yes

Gradle Terms of Service accepted.

Publishing build scan...
Publishing build scan failed due to network error 'java.net.SocketException: Unexpected end of file from server' (2 retries remaining)...
Publishing build scan failed due to network error 'java.net.SocketException: Unexpected end of file from server' (1 retry remaining)...

A network error occurred.

If you require assistance with this problem, please report it via https://gradle.com/help/plugin and include the following information via copy/paste.

----------
Gradle version: 7.5.1
Plugin version: 3.11.4
Request URL: https://status.gradle.com
Request ID: 0e3d00fe-9421-4f38-bea9-8c5ac72a6720
Exception: java.net.SocketException: Unexpected end of file from server
----------

MacOS: 12.4

Java version installed:

Screenshot 2022-11-10 at 15 31 17

Build scan cannot be created because the build scan plugin was not applied

$ git clone [email protected]:gradle/gradle-build-scan-quickstart.git gradle-build-scan-quickstart
$ cd gradle-build-scan-quickstart/
$ ./gradlew --version

------------------------------------------------------------
Gradle 4.9
------------------------------------------------------------

Build time:   2018-07-16 08:14:03 UTC
Revision:     efcf8c1cf533b03c70f394f270f46a174c738efc

Kotlin DSL:   0.18.4
Kotlin:       1.2.41
Groovy:       2.4.12
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          1.8.0_171 (Oracle Corporation 25.171-b11)
OS:           Linux 4.17.12-100.fc27.x86_64 amd64

$ ./gradlew build --scan
Build scan cannot be created because the build scan plugin was not applied.                                                                                                                                                        
For more information on how to apply the build scan plugin, please visit https://gradle.com/scans/help/gradle-cli.                                                                                                                 

BUILD SUCCESSFUL in 3s
4 actionable tasks: 4 executed

Incorrect Gradle version shown in Build Scan 'Performance Settings and Suggestions'

Not sure if this is right place to raise issues for the Build scan plugin? I couldn't find the plugin repo listed on https://github.com/gradle.

When viewing a Build scan, the Summary correctly shows Gradle 4.0, but the Performance -> Settings and Suggestions shows:

Build was run with the latest Gradle version (3.5.1)

I've recently updated to Gradle wrapper 4.0 from 3.5.1 and am using Build scan plugin 1.8.

gazbert@pegasus:~/IdeaProjects/bxbot$ ./gradlew -v

------------------------------------------------------------
Gradle 4.0
------------------------------------------------------------

Build time:   2017-06-14 15:11:08 UTC
Revision:     316546a5fcb4e2dfe1d6aa0b73a4e09e8cecb5a5

Groovy:       2.4.11
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_101 (Oracle Corporation 25.101-b13)
OS:           Linux 3.16.0-4-amd64 amd64

gazbert@pegasus:~/IdeaProjects/bxbot$ 

The build is here:
https://gradle.com/s/2o7si77rurvdw

It is reproducible. Happy to help if I can.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.