Skip to content
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
78 changes: 0 additions & 78 deletions .github/workflows/backwards-compatibility-java11.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/backwards-compatibility-java17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches: [develop]
paths:
- "core-customize/manifest.json"
- "core-customize/hybris/bin/custom/sapcxtools/**/*.java"
- "core-customize/hybris/bin/custom/sapcxtools/**/*-beans.xml"
- "core-customize/hybris/bin/custom/sapcxtools/**/*-items.xml"
Expand All @@ -21,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ["2205.25"]
version: ["2211.43"]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/buildandtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches: [develop]
paths:
- "core-customize/manifest.json"
- "core-customize/hybris/bin/custom/sapcxtools/**/*.java"
- "core-customize/hybris/bin/custom/sapcxtools/**/*-beans.xml"
- "core-customize/hybris/bin/custom/sapcxtools/**/*-items.xml"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches: [develop]
paths:
- "core-customize/manifest.json"
- "core-customize/hybris/bin/custom/sapcxtools/**/*.java"
- "core-customize/hybris/bin/custom/sapcxtools/**/*-beans.xml"
- "core-customize/hybris/bin/custom/sapcxtools/**/*-items.xml"
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ consolestorage/
.idea/
idea-module-files/
*.iml
rebel.xml
com.springsource.sts.config.flow.prefs
org.springframework.ide.eclipse.beans.core.prefs
org.springframework.ide.eclipse.core.prefs
Expand All @@ -28,7 +29,7 @@ core-customize/hybris/roles/
core-customize/hybris/log/
core-customize/hybris/temp/
core-customize/hybris/data/
core-customize/hybris/config/local-config/99-local.properties
core-customize/hybris/config/local-config/9[0-9]-local.properties

# only allow sapcxtools extension
core-customize/hybris/bin/modules/
Expand Down
13 changes: 11 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id("com.diffplug.spotless") version("6.8.0")
id("com.diffplug.spotless") version("6.25.0")
}

