From a73f8f9a181e89f1e9489daf1d441b048eee12ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Kwiecin=CC=81ski?= Date: Sun, 21 Jan 2024 16:12:58 +0100 Subject: [PATCH] Publish build scans --- .editorconfig | 9 +++++++++ .github/workflows/main.yml | 1 + entrypoint.sh | 3 ++- testproject/settings.gradle | 18 ++++++++++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..274aa58 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*.{kt,kts}] +max_line_length = 140 +indent_size = 4 +insert_final_newline = true +ij_kotlin_allow_trailing_comma = true +ij_kotlin_allow_trailing_comma_on_call_site = true +ktlint_code_style = intellij_idea diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59f1afd..63ecaa1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -151,3 +151,4 @@ jobs: build-root-directory: testproject project: "" debug: true + additional-gradle-arguments: "--scan" diff --git a/entrypoint.sh b/entrypoint.sh index a975cf6..d38826a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -18,8 +18,9 @@ fi if [ "$INPUT_DEBUG" == "true" ]; then echo "download finished" + echo $JAVA_HOME + java -version ls -al - ./gradlew $ADDITIONAL_GRADLE_ARGUMENTS projects fi ./gradlew $ADDITIONAL_GRADLE_ARGUMENTS "$INPUT_PROJECT":dependencies --configuration "$INPUT_CONFIGURATION" >new_diff.txt git fetch --force origin "$INPUT_BASEREF":"$INPUT_BASEREF" --no-tags diff --git a/testproject/settings.gradle b/testproject/settings.gradle index 1131dd3..31a2d14 100644 --- a/testproject/settings.gradle +++ b/testproject/settings.gradle @@ -5,6 +5,10 @@ pluginManagement { } } +plugins { + id("com.gradle.enterprise") version "3.16.1" +} + dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { @@ -14,3 +18,17 @@ dependencyResolutionManagement { } rootProject.name = 'com.starter.dependencydiff.test' + +gradleEnterprise { + buildScan { + termsOfServiceUrl = "https://gradle.com/terms-of-service" + termsOfServiceAgree = "yes" + + uploadInBackground = System.getenv("CI") == null + + if (System.getenv("CI")) { + publishAlways() + tag "CI" + } + } +}