Skip to content

Commit

Permalink
feat!: update gradle to 8.5 (#92073)
Browse files Browse the repository at this point in the history
* updated gradle to 8.5
* updated kotlin to 1.9.21
* minor dependency updates
* now using .github actions
* fixed gradle properties to honor JDK17
* ICMProjectPluginIntegrationKotlinSpec is now executable independent from OS
* removed or replaced calls to deprecated code
* replaced 'automatic loading of test framework implementation dependencies' by the usage of plugin jvm-test-suite
* removed unused imports
* fixed dependencies of task asciidoctor
* removed obsolete detekt.yml
* enabled standard streams for test
* updated com.intershop.version:semantic-version to 2.0.0
* updated plugin com.gradle.enterprise to 3.16.1
  • Loading branch information
skiesewetter-intershop authored Jan 10, 2024
1 parent 0b9cb2b commit 4a3a5df
Show file tree
Hide file tree
Showing 19 changed files with 283 additions and 1,182 deletions.
54 changes: 9 additions & 45 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,20 @@ name: Run build and tests
on:
push:
branches:
- '*'
- '**'
pull_request:
branches: [ master ]

jobs:
build:
permissions:
checks: write
pull-requests: write
contents: read
environment: CIRelease
runs-on: ubuntu-latest

steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: git fetch --all --tags

- name: Create .gradle dir
run: mkdir -p $HOME/.gradle
- name: Install gpg secret key
env:
SIGNINGFILE: ${{ secrets.SIGNINGFILE }}
run: |
cat <(echo -e "${{ secrets.SIGNINGFILE }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Export gpg file
env:
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
run: |
gpg --batch --passphrase="$SIGNINGPASSWORD" --pinentry-mode loopback --export-secret-keys $SIGNINGKEYID > $HOME/.gradle/secrets.gpg
- name: Create gradle sproperties
env:
APIKEY: ${{ secrets.APIKEY }}
APISECRET: ${{ secrets.APISECRET }}
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }}
SONATYPEUSER: ${{ secrets.SONATYPEUSER }}
run: echo -e "gradle.publish.key=$APIKEY\ngradle.publish.secret=$APISECRET\nsigning.keyId=$SIGNINGKEYID\nsigning.password=$SIGNINGPASSWORD\nsigning.secretKeyRingFile=$HOME/.gradle/secrets.gpg\nsonatypeUsername=$SONATYPEUSER\nsonatypePassword=$SONATYPEPASSWORD" > $HOME/.gradle/gradle.properties
- name: Build and test with Gradle
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=true"
run: ./gradlew test build :publishIntershopMvnPublicationToMavenRepository -s --scan
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1
if: always()
with:
files: build/test-results/**/*.xml
- name: Post Build
run: rm -f $HOME/.gradle/gradle.properties && rm -f $HOME/.docker/config.json
- name: Setup
uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-setup@v1.0
- name: Build
uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-build@v1.0
63 changes: 17 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,55 +6,26 @@ name: Run release build from tag
on:
push:
tags:
- '*'
- '**'

jobs:
release:
build:
permissions:
checks: write
pull-requests: write
contents: read
environment: CIRelease
runs-on: ubuntu-latest

