{"id":20027188,"url":"https://github.com/unic/commerce-gradle-plugins","last_synced_at":"2026-06-06T18:31:35.505Z","repository":{"id":44161074,"uuid":"454845955","full_name":"unic/commerce-gradle-plugins","owner":"unic","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-24T11:39:21.000Z","size":8009,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-25T17:11:25.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-02T16:15:47.000Z","updated_at":"2022-02-08T18:31:38.000Z","dependencies_parsed_at":"2023-01-20T06:30:55.822Z","dependency_job_id":null,"html_url":"https://github.com/unic/commerce-gradle-plugins","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unic%2Fcommerce-gradle-plugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unic%2Fcommerce-gradle-plugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unic%2Fcommerce-gradle-plugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unic%2Fcommerce-gradle-plugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unic","download_url":"https://codeload.github.com/unic/commerce-gradle-plugins/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241460057,"owners_count":19966516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T09:09:22.211Z","updated_at":"2026-06-06T18:31:35.033Z","avatar_url":"https://github.com/unic.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unic commerce-gradle-plugins: Code Quality\n\n[![CI](https://github.com/unic/commerce-gradle-plugins/actions/workflows/gradle.yml/badge.svg)](https://github.com/unic/commerce-gradle-plugins/actions/workflows/gradle.yml)\n\n## Goal\n\nThis plugin supplies tasks and extensions to help with analyzing the code quality of a SAP Commerce project.\n\nSince such projects cannot rely on the common sonarqube and jacoco plugins for technical reasons, a plugin like this one is required to do the SCA.\n\n### History\n\nOriginally Unic had their own toolchain to build, test, analyze, deploy and configure applications in their own and their customer's hosting environment. As SAP presented the Commerce Cloud v2 environment the toolchain became less relevant and the deploy \u0026 configure components have been deprecated. With the introduction of the [commerce-gradle-plugin](https://github.com/SAP/commerce-gradle-plugin), which seems to share some ideas with the Unic toolchain, the build and test components were deprecated, too.\n\nSo far the `codequality` component has survived.\n\n## Prerequsites\n\nAn already configured and ready-to-test SAP Commerce instance is required to actually execute the included tasks.\n\n\n## Usage\n\nAdd this to your build.gradle.ks to enable the plugin:\n\n```kotlin\nplugins {\n    id(\"com.unic.commercegradleplugin.codequality\") version(\"0.0.1\")\n}\napply\u003cCodeQualityPlugin\u003e()\n```\n\n## Configuration\n\n- _jacocoDependency_ - The GAV coordinates that should point to a jacoco agent jar.\n  \u003cbr/\u003etype: String\n  \u003cbr/\u003edefault: `org.jacoco:org.jacoco.agent:0.8.7:runtime`\n\n- _jacocoCliDependency_ - The GAV coordinates that should point to a jacoco cli jar.\n  \u003cbr/\u003etype: String\n  \u003cbr/\u003edefault: `org.jacoco:org.jacoco.cli:0.8.7:nodeps@jar`\n\n- _sonarrunnerDependency_ - The GAV coordinates that should point to a sonarrunner agent jar.\n  \u003cbr/\u003etype: String\n  \u003cbr/\u003edefault: `org.sonarsource.scanner.cli:sonar-scanner-cli:4.6.2.2472@jar`\n\n## Tasks / Rules\n\n### _jacoco\\\u003ctargettask\u003e_ Rule\n\nTo generate coverage data you need to configure the tasks that need to be enhanced in order to enable on-the-fly instrumentation by the jacoco agent.\n\nThis tasks wraps any _target task_ with supplemental tasks, which reconfigure a hybris installation to enable or disable jacoco on-the-fly instrumentation to generate .exec files before or after running the actual _target task_, respectively. The _target task_ name is being used to generate a target file name for the jacoco execution data. The following pattern will be used: `${projectDir}/hybris/log/jacoco/jacoco-${classifier}.exec`.\n\n**Example**\n`./gradlew jacocoYUnittests jacocoYIntegrationtests`\n\n### _jacocoReport_ Task\n\nIn order for sonar to be able to pick up the reports, you will have to compile the jacoco execution data into an XML report. Call the `jacocoReport` target to do so before executing the `sonar` task, for example by defining a dependency.\n\n### _sonar_ Task\n\nThis task executes the Sonar Runner to analyze your code and pushes a new report to Sonarqube.\n## Restrictions / Notes\n\nCurrently the jacoco related extensions are assuming that hybris is installed in `${projectDir}/hybris`.\n## Development\n\n_Status: Draft_\n\nThis plugin is meant to be used to supplement the (SAP commerce-gradle-plugin)[https://github.com/SAP/commerce-gradle-plugin/] plugin suite. Please make sure to stay compatible.\n\n### Prerequisites\n\n- Groovy SDK\n- Familiarity with Gradle\n- IDE (VS Code, IntelliJ)\n\n### Preparing the plugin(s)\n\n- Adjust some code\n- Check the version of the plugin in `gradle.properties` as this will be the version in your local maven repository.\n- Build the project and publish it into your local maven repository like so: `./gradlew publishToMavenLocal`\n\n### Testing the plugin(s)\n\nOnce you've published the plugins into your local maven repository you need to tell the _consuming project_\nthat you want to load the plugins from your local maven repository instead of nexus.\n\nYou can do so by adjusting the `settings.gradle` in the `hybris-toolkit-build` repository:\n\n```\npluginManagement {\n    repositories {\n        mavenLocal()\n        [...]\n    }\n}\n\nrootProject.name = 'hybris-toolkit'\n```\n\nMake sure the `mavenLocal()` is the first line in the `repositories` section as otherwise you will run into\nvery strange errors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funic%2Fcommerce-gradle-plugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funic%2Fcommerce-gradle-plugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funic%2Fcommerce-gradle-plugins/lists"}