From fb9339e801515b6673d71fdeb94bfeb257e2bebf Mon Sep 17 00:00:00 2001 From: yahavi Date: Thu, 24 Aug 2023 19:04:55 +0300 Subject: [PATCH] Use Gradle extractor 5 on Gradle >= 6.8.1 --- .github/workflows/gradleTests.yml | 10 ++++++++-- go.mod | 4 ++-- go.sum | 8 ++++---- testdata/gradle/projectwithplugin/build.gradle | 15 ++++++++++++++- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gradleTests.yml b/.github/workflows/gradleTests.yml index d361d9e9b..5e8cedf07 100644 --- a/.github/workflows/gradleTests.yml +++ b/.github/workflows/gradleTests.yml @@ -15,11 +15,12 @@ concurrency: jobs: Gradle-Tests: if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push' - name: ${{ matrix.os }} + name: ${{ matrix.os }}-gradle-${{ matrix.gradle-version }} strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] + gradle-version: [5.6.4, 8.3] runs-on: ${{ matrix.os }} env: GRADLE_OPTS: -Dorg.gradle.daemon=false @@ -28,10 +29,15 @@ jobs: uses: actions/setup-go@v3 with: go-version: 1.20.x + - name: Install Java + uses: actions/setup-java@v3 + with: + java-version: "11" + distribution: "adopt" - name: Setup Gradle uses: gradle/gradle-build-action@v2 with: - gradle-version: 7.6 + gradle-version: ${{ matrix.gradle-version }} - name: Checkout code uses: actions/checkout@v3 with: diff --git a/go.mod b/go.mod index 8226e4aa8..e9bae172d 100644 --- a/go.mod +++ b/go.mod @@ -122,9 +122,9 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230820165857-52ff32c4d8eb +replace github.com/jfrog/build-info-go => github.com/yahavi/build-info-go v0.1.2-0.20230824155947-19b4a42c70d2 -// replace github.com/jfrog/jfrog-cli-core/v2 => github.com/jfrog/jfrog-cli-core/v2 v2.31.1-0.20230824124821-a7f84a425af1 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/yahavi/jfrog-cli-core/v2 v2.0.0-20230824160204-b4bcbaf7ff62 // replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27 diff --git a/go.sum b/go.sum index 525d97f3f..b949dfca3 100644 --- a/go.sum +++ b/go.sum @@ -237,12 +237,8 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedib0t/go-pretty/v6 v6.4.6 h1:v6aG9h6Uby3IusSSEjHaZNXpHFhzqMmjXcPq1Rjl9Jw= github.com/jedib0t/go-pretty/v6 v6.4.6/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs= -github.com/jfrog/build-info-go v1.9.8 h1:D8/ga+YgQpqp/CJj2zteS4/twmSy8zvm1v9lCd2Kv1M= -github.com/jfrog/build-info-go v1.9.8/go.mod h1:t31QRpH5xUJKw8XkQlAA+Aq7aanyS1rrzpcK8xSNVts= github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk= github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= -github.com/jfrog/jfrog-cli-core/v2 v2.41.1 h1:jFRuQdqY3DE1hfy6opzRz5dWrAbYJPN4tFnou794PKE= -github.com/jfrog/jfrog-cli-core/v2 v2.41.1/go.mod h1:YqB9rEJF1P7uGLIPUvF5qdDDf1zM5f4DneIQNkqyAfs= github.com/jfrog/jfrog-client-go v1.31.5 h1:dYVgIJzMwX+EU9GEELKPSHFLyfW6UrrjZWMEZtAyx6A= github.com/jfrog/jfrog-client-go v1.31.5/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -411,6 +407,10 @@ github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofm github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= +github.com/yahavi/build-info-go v0.1.2-0.20230824155947-19b4a42c70d2 h1:QC50/5wdC0/4oa5soSx5124ei6NA/7FfOkm76h+JoXA= +github.com/yahavi/build-info-go v0.1.2-0.20230824155947-19b4a42c70d2/go.mod h1:t31QRpH5xUJKw8XkQlAA+Aq7aanyS1rrzpcK8xSNVts= +github.com/yahavi/jfrog-cli-core/v2 v2.0.0-20230824160204-b4bcbaf7ff62 h1:mWLKD5Zg85cnKDzWq7vIREtBwmzc3V1O8EzxUVc91Vg= +github.com/yahavi/jfrog-cli-core/v2 v2.0.0-20230824160204-b4bcbaf7ff62/go.mod h1:YqB9rEJF1P7uGLIPUvF5qdDDf1zM5f4DneIQNkqyAfs= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/testdata/gradle/projectwithplugin/build.gradle b/testdata/gradle/projectwithplugin/build.gradle index 7664f11cb..a33de018a 100644 --- a/testdata/gradle/projectwithplugin/build.gradle +++ b/testdata/gradle/projectwithplugin/build.gradle @@ -9,6 +9,7 @@ buildscript { apply plugin: 'groovy' apply plugin: 'idea' apply plugin: 'com.jfrog.artifactory' +apply plugin: 'maven-publish' version = 1.0 task initProject(description: 'Initialize project directory structure.') { doLast { @@ -28,6 +29,18 @@ task initProject(description: 'Initialize project directory structure.') { } } +publishing { + publications { + mavenJava(MavenPublication) { + from components.java + } + } +} + +tasks.withType(GenerateModuleMetadata) { + enabled = false +} + artifactory { contextUrl = "${URL}" publish { @@ -40,7 +53,7 @@ artifactory { // Reference to Gradle publications defined in the build script. // This is how we tell the Artifactory Plugin which artifacts should be // published to Artifactory. - publishConfigs('archives', 'published') + publications('mavenJava') publishArtifacts = true // Properties to be attached to the published artifacts. properties = ['qa.level': 'basic', 'dev.team' : 'core']