steps:
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: git fetch --all --tag
- name: Create .gradle dir
run: mkdir -p $HOME/.gradle
- id: install-secret-key
name: Install gpg secret key
env:
SIGNINGFILE: ${{ secrets.SIGNINGFILE }}
run: |
cat <(echo -e "${{ secrets.SIGNINGFILE }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- id: export-gpg-file
name: Export gpg file
env:
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
run: |
gpg --batch --passphrase="$SIGNINGPASSWORD" --pinentry-mode loopback --export-secret-keys $SIGNINGKEYID > $HOME/.gradle/secrets.gpg
- name: Create gradle sproperties
env:
APIKEY: ${{ secrets.APIKEY }}
APISECRET: ${{ secrets.APISECRET }}
SIGNINGKEYID: ${{ secrets.SIGNINGKEYID }}
SIGNINGPASSWORD: ${{ secrets.SIGNINGPASSWORD }}
SONATYPEPASSWORD: ${{ secrets.SONATYPEPASSWORD }}
SONATYPEUSER: ${{ secrets.SONATYPEUSER }}
run: echo -e "gradle.publish.key=$APIKEY\ngradle.publish.secret=$APISECRET\nsigning.keyId=$SIGNINGKEYID\nsigning.password=$SIGNINGPASSWORD\nsigning.secretKeyRingFile=$HOME/.gradle/secrets.gpg\nsonatypeUsername=$SONATYPEUSER\nsonatypePassword=$SONATYPEPASSWORD" > $HOME/.gradle/gradle.properties
- name: Run gradle release
env:
GRADLE_OPTS: "-Dorg.gradle.daemon=true"
run: ./gradlew -PrunOnCI=true test build :publishIntershopMvnPublicationToMavenRepository :publishPlugins -s --scan
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v1
if: always()
- name: Setup
uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-setup@v1.0
- name: Release
uses: IntershopCommunicationsAG/.github/actions/gradle-plugin-release@v1.0
with:
files: build/test-results/**/*.xml
- name: Post Build
run: rm -f $HOME/.gradle/gradle.properties
signing-file: ${{ secrets.SIGNINGFILE }}
signing-key-id: ${{ secrets.SIGNINGKEYID }}
signing-password: ${{ secrets.SIGNINGPASSWORD }}
api-key: ${{ secrets.APIKEY }}
api-secret: ${{ secrets.APISECRET }}
sonatype-user: ${{ secrets.SONATYPEUSER }}
sonatype-password: ${{ secrets.SONATYPEPASSWORD }}
59 changes: 18 additions & 41 deletions README.asciidoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
= Intershop Commerce Management Project Plugins
:latestRevision: 3.0.0
:latestRevision: 6.0.0
:toc:
:icons: font

CAUTION:
Version ??? requires Gradle 7.5.1!
Version {latestRevision} requires Gradle 8.5!

== Summary
This plugin collection contains plugins for building all necessary artifacts of an
Expand All @@ -29,6 +29,7 @@ The value of the property is "container". There is no publishing configuration f
++++
.build.gradle
[source,groovy]
[subs=+attributes]
----
plugins {
id 'com.intershop.icm.cartridge.container' version '{latestRevision}'
Expand All @@ -44,6 +45,7 @@ plugins {
++++
.build.gradle.kts
[source,kotlin]
[subs=+attributes]
----
plugins {
id("com.intershop.icm.cartridge.container") version "{latestRevision}"
Expand All @@ -66,6 +68,7 @@ published to a Maven repository: jar, source jar, and javadoc jar.
++++
.build.gradle
[source,groovy]
[subs=+attributes]
----
plugins {
id 'com.intershop.icm.cartridge.product' version '{latestRevision}'
Expand All @@ -81,6 +84,7 @@ plugins {
++++
.build.gradle.kts
[source,kotlin]
[subs=+attributes]
----
plugins {
id("com.intershop.icm.cartridge.product") version "{latestRevision}"
Expand All @@ -102,6 +106,7 @@ payment or search connectors.
++++
.build.gradle
[source,groovy]
[subs=+attributes]
----
plugins {
id 'com.intershop.icm.cartridge.adapter' version '{latestRevision}'
Expand All @@ -117,6 +122,7 @@ plugins {
++++
.build.gradle.kts
[source,kotlin]
[subs=+attributes]
----
plugins {
id("com.intershop.icm.cartridge.adapter") version "{latestRevision}"
Expand All @@ -137,6 +143,7 @@ in a production or test container.
++++
.build.gradle
[source,groovy]
[subs=+attributes]
----
plugins {
id 'com.intershop.icm.cartridge.development' version '{latestRevision}'
Expand All @@ -152,6 +159,7 @@ plugins {
++++
.build.gradle.kts
[source,kotlin]
[subs=+attributes]
----
plugins {
id("com.intershop.icm.cartridge.development") version "{latestRevision}"
Expand All @@ -173,6 +181,7 @@ in a production container.
++++
.build.gradle
[source,groovy]
[subs=+attributes]
----
plugins {
id 'com.intershop.icm.cartridge.test' version '{latestRevision}'
Expand All @@ -188,6 +197,7 @@ plugins {
++++
.build.gradle.kts
[source,kotlin]
[subs=+attributes]
----
plugins {
id("com.intershop.icm.cartridge.test") version "{latestRevision}"
Expand Down Expand Up @@ -269,6 +279,7 @@ ZipStaticFiles` | Creates a zip file with the static Cartridge content.
++++
.build.gradle
[source,groovy]
[subs=+attributes]
----
plugins {
id 'com.intershop.icm.cartridge.test' version '{latestRevision}'
Expand All @@ -285,6 +296,7 @@ plugins {
++++
.build.gradle.kts
[source,kotlin]
[subs=+attributes]
----
plugins {
id("com.intershop.icm.cartridge.test") version "{latestRevision}"
Expand Down Expand Up @@ -313,6 +325,7 @@ project and it creates the configurations `cartridge` and `cartridgeRuntime` in
++++
.build.gradle
[source,groovy]
[subs=+attributes]
----
plugins {
id 'com.intershop.gradle.icm.base' version '{latestRevision}'
Expand Down Expand Up @@ -341,6 +354,7 @@ intershop {
++++
.build.gradle.kts
[source,kotlin]
[subs=+attributes]
----
plugins {
id("com.intershop.gradle.icm.base") version "{latestRevision}"
Expand Down Expand Up @@ -395,16 +409,6 @@ The project information (`projectInfo`) is used in the display of the login dial
|===
|Property | Type | Default value | Description

|`licenseDirectory` | `String` |
One of these values in the following order: +
1. value of environment variable `LICENSEDIR` +
2. value of system property `licenseDir` +
3. value of Gradle property `licenseDir` +
4. default value `$GRADLE_USER_HOME/icm-default/lic` | Path of a directory with the
Intershop license file. This is required by an ICM server instance. +
*Deprecated since 5.8.0:* Property licenseDirectory is unsupported.
|`licenseFilePath` | `String` | `<licenseDirectory>/license.xml` |The absolute path of the license file. +
*Deprecated since 5.8.0:* Property licenseFilePath is unsupported.
|`configDirectory` | `String` |
One of these values in the following order: +
1. value of environment variable `CONFIGDIR` +
Expand Down Expand Up @@ -480,6 +484,7 @@ extended by this plugin. It adds files configured by the extension of this plugi
++++
.build.gradle
[source,groovy]
[subs=+attributes]
----
plugins {
id 'com.intershop.gradle.icm.project' version '{latestRevision}'
Expand Down Expand Up @@ -532,6 +537,7 @@ intershop {
++++
.build.gradle.kts
[source,kotlin]
[subs=+attributes]
----
plugins {
id("com.intershop.gradle.icm.project") version "{latestRevision}"
Expand Down Expand Up @@ -628,10 +634,6 @@ server/config_folder` | Contains the complete configuration of a development ser

| `cartridge` | `String` | Add a cartridge to the list of cartridges. This can be a project name or a short module dependency configuration (`group:module:version`).
| `dbprepareCartridge` | `String` | Add a cartridge to the list of cartridges for Database preparation. This can be a project name or a short module dependency configuration (`group:module:version`).
| `serverDirConfig` | Action<in ProjectServerDirs> | Configures the usage of project directories for configuration from an action. +
*Deprecated since 5.6.0*: Configuration via folder is unsupported
| `serverDirConfig` | Closure<ProjectServerDirs> | Configures the usage of project directories for configuration from a closure. +
*Deprecated since 5.6.0*: Configuration via folder is unsupported
|===

`modules` is a `NamedDomainObjectContainer` of `CartridgeProject` a configuration is possible in a `Closure` or in a `Action`.
Expand Down Expand Up @@ -685,31 +687,6 @@ Methods of `CartridgeProject`
| `excludes` | `Collection<String>` | Adds a collection of exclude patterns to the set.
|===

====== Object `ProjectServerDirs`

*Deprecated since 5.6.0*: Configuration via folder is unsupported

This configures directories for environment types. These configurations are all optional.

Methods of `ProjectServerDirs`

[cols="17%,17%,66%", width="99%, options="header"]
|===
|Method | Parameter | Description

| `base` | `Action<in ServerDir>` | This configures basically directories and files of the project from an action.
| `base` | `Closure<ServerDirSet> | This configures basically directories and files of the project from a closure.
| `prod` | `Action<in ServerDir>` | This configures production (container) directories and files of the project from an action.
| `prod` | `Closure<ServerDir> | This configures production (container) directories and files of the project from a closure.
| `test` | `Action<in ServerDir>` | This configures test (testcontainer) directories and files of the project from an action.
| `test` | `Closure<ServerDir> | This configures test (testcontainer) directories and files of the project from a closure.
| `dev` | `Action<in ServerDir>` | This configures development (server) directories and files of the project from an action.
| `dev` | `Closure<ServerDir> | This configures development (server) directories and files of the project from a closure.
|===

There is one preconfigured base configuration "main". The path for the configuration is 'configuration/base'.
*The directory must be available in a project.*

====== Object `ServerDirSet`

This configuration prepares a https://docs.gradle.org/current/javadoc/org/gradle/api/file/CopySpec.html[CopySpec] for the directories of the project.
Expand Down
Loading

0 comments on commit 4a3a5df

Please sign in to comment.