repositories {
Expand All @@ -9,7 +9,6 @@ repositories {
spotless {
val importOrderConfigFile = project.file("core-customize/conventions/eclipse.importorder")
val javaFormatterConfigFile = project.file("core-customize/conventions/eclipse-formatter-settings.xml")

java {
target("core-customize/hybris/bin/custom/sapcxtools/**/*.java")
targetExclude("core-customize/hybris/bin/custom/sapcxtools/**/gensrc/**")
Expand All @@ -19,4 +18,14 @@ spotless {
trimTrailingWhitespace()
endWithNewline()
}

//val frontendFormatterConfigFile = project.file("js-storefront/*/.prettierrc")
//format("frontend") {
// target(
// "js-storefront/*/src/**/*.scss",
// "js-storefront/*/src/**/*.ts",
// "js-storefront/*/src/**/*.html"
// )
// prettier("2.5.1").configFile(frontendFormatterConfigFile)
//}
}
118 changes: 56 additions & 62 deletions core-customize/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import java.time.Instant
import java.util.Base64

plugins {
id("sap.commerce.build") version("3.7.1")
id("sap.commerce.build.ccv2") version("3.7.1")
id("de.undercouch.download") version("4.1.2")
id("sap.commerce.build") version("4.0.0")
id("sap.commerce.build.ccv2") version("4.0.0")
id("de.undercouch.download") version("5.5.0")
}

val DEPENDENCY_FOLDER = "../dependencies"
Expand All @@ -25,7 +25,7 @@ if (project.hasProperty("SAPCX_ARTEFACT_BASEURL") && project.hasProperty("SAPCX_

val COMMERCE_VERSION = CCV2.manifest.commerceSuiteVersion
tasks.register<Download>("downloadPlatform") {
src(BASEURL + "/hybris-commerce-suite/${COMMERCE_VERSION}.zip")
src(BASEURL + "/commerce/hybris-commerce-suite-${COMMERCE_VERSION}.zip")
dest(file("${DEPENDENCY_FOLDER}/hybris-commerce-suite-${COMMERCE_VERSION}.zip"))
header("Authorization", "Basic ${AUTHORIZATION}")
overwrite(false)
Expand All @@ -42,7 +42,7 @@ if (project.hasProperty("SAPCX_ARTEFACT_BASEURL") && project.hasProperty("SAPCX_
if (CCV2.manifest.extensionPacks.any{"hybris-commerce-integrations".equals(it.name)}) {
val INTEXTPACK_VERSION = CCV2.manifest.extensionPacks.first{"hybris-commerce-integrations".equals(it.name)}.version
tasks.register<Download>("downloadIntExtPack") {
src(BASEURL + "/hybris-commerce-integrations/${INTEXTPACK_VERSION}.zip")
src(BASEURL + "/integration/hybris-commerce-integrations-${INTEXTPACK_VERSION}.zip")
dest(file("${DEPENDENCY_FOLDER}/hybris-commerce-integrations-${INTEXTPACK_VERSION}.zip"))
header("Authorization", "Basic ${AUTHORIZATION}")
overwrite(false)
Expand All @@ -58,81 +58,75 @@ if (project.hasProperty("SAPCX_ARTEFACT_BASEURL") && project.hasProperty("SAPCX_
}

tasks.register<WriteProperties>("generateLocalProperties") {
comment = "FILE WAS GENERATED AT " + Instant.now()
outputFile = project.file("hybris/config/local.properties")
comment = "GENERATED AT " + Instant.now()
destinationFile = project.file("hybris/config/local.properties")
property("hybris.optional.config.dir", project.file("hybris/config/local-config").absolutePath)
doLast {
mkdir(project.file("hybris/config/local-config/"))
}
}

val symlinkConfigTask = tasks.register("symlinkConfig")
val hybrisConfig = file("hybris/config")
val localConfig = file("hybris/config/local-config")
val homeDirectory = file(project.gradle.gradleUserHomeDir.parent)
mapOf(
"10-local.properties" to file("hybris/config/cloud/common.properties"),
"20-local.properties" to file("hybris/config/cloud/persona/development.properties"),
"50-local.properties" to file("hybris/config/cloud/local-dev.properties")
"10-local.properties" to "cloud/common.properties",
"20-local.properties" to "cloud/persona/development.properties",
"50-local.properties" to "cloud/local-dev.properties",
"90-local.properties" to "local/90-local.properties",
"91-local.properties" to "local/91-local.properties",
"92-local.properties" to "local/92-local.properties",
"93-local.properties" to "local/93-local.properties",
"94-local.properties" to "local/94-local.properties",
"95-local.properties" to "local/95-local.properties",
"96-local.properties" to "local/96-local.properties",
"97-local.properties" to "local/97-local.properties",
"98-local.properties" to "local/98-local.properties"
).forEach{
val symlinkTask = tasks.register<Exec>("symlink${it.key}") {
val path = it.value.relativeTo(localConfig)
if (Os.isFamily(Os.FAMILY_UNIX)) {
commandLine("sh", "-c", "ln -sfn ${path} ${it.key}")
} else {
// https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/
val windowsPath = path.toString().replace("[/]".toRegex(), "\\")
commandLine("cmd", "/c", """mklink /d "${it.key}" "${windowsPath}" """)
}
workingDir(localConfig)
dependsOn("generateLocalProperties")
}
symlinkConfigTask.configure {
dependsOn(symlinkTask)
val link = it.key
var path = file(hybrisConfig.absolutePath + "/" + it.value)
if (!path.exists()) {
path = file(homeDirectory.absolutePath + "/.sap-commerce/local-config/" + it.key)
}
}

if (project.file("../certificates/local.cxdev.me.p12").exists() &&
project.file("../certificates/cxdev_eu_auth0_com-metadata.xml").exists()) {

val symlinkTask = tasks.register<Exec>("symlinkLocalSSOConfiguration") {
val link = "95-local.properties"
val path = file("hybris/config/cloud/local-sso.properties").relativeTo(localConfig)

if (Os.isFamily(Os.FAMILY_UNIX)) {
commandLine("sh", "-c", "ln -sfn ${path} ${link}")
} else {
// https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/
val windowsPath = path.toString().replace("[/]".toRegex(), "\\")
commandLine("cmd", "/c", """mklink /d "${link}" "${windowsPath}" """)

if (path.exists()) {
val symlinkTask = tasks.register<Exec>("symlink-${link}") {
val relPath = path.relativeTo(localConfig)
if (Os.isFamily(Os.FAMILY_UNIX)) {
commandLine("sh", "-c", "ln -sfn ${relPath} ${link}")
} else {
// https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/
val windowsPath = relPath.toString().replace("[/]".toRegex(), "\\")
commandLine("cmd", "/c", """mklink "${link}" "${windowsPath}" """)
}
workingDir(localConfig)
dependsOn("generateLocalProperties")
}

workingDir(localConfig)
dependsOn("generateLocalProperties")
}
symlinkConfigTask.configure {
dependsOn(symlinkTask)
}
} else if (file("95-local.properties").relativeTo(localConfig).exists()) {
val unlinkTask = tasks.register<Exec>("unlinkLocalSSOConfiguration") {
val link = "95-local.properties"

if (Os.isFamily(Os.FAMILY_UNIX)) {
commandLine("sh", "-c", "unlink ${link}")
} else {
commandLine("cmd", "/c", """rmdir "${link}" """)
symlinkConfigTask.configure {
dependsOn(symlinkTask)
}
} else {
// Unlink if no longer existing
val unlinkTask = tasks.register<Exec>("unlink-${link}") {
if (Os.isFamily(Os.FAMILY_UNIX)) {
commandLine("sh", "-c", "rm -f ${link}")
} else {
commandLine("cmd", "/c", "del /q ${link}")
}
workingDir(localConfig)
dependsOn("generateLocalProperties")
}
symlinkConfigTask.configure {
dependsOn(unlinkTask)
}

workingDir(localConfig)
dependsOn("generateLocalProperties")
}
symlinkConfigTask.configure {
dependsOn(unlinkTask)
}
}

tasks.register<WriteProperties>("generateLocalDeveloperProperties") {
dependsOn(symlinkConfigTask)
comment = "my.properties - add your own local development configuration parameters here"
outputFile = project.file("hybris/config/local-config/99-local.properties")
destinationFile = project.file("hybris/config/local-config/99-local.properties")
onlyIf {
!project.file("hybris/config/local-config/99-local.properties").exists()
}
Expand All @@ -146,4 +140,4 @@ tasks.register("setupLocalDevelopment") {
group = "SAP Commerce"
description = "Setup local development"
dependsOn("bootstrapPlatform", "generateLocalDeveloperProperties", "installManifestAddons")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2023] [SAP CX Tools]
Copyright [2025] [SAP CX Tools]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,4 @@ them. And if you are missing a builder, feel free to raise an issue or to create

_Licensed under the Apache License, Version 2.0, January 2004_

_Copyright 2023, SAP CX Tools_
_Copyright 2025, SAP CX Tools_
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<extensioninfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="extensioninfo.xsd">
<extension abstractclassprefix="Generated" classprefix="Toolkit" jaloLogicFree="true"
name="sapcommercetoolkit" version="4.3.0" usemaven="true">
name="sapcommercetoolkit" version="4.4.0" usemaven="true">
<requires-extension name="backoffice"/>
<coremodule generated="true" manager="de.hybris.platform.jalo.extension.GenericManager" packageroot="tools.sapcx.commerce.toolkit"/>
<meta key="backoffice-module" value="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>tools.sapcx</groupId>
<artifactId>sapcommercetoolkit</artifactId>
<version>4.3.0</version>
<version>4.4.0</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ----------------------------------------------------------------------------
# Copyright (c) 2023 SAP CX Tools
# Copyright (c) 2025 SAP CX Tools
# ----------------------------------------------------------------------------

# Location of the file for the global platform spring application context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [2023] [SAP CX Tools]
Copyright [2025] [SAP CX Tools]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ For the sync status updates, one need to configure a property using the conventi

_Licensed under the Apache License, Version 2.0, January 2004_

_Copyright 2023, SAP CX Tools_
_Copyright 2025, SAP CX Tools_
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<extensioninfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="extensioninfo.xsd">
<extension abstractclassprefix="Generated" classprefix="CxBackoffice" jaloLogicFree="true"
name="sapcxbackoffice" version="4.3.0" usemaven="true">
name="sapcxbackoffice" version="4.4.0" usemaven="true">
<requires-extension name="sapcommercetoolkit"/>
<requires-extension name="backoffice"/>

Expand Down
Loading
Loading