Skip to content

Commit

Permalink
Use Gradle extractor 5 on Gradle >= 6.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
yahavi committed Aug 24, 2023
1 parent 76a3d27 commit fb9339e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/gradleTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
15 changes: 14 additions & 1 deletion testdata/gradle/projectwithplugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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']
Expand Down

0 comments on commit fb9339e

Please sign in to comment.