Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade gradle and plugin versions. #652

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/buildOnlyModified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: extract branch
id: extract_branch
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
Expand Down Expand Up @@ -50,16 +55,16 @@ jobs:
id: extract_version
run: echo "::set-output name=v::$(cat version.properties | grep 'semver' | sed -e 's/^version.semver=//')"
- name: List all releases
uses: actions/github-script@0.3.0
uses: actions/github-script@v7
with:
github-token: ${{ secrets.TOKEN_GITHUB }}
script: |
const result = await github.repos.listReleases(context.repo);
const result = await github.rest.repos.listReleases(context.repo);
result.data
.filter(release => release.tag_name == "${{ steps.extract_version.outputs.v }}")
.forEach(function(release){
const releaseObj = {release_id:release.id, owner:context.repo.owner, repo:context.repo.repo}
github.repos.deleteRelease(releaseObj)
github.rest.repos.deleteRelease(releaseObj)
});
- name: Create Release
id: create_release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create_issue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
{panel}

- name: Change Title
uses: actions/github-script@0.8.0
uses: actions/github-script@v7
env:
ISSUE_TITLE: ${{ github.event.issue.title}}
with:
Expand All @@ -51,7 +51,7 @@ jobs:
})

- name: Add comment after sync
uses: actions/github-script@0.8.0
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ jobs:
if: github.event.pull_request.merged == true
runs-on: [self-hosted, technologies]
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
Expand All @@ -27,22 +32,22 @@ jobs:
./gradlew promote --stacktrace
- name: Delete PreRelease
id: delete_prerelease
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
github-token: ${{ secrets.TOKEN_GITHUB }}
script: |
const result = await github.repos.listReleases(context.repo);
const result = await github.rest.repos.listReleases(context.repo);
result.data
.filter(release => release.tag_name == "${{ steps.extract_pr_version.outputs.v }}")
.forEach(function(release){
const releaseObj = {release_id:release.id, owner:context.repo.owner, repo:context.repo.repo}
github.repos.deleteRelease(releaseObj)
github.rest.repos.deleteRelease(releaseObj)
});
- name: Delete PreRelease Tag
run: |
git config --local user.email "github-action@saagie.com"
git config --local user.name "GitHub Action Bot"
remote_repo="https://${{ github.actor }}:${{ secrets.TOKEN_GITHUB }}@github.com/${{ github.repository }}.git"
remote_repo="https://${{ github.actor }}:${{ secrets.TOKEN_GITHUB }}@github.com/${{ github.rest.repository }}.git"
git push --delete "${remote_repo}" ${{ steps.extract_pr_version.outputs.v }}
- name: Remove buildMeta version
run: |
Expand Down
32 changes: 2 additions & 30 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import com.github.gradle.node.NodeExtension
import com.github.gradle.node.NodePlugin
import com.github.gradle.node.yarn.task.YarnTask
import com.saagie.technologies.SaagieTechnologiesPackageGradlePlugin
import com.saagie.technologies.TYPE
import com.saagie.technologies.modifiedProjects
Expand All @@ -26,18 +23,10 @@ import net.thauvin.erik.gradle.semver.SemverIncrementBuildMetaTask
plugins {
id("net.thauvin.erik.gradle.semver") version "1.0.4"
id("com.bmuschko.docker-remote-api") version "6.1.1"
id("com.github.node-gradle.node") version "3.2.1"
id("org.kordamp.gradle.project") version "0.46.0"
id("org.kordamp.gradle.project") version "0.54.0"
id("com.saagie.technologies") version "1.3.16"
}

buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath("com.saagie:technologiesplugin:1.3.15")
}
}
apply<SaagieTechnologiesPackageGradlePlugin>()

config {
Expand Down Expand Up @@ -71,23 +60,6 @@ config {
}
}

configure(subprojects) {
apply<NodePlugin>()

configure<NodeExtension> {
download.set(true)
version.set("16.14.2")
npmVersion.set("8.5.0")
yarnVersion.set("1.22.18")
}

tasks {
val yarn_install by getting {
(this as YarnTask).args.addAll("--cache-folder", File(File(project.projectDir, ".cache"), "yarn").toString())
}
}
}

tasks.register("buildModifiedJobs") {
group = "technologies"
description = "Build only modified jobs"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 2 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
Expand Down Expand Up @@ -129,6 +130,7 @@ fi
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
Expand Down
189 changes: 89 additions & 100 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,100 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
11 changes: 6 additions & 5 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ pluginManagement {
}
}
plugins {
id("com.gradle.enterprise") version "3.0"
id("org.kordamp.gradle.settings") version "0.46.0"
id("com.gradle.develocity") version "3.18"
id("org.kordamp.gradle.settings") version "0.54.0"
}

apply<org.kordamp.gradle.plugin.settings.SettingsPlugin>()

gradleEnterprise {
develocity {
buildScan {
termsOfServiceUrl = "https://gradle.com/terms-of-service"
termsOfServiceAgree = "yes"
termsOfUseUrl = "https://gradle.com/terms-of-service"
termsOfUseAgree = "yes"
publishing.onlyIf { false }
}
}
rootProject.name = "technologies"
Expand Down
4 changes: 2 additions & 2 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version.buildmeta=
version.buildmeta=upgradeVersion
version.major=1
version.minor=186
version.patch=0
version.prerelease=
version.semver=1.186.0
version.semver=1.186.0+upgradeVersion
Loading