From eb79b55c0d7113c0e4ac5ae22a1611e3c1afda5a Mon Sep 17 00:00:00 2001 From: Ajmal Kottilingal <90693406+ajmalab@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:45:29 +0100 Subject: [PATCH] Add multi-threading support for custom Gradle tasks (#1231) * add multi-threading support for custom gradle tasks Signed-off-by: Ajmal Kottilingal * remove comment Signed-off-by: Ajmal Kottilingal * generate types, fix linting Signed-off-by: Ajmal Kottilingal * add carriage return to regex Signed-off-by: Ajmal Kottilingal * remove mac storage file Signed-off-by: Ajmal Kottilingal --------- Signed-off-by: Ajmal Kottilingal --- index.js | 10 +- test/gradle-build-env-dep.out | 198 ++++++++++++++++++++++++++++++++++ types/index.d.ts.map | 2 +- types/utils.d.ts | 3 +- types/utils.d.ts.map | 2 +- utils.js | 12 +-- utils.test.js | 39 +++++++ 7 files changed, 253 insertions(+), 13 deletions(-) create mode 100644 test/gradle-build-env-dep.out diff --git a/index.js b/index.js index 1b3aa4211..8608c21df 100644 --- a/index.js +++ b/index.js @@ -1641,8 +1641,10 @@ export async function createJavaBom(path, options) { null, allProjectsStr, ); - const splitPropTaskOut = - splitOutputByGradleProjects(parallelPropTaskOut); + const splitPropTaskOut = splitOutputByGradleProjects( + parallelPropTaskOut, + ["properties"], + ); for (const [key, propTaskOut] of splitPropTaskOut.entries()) { let retMap = {}; @@ -1747,8 +1749,10 @@ export async function createJavaBom(path, options) { const defaultDepTaskArgs = ["--console", "plain", "--build-cache"]; allProjects.push(parentComponent); let depTaskWithArgs = ["dependencies"]; + let relevantTasks = ["dependencies"]; if (process.env.GRADLE_DEPENDENCY_TASK) { depTaskWithArgs = process.env.GRADLE_DEPENDENCY_TASK.split(" "); + relevantTasks = process.env.GRADLE_DEPENDENCY_TASK.split(" "); } let gradleDepArgs = []; gradleDepArgs = gradleDepArgs @@ -1798,7 +1802,7 @@ export async function createJavaBom(path, options) { const cmdOutput = Buffer.from(sstdout).toString(); const perProjectOutput = splitOutputByGradleProjects( cmdOutput, - allProjects, + relevantTasks, ); for (const [key, singleProjectDepOut] of perProjectOutput.entries()) { const sp = allProjects diff --git a/test/gradle-build-env-dep.out b/test/gradle-build-env-dep.out new file mode 100644 index 000000000..de557bcd0 --- /dev/null +++ b/test/gradle-build-env-dep.out @@ -0,0 +1,198 @@ +Starting a Gradle Daemon (subsequent builds will be faster) + +> Task :buildEnvironment + +------------------------------------------------------------ +Root project 'dependency-diff-check' +------------------------------------------------------------ + +classpath +\--- org.cyclonedx.bom:org.cyclonedx.bom.gradle.plugin:1.7.4 + \--- org.cyclonedx:cyclonedx-gradle-plugin:1.7.4 + +--- org.cyclonedx:cyclonedx-core-java:7.3.1 + | +--- commons-codec:commons-codec:1.15 + | +--- commons-io:commons-io:2.11.0 + | +--- org.apache.commons:commons-lang3:3.12.0 + | +--- com.github.package-url:packageurl-java:1.4.1 + | +--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.14.1 + | | +--- com.fasterxml.jackson.core:jackson-core:2.14.1 + | | | \--- com.fasterxml.jackson:jackson-bom:2.14.1 + | | | +--- com.fasterxml.jackson.core:jackson-annotations:2.14.1 (c) + | | | +--- com.fasterxml.jackson.core:jackson-core:2.14.1 (c) + | | | +--- com.fasterxml.jackson.core:jackson-databind:2.14.1 (c) + | | | \--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.14.1 (c) + | | +--- com.fasterxml.jackson.core:jackson-annotations:2.14.1 + | | | \--- com.fasterxml.jackson:jackson-bom:2.14.1 (*) + | | +--- com.fasterxml.jackson.core:jackson-databind:2.14.1 + | | | +--- com.fasterxml.jackson.core:jackson-annotations:2.14.1 (*) + | | | +--- com.fasterxml.jackson.core:jackson-core:2.14.1 (*) + | | | \--- com.fasterxml.jackson:jackson-bom:2.14.1 (*) + | | +--- org.codehaus.woodstox:stax2-api:4.2.1 + | | +--- com.fasterxml.woodstox:woodstox-core:6.4.0 + | | | \--- org.codehaus.woodstox:stax2-api:4.2.1 + | | \--- com.fasterxml.jackson:jackson-bom:2.14.1 (*) + | \--- com.networknt:json-schema-validator:1.0.76 + | +--- com.fasterxml.jackson.core:jackson-databind:2.14.0 -> 2.14.1 (*) + | +--- org.slf4j:slf4j-api:1.7.36 + | +--- org.apache.commons:commons-lang3:3.12.0 + | \--- com.ethlo.time:itu:1.7.0 + +--- commons-codec:commons-codec:1.15 + +--- commons-io:commons-io:2.11.0 + \--- org.apache.maven:maven-core:3.9.0 + +--- org.apache.maven:maven-model:3.9.0 + | \--- org.codehaus.plexus:plexus-utils:3.4.2 + +--- org.apache.maven:maven-settings:3.9.0 + | \--- org.codehaus.plexus:plexus-utils:3.4.2 + +--- org.apache.maven:maven-settings-builder:3.9.0 + | +--- org.apache.maven:maven-builder-support:3.9.0 + | +--- javax.inject:javax.inject:1 + | +--- org.codehaus.plexus:plexus-interpolation:1.26 + | +--- org.codehaus.plexus:plexus-utils:3.4.2 + | +--- org.apache.maven:maven-settings:3.9.0 (*) + | \--- org.codehaus.plexus:plexus-sec-dispatcher:2.0 + | +--- org.codehaus.plexus:plexus-utils:3.4.1 -> 3.4.2 + | +--- org.codehaus.plexus:plexus-cipher:2.0 + | | \--- javax.inject:javax.inject:1 + | \--- javax.inject:javax.inject:1 + +--- org.apache.maven:maven-builder-support:3.9.0 + +--- org.apache.maven:maven-repository-metadata:3.9.0 + | \--- org.codehaus.plexus:plexus-utils:3.4.2 + +--- org.apache.maven:maven-artifact:3.9.0 + | +--- org.codehaus.plexus:plexus-utils:3.4.2 + | \--- org.apache.commons:commons-lang3:3.8.1 -> 3.12.0 + +--- org.apache.maven:maven-plugin-api:3.9.0 + | +--- org.apache.maven:maven-model:3.9.0 (*) + | +--- org.apache.maven:maven-artifact:3.9.0 (*) + | +--- org.eclipse.sisu:org.eclipse.sisu.plexus:0.3.5 + | | +--- javax.annotation:javax.annotation-api:1.2 + | | +--- org.eclipse.sisu:org.eclipse.sisu.inject:0.3.5 + | | +--- org.codehaus.plexus:plexus-component-annotations:1.5.5 -> 2.1.0 + | | +--- org.codehaus.plexus:plexus-classworlds:2.5.2 -> 2.6.0 + | | \--- org.codehaus.plexus:plexus-utils:3.0.24 -> 3.4.2 + | +--- org.codehaus.plexus:plexus-utils:3.4.2 + | \--- org.codehaus.plexus:plexus-classworlds:2.6.0 + +--- org.apache.maven:maven-model-builder:3.9.0 + | +--- org.codehaus.plexus:plexus-utils:3.4.2 + | +--- org.codehaus.plexus:plexus-interpolation:1.26 + | +--- javax.inject:javax.inject:1 + | +--- org.apache.maven:maven-model:3.9.0 (*) + | +--- org.apache.maven:maven-artifact:3.9.0 (*) + | +--- org.apache.maven:maven-builder-support:3.9.0 + | \--- org.eclipse.sisu:org.eclipse.sisu.inject:0.3.5 + +--- org.apache.maven:maven-resolver-provider:3.9.0 + | +--- org.apache.maven:maven-model:3.9.0 (*) + | +--- org.apache.maven:maven-model-builder:3.9.0 (*) + | +--- org.apache.maven:maven-repository-metadata:3.9.0 (*) + | +--- org.apache.maven.resolver:maven-resolver-api:1.9.4 + | +--- org.apache.maven.resolver:maven-resolver-spi:1.9.4 + | | \--- org.apache.maven.resolver:maven-resolver-api:1.9.4 + | +--- org.apache.maven.resolver:maven-resolver-util:1.9.4 + | | \--- org.apache.maven.resolver:maven-resolver-api:1.9.4 + | +--- org.apache.maven.resolver:maven-resolver-impl:1.9.4 + | | +--- org.apache.maven.resolver:maven-resolver-api:1.9.4 + | | +--- org.apache.maven.resolver:maven-resolver-spi:1.9.4 (*) + | | +--- org.apache.maven.resolver:maven-resolver-named-locks:1.9.4 + | | | \--- org.slf4j:slf4j-api:1.7.36 + | | +--- org.apache.maven.resolver:maven-resolver-util:1.9.4 (*) + | | +--- org.apache.commons:commons-lang3:3.12.0 + | | \--- org.slf4j:slf4j-api:1.7.36 + | +--- org.codehaus.plexus:plexus-utils:3.4.2 + | \--- javax.inject:javax.inject:1 + +--- org.apache.maven.resolver:maven-resolver-impl:1.9.4 (*) + +--- org.apache.maven.resolver:maven-resolver-api:1.9.4 + +--- org.apache.maven.resolver:maven-resolver-spi:1.9.4 (*) + +--- org.apache.maven.resolver:maven-resolver-util:1.9.4 (*) + +--- org.apache.maven.shared:maven-shared-utils:3.3.4 + +--- org.eclipse.sisu:org.eclipse.sisu.plexus:0.3.5 (*) + +--- org.eclipse.sisu:org.eclipse.sisu.inject:0.3.5 + +--- com.google.inject:guice:5.1.0 + | +--- javax.inject:javax.inject:1 + | \--- aopalliance:aopalliance:1.0 + +--- com.google.guava:guava:30.1-jre + +--- com.google.guava:failureaccess:1.0.1 + +--- javax.inject:javax.inject:1 + +--- org.codehaus.plexus:plexus-utils:3.4.2 + +--- org.codehaus.plexus:plexus-classworlds:2.6.0 + +--- org.codehaus.plexus:plexus-interpolation:1.26 + +--- org.codehaus.plexus:plexus-component-annotations:2.1.0 + +--- org.apache.commons:commons-lang3:3.8.1 -> 3.12.0 + \--- org.slf4j:slf4j-api:1.7.36 + +(c) - dependency constraint +(*) - dependencies omitted (listed previously) + +A web-based, searchable dependency report is available by adding the --scan option. + +> Task :dependency-diff-check-client-starter:buildEnvironment + +------------------------------------------------------------ +Project ':dependency-diff-check-client-starter' +------------------------------------------------------------ + +classpath ++--- org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1 +| \--- org.springframework.boot:spring-boot-gradle-plugin:3.0.1 +| +--- org.springframework.boot:spring-boot-buildpack-platform:3.0.1 +| | +--- com.fasterxml.jackson.core:jackson-databind:2.14.1 +| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.14.1 +| | | | \--- com.fasterxml.jackson:jackson-bom:2.14.1 +| | | | +--- com.fasterxml.jackson.core:jackson-annotations:2.14.1 (c) +| | | | +--- com.fasterxml.jackson.core:jackson-core:2.14.1 (c) +| | | | +--- com.fasterxml.jackson.core:jackson-databind:2.14.1 (c) +| | | | \--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.14.1 (c) +| | | +--- com.fasterxml.jackson.core:jackson-core:2.14.1 +| | | | \--- com.fasterxml.jackson:jackson-bom:2.14.1 (*) +| | | \--- com.fasterxml.jackson:jackson-bom:2.14.1 (*) +| | +--- com.fasterxml.jackson.module:jackson-module-parameter-names:2.14.1 +| | | +--- com.fasterxml.jackson.core:jackson-core:2.14.1 (*) +| | | +--- com.fasterxml.jackson.core:jackson-databind:2.14.1 (*) +| | | \--- com.fasterxml.jackson:jackson-bom:2.14.1 (*) +| | +--- net.java.dev.jna:jna-platform:5.7.0 +| | | \--- net.java.dev.jna:jna:5.7.0 +| | +--- org.apache.commons:commons-compress:1.21 +| | +--- org.apache.httpcomponents:httpclient:4.5.14 +| | | +--- org.apache.httpcomponents:httpcore:4.4.16 +| | | \--- commons-codec:commons-codec:1.11 +| | +--- org.springframework:spring-core:6.0.3 +| | | \--- org.springframework:spring-jcl:6.0.3 +| | \--- org.tomlj:tomlj:1.0.0 +| | +--- org.antlr:antlr4-runtime:4.7.2 +| | \--- com.google.code.findbugs:jsr305:3.0.2 +| +--- org.springframework.boot:spring-boot-loader-tools:3.0.1 +| | +--- org.apache.commons:commons-compress:1.21 +| | \--- org.springframework:spring-core:6.0.3 (*) +| +--- io.spring.gradle:dependency-management-plugin:1.1.0 +| +--- org.apache.commons:commons-compress:1.21 +| \--- org.springframework:spring-core:6.0.3 (*) +\--- io.spring.dependency-management:io.spring.dependency-management.gradle.plugin:1.1.0 + \--- io.spring.gradle:dependency-management-plugin:1.1.0 + +(c) - dependency constraint +(*) - dependencies omitted (listed previously) + +A web-based, searchable dependency report is available by adding the --scan option. + +> Task :dependency-diff-check-common-core:buildEnvironment + +------------------------------------------------------------ +Project ':dependency-diff-check-common-core' +------------------------------------------------------------ + +classpath +No dependencies + +A web-based, searchable dependency report is available by adding the --scan option. + +> Task :dependency-diff-check-service:buildEnvironment + +------------------------------------------------------------ +Project ':dependency-diff-check-service' +------------------------------------------------------------ + +classpath +No dependencies + +A web-based, searchable dependency report is available by adding the --scan option. + +BUILD SUCCESSFUL in 9s +4 actionable tasks: 4 executed diff --git a/types/index.d.ts.map b/types/index.d.ts.map index f500ee988..89c1c8454 100644 --- a/types/index.d.ts.map +++ b/types/index.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":"AAovBA;;;;;;;;GAQG;AACH,gFAFW,MAAM,SAchB;AAyUD;;;;;;;GAOG;AACH,mCALW,MAAM,qBAiEhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;EAKhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM;;;;EAkBhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAs+BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA2chB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA4WhB;AAED;;;;;GAKG;AACH,kCAHW,MAAM,8BAkUhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAqIhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAiDhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBA+KhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBAsHhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,0CAHW,MAAM,qBAuBhB;AAED;;;;;GAKG;AACH,kCAHW,MAAM,8BAqDhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,8BA4ChB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,qCAHW,MAAM,8BAwFhB;AAED;;;;;GAKG;AACH,iDAHW,MAAM,qBAgUhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBAwJhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAmFhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BAyWhB;AAED;;;;;GAKG;AACH,2CAHW,MAAM;;;;;;;;;;;;;;;;;;;;GAoChB;AAED;;;;;;;;KA+DC;AAED;;;;;;GAMG;AACH,yDA2CC;AAED;;;;;;;;;GASG;AACH,2GA6BC;AAED;;;;;GAKG;AACH,0CAHW,MAAM,8BAubhB;AAED;;;;;GAKG;AACH,iCAHW,MAAM,8BAkUhB;AAED;;;;;GAKG;AACH,gCAHW,MAAM,qBAqOhB;AAED;;;;;;GAMG;AACH,wDAFY,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAAC,CA2FxE"} \ No newline at end of file +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":"AAovBA;;;;;;;;GAQG;AACH,gFAFW,MAAM,SAchB;AAyUD;;;;;;;GAOG;AACH,mCALW,MAAM,qBAiEhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM;;;;EAKhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM;;;;EAkBhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BA0+BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA2chB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BA4WhB;AAED;;;;;GAKG;AACH,kCAHW,MAAM,8BAkUhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAqIhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAiDhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBA+KhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBAsHhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,0CAHW,MAAM,qBAuBhB;AAED;;;;;GAKG;AACH,kCAHW,MAAM,8BAqDhB;AAED;;;;;GAKG;AACH,uCAHW,MAAM,8BA4ChB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,qBA2BhB;AAED;;;;;GAKG;AACH,qCAHW,MAAM,8BAwFhB;AAED;;;;;GAKG;AACH,iDAHW,MAAM,qBAgUhB;AAED;;;;;GAKG;AACH,mCAHW,MAAM,qBAwJhB;AAED;;;;;GAKG;AACH,oCAHW,MAAM,8BAmFhB;AAED;;;;;GAKG;AACH,sCAHW,MAAM,8BAyWhB;AAED;;;;;GAKG;AACH,2CAHW,MAAM;;;;;;;;;;;;;;;;;;;;GAoChB;AAED;;;;;;;;KA+DC;AAED;;;;;;GAMG;AACH,yDA2CC;AAED;;;;;;;;;GASG;AACH,2GA6BC;AAED;;;;;GAKG;AACH,0CAHW,MAAM,8BAubhB;AAED;;;;;GAKG;AACH,iCAHW,MAAM,8BAkUhB;AAED;;;;;GAKG;AACH,gCAHW,MAAM,qBAqOhB;AAED;;;;;;GAMG;AACH,wDAFY,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAAC,CA2FxE"} \ No newline at end of file diff --git a/types/utils.d.ts b/types/utils.d.ts index 4aaa2f949..285a7681f 100644 --- a/types/utils.d.ts +++ b/types/utils.d.ts @@ -989,9 +989,10 @@ export function getGradleCommand(srcPath: string, rootPath: string): string; * Method to split the output produced by Gradle using parallel processing by project * * @param {string} rawOutput Full output produced by Gradle using parallel processing + * @param {string[]} relevantTasks The list of gradle tasks whose output need to be considered. * @returns {map} Map with subProject names as keys and corresponding dependency task outputs as values. */ -export function splitOutputByGradleProjects(rawOutput: string): map; +export function splitOutputByGradleProjects(rawOutput: string, relevantTasks: string[]): map; /** * Method to return the maven command to use. * diff --git a/types/utils.d.ts.map b/types/utils.d.ts.map index 7fdd08b81..ad3784c66 100644 --- a/types/utils.d.ts.map +++ b/types/utils.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../utils.js"],"names":[],"mappings":"AAsSA;;;;;;G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;;;;;;;GAOG;AACH,2CALW,MAAM,kBACN,MAAM,eACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqUhB;AAGD;;;;;EAmBC;AAED;;;;;;GAMG;AACH,kEAHW,MAAM,cACN,MAAM,6BA0IhB;AAED,qDASC;AAED;;;;;;;EA2GC;AAED;;;EA6PC;AAED,sEA6BC;AAED;;;;;;;GAOG;AACH,mCALW,MAAM,WACN,MAAM;;;;;;;EAgQhB;AAED;;;;;;GAMG;AACH,2CAHW,MAAM,OAKhB;AAED,qDA0CC;AA8HD;;;;GAIG;AACH;;;GAkHC;AAED,yEA+FC;AAED;;;;;;GAMG;AACH,mDAkBC;AAED;;;;;;;;;;GAUG;AACH,0DAuBC;AAr1VD,gCAAgF;AAChF,4BAA4C;AAC5C,4BAA6C;AAC7C,2BAAmE;AAsBnE,iCAEE;AAiBF,iCAIyC;AAGzC,gCACmE;AAGnE,gCACsE;AAGtE,8BAA+B;AAK/B,4CAEmE;AAGnE,6CAE6D;AAG7D,oCAEoD;AAGpD,uCAEuD;AAYvD,4BAA6B;AAU7B,8BAAiC;AAMjC,8BAAiC;AAIjC,4BAA6B;AAI7B,2BAA2B;AAI3B,4BAA6B;AAI7B,2BAA2B;AAI3B,6BAA+B;AAI/B,0BAAyB;AAIzB,6BAA+B;AAM/B,2BAA2B;AAK3B,4BAA6B;AAK7B,6BAA+B;AAM/B,kDAWE;AAGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+DE;AAiEF,8BAQG;AAwwIH,8CAUE"} \ No newline at end of file +{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../utils.js"],"names":[],"mappings":"AAsSA;;;;;;GAMG;AACH,mGAkDC;AAgBD;;;;;GAKG;AACH,qCAHW,MAAM,WACN,MAAM,0BAqBhB;AAED;;;;;;GAMG;AACH,+CAJW,MAAM,WACN,MAAM,+BAoBhB;AAYD;;;;GAIG;AACH,gCAFa,MAAM,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AAED;;;;;;GAMG;AACH,kEAHW,MAAM,cACN,MAAM,6BA0IhB;AAED,qDASC;AAED;;;;;;;EA2GC;AAED;;;EA6PC;AAED,sEA6BC;AAED;;;;;;;GAOG;AACH,mCALW,MAAM,WACN,MAAM;;;;;;;EAgQhB;AAED;;;;;;GAMG;AACH,2CAHW,MAAM,OAKhB;AAED,qDA0CC;AA8HD;;;;GAIG;AACH;;;GAkHC;AAED,yEA+FC;AAED;;;;;;GAMG;AACH,mDAkBC;AAED;;;;;;;;;;GAUG;AACH,0DAuBC;AA51VD,gCAAgF;AAChF,4BAA4C;AAC5C,4BAA6C;AAC7C,2BAAmE;AAsBnE,iCAEE;AAiBF,iCAIyC;AAGzC,gCACmE;AAGnE,gCACsE;AAGtE,8BAA+B;AAK/B,4CAEmE;AAGnE,6CAE6D;AAG7D,oCAEoD;AAGpD,uCAEuD;AAYvD,4BAA6B;AAU7B,8BAAiC;AAMjC,8BAAiC;AAIjC,4BAA6B;AAI7B,2BAA2B;AAI3B,4BAA6B;AAI7B,2BAA2B;AAI3B,6BAA+B;AAI/B,0BAAyB;AAIzB,6BAA+B;AAM/B,2BAA2B;AAK3B,4BAA6B;AAK7B,6BAA+B;AAM/B,kDAWE;AAGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+DE;AAiEF,8BAQG;AAwwIH,8CAUE"} \ No newline at end of file diff --git a/utils.js b/utils.js index 797c7131a..809846188 100644 --- a/utils.js +++ b/utils.js @@ -9199,16 +9199,17 @@ export function getGradleCommand(srcPath, rootPath) { * Method to split the output produced by Gradle using parallel processing by project * * @param {string} rawOutput Full output produced by Gradle using parallel processing + * @param {string[]} relevantTasks The list of gradle tasks whose output need to be considered. * @returns {map} Map with subProject names as keys and corresponding dependency task outputs as values. */ -export function splitOutputByGradleProjects(rawOutput) { +export function splitOutputByGradleProjects(rawOutput, relevantTasks) { const outputSplitBySubprojects = new Map(); let subProjectOut = ""; const outSplitByLine = rawOutput.split("\n"); let currentProjectName = ""; - const regexForPropertiesOrDependencies = - /.*:(dependencies|properties)(?=\s|$)/; + const regexPatternForRelevantTasks = `.*:(${relevantTasks.join("|")})(?=\s|\r|$)`; + const regexForRelevantTasks = new RegExp(regexPatternForRelevantTasks); for (const [i, line] of outSplitByLine.entries()) { //filter out everything before first task output if (!line.startsWith("> Task :") && subProjectOut === "") { @@ -9216,10 +9217,7 @@ export function splitOutputByGradleProjects(rawOutput) { } //ignore output of irrelevant tasks - if ( - line.startsWith("> Task :") && - !regexForPropertiesOrDependencies.test(line) - ) { + if (line.startsWith("> Task :") && !regexForRelevantTasks.test(line)) { continue; } diff --git a/utils.test.js b/utils.test.js index 74b3e52d7..70d241acd 100644 --- a/utils.test.js +++ b/utils.test.js @@ -165,8 +165,10 @@ test("splits parallel gradle properties output correctly", () => { "./test/gradle-prop-parallel.out", { encoding: "utf-8" }, ); + const relevantTasks = ["properties"]; const propOutputSplitBySubProject = splitOutputByGradleProjects( parallelGradlePropertiesOutput, + relevantTasks, ); expect(propOutputSplitBySubProject.size).toEqual(4); @@ -195,8 +197,10 @@ test("splits parallel gradle dependencies output correctly", () => { "./test/gradle-dep-parallel.out", { encoding: "utf-8" }, ); + const relevantTasks = ["dependencies"]; const depOutputSplitBySubProject = splitOutputByGradleProjects( parallelGradleDepOutput, + relevantTasks, ); expect(depOutputSplitBySubProject.size).toEqual(4); @@ -218,6 +222,41 @@ test("splits parallel gradle dependencies output correctly", () => { expect(retMap.dependenciesList.length).toEqual(13); }); +test("splits parallel custom gradle task outputs correctly", () => { + const parallelGradleOutputWithOverridenTask = readFileSync( + "./test/gradle-build-env-dep.out", + { encoding: "utf-8" }, + ); + const overridenTasks = ["buildEnvironment"]; + const customDepTaskOuputSplitByProject = splitOutputByGradleProjects( + parallelGradleOutputWithOverridenTask, + overridenTasks, + ); + expect(customDepTaskOuputSplitByProject.size).toEqual(4); + expect(customDepTaskOuputSplitByProject.has("dependency-diff-check")).toBe( + true, + ); + expect( + customDepTaskOuputSplitByProject.has("dependency-diff-check-service"), + ).toBe(true); + expect( + customDepTaskOuputSplitByProject.has("dependency-diff-check-common-core"), + ).toBe(true); + expect( + customDepTaskOuputSplitByProject.has( + "dependency-diff-check-client-starter", + ), + ).toBe(true); + + const retMap = parseGradleDep( + customDepTaskOuputSplitByProject.get( + "dependency-diff-check-client-starter", + ), + ); + expect(retMap.pkgList.length).toEqual(22); + expect(retMap.dependenciesList.length).toEqual(23); +}); + test("parse gradle dependencies", () => { expect(parseGradleDep(null)).toEqual({}); let parsedList = parseGradleDep(