Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
add support to versions below 7.5.0 by parsing properties output for …
Browse files Browse the repository at this point in the history
…a single property in javascript
  • Loading branch information
mikepenz authored Jul 14, 2023
1 parent d30d8e8 commit 6f0c1b2
Show file tree
Hide file tree
Showing 12 changed files with 1,450 additions and 1,405 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ The following example showcases a gradle module in the root, without a module na
| `include-build-environment` | Optional mode to enable the submission of the `buildEnvironment` as individual Manifest via the dependency submission API. Default: `false`. |
| `fail-on-error` | Optional setting to enable an action failure in case any of the dependencies can not be parsed. Default: `false`. |
| `correlator` | 'Optional correlator string to submit to GitHub to identify the dependency submission. Defaults to generating based on gradle-build-module and gradle-build-configuration.' |
| `legacy-support` | 'Disabled by default. Optional setting to enable support for gradle versions below 7.5. Warning: When enabled, the action will retrieve all properties and retrieve the property value of interest. During the parsing this may include other properties. Prefer to upgrade to gradle 7.5 or newer instead!' |

| **sub-module-mode** | **Description** |
| ----- | ---- |
Expand Down
263 changes: 131 additions & 132 deletions __tests__/expected_dependency_results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4624,120 +4624,119 @@ export const GRADLE_EXAMPLE_DEPENDENCY_OUTPUT = [
export const GRADLE_EXAMPLE_DEPENDENCY_OUTPUT_UNRESOLVED = [
[
{
type: "maven",
name: "kotlin-stdlib-jdk8",
namespace: "org.jetbrains.kotlin",
version: "1.6.10",
type: 'maven',
name: 'kotlin-stdlib-jdk8',
namespace: 'org.jetbrains.kotlin',
version: '1.6.10',
qualifiers: null,
subpath: null,
subpath: null
},
{
type: "maven",
name: "kotlin-stdlib",
namespace: "org.jetbrains.kotlin",
version: "1.6.10",
type: 'maven',
name: 'kotlin-stdlib',
namespace: 'org.jetbrains.kotlin',
version: '1.6.10',
qualifiers: null,
subpath: null,
},
subpath: null
}
],
[
{
type: "maven",
name: "kotlin-stdlib",
namespace: "org.jetbrains.kotlin",
version: "1.6.10",
type: 'maven',
name: 'kotlin-stdlib',
namespace: 'org.jetbrains.kotlin',
version: '1.6.10',
qualifiers: null,
subpath: null,
subpath: null
},
{
type: "maven",
name: "annotations",
namespace: "org.jetbrains",
version: "13.0",
type: 'maven',
name: 'annotations',
namespace: 'org.jetbrains',
version: '13.0',
qualifiers: null,
subpath: null,
},
subpath: null
}
],
[
{
type: "maven",
name: "kotlin-stdlib",
namespace: "org.jetbrains.kotlin",
version: "1.6.10",
type: 'maven',
name: 'kotlin-stdlib',
namespace: 'org.jetbrains.kotlin',
version: '1.6.10',
qualifiers: null,
subpath: null,
subpath: null
},
{
type: "maven",
name: "lombok",
namespace: "org.projectlombok",
version: "",
type: 'maven',
name: 'lombok',
namespace: 'org.projectlombok',
version: '',
qualifiers: null,
subpath: null,
},
subpath: null
}
],
[
{
type: "maven",
name: "kotlin-stdlib-jdk8",
namespace: "org.jetbrains.kotlin",
version: "1.6.10",
type: 'maven',
name: 'kotlin-stdlib-jdk8',
namespace: 'org.jetbrains.kotlin',
version: '1.6.10',
qualifiers: null,
subpath: null,
subpath: null
},
undefined,
],
undefined
]
]


export const GRADLE_EXAMPLE_DEPENDENCY_OUTPUT_UNSPECIFIED = [
[
{
type: "maven",
name: "kotlin-stdlib-jdk8",
namespace: "org.jetbrains.kotlin",
version: "1.6.10",
type: 'maven',
name: 'kotlin-stdlib-jdk8',
namespace: 'org.jetbrains.kotlin',
version: '1.6.10',
qualifiers: null,
subpath: null,
subpath: null
},
{
type: "maven",
name: "kotlin-stdlib",
namespace: "org.jetbrains.kotlin",
version: "1.6.10",
type: 'maven',
name: 'kotlin-stdlib',
namespace: 'org.jetbrains.kotlin',
version: '1.6.10',
qualifiers: null,
subpath: null,
},
subpath: null
}
],
[
{
type: "maven",
name: "kotlin-stdlib",
namespace: "org.jetbrains.kotlin",
version: "1.6.10",
type: 'maven',
name: 'kotlin-stdlib',
namespace: 'org.jetbrains.kotlin',
version: '1.6.10',
qualifiers: null,
subpath: null,
subpath: null
},
{
type: "maven",
name: "annotations",
namespace: "org.jetbrains",
version: "13.0",
type: 'maven',
name: 'annotations',
namespace: 'org.jetbrains',
version: '13.0',
qualifiers: null,
subpath: null,
},
subpath: null
}
],
[
{
type: "maven",
name: "kotlin-stdlib-jdk8",
namespace: "org.jetbrains.kotlin",
version: "1.6.10",
type: 'maven',
name: 'kotlin-stdlib-jdk8',
namespace: 'org.jetbrains.kotlin',
version: '1.6.10',
qualifiers: null,
subpath: null,
subpath: null
},
undefined,
],
undefined
]
]

export const GRADLE_EXAMPLE_DEPENDENCY_OUTPUT_SPRING = [
Expand Down Expand Up @@ -5439,88 +5438,88 @@ export const GRADLE_EXAMPLE_DEPENDENCY_WITH_SUB_PROJECTS_OUTPUT = {
}

export const GRADLE_EXAMPLE_NESTED_MULTI_MODULE_PROJECT = {
"childProjects": [
childProjects: [
{
"childProjects": [],
"dependencyPath": undefined,
"name": ":common:hello",
"packages": [
childProjects: [],
dependencyPath: undefined,
name: ':common:hello',
packages: [
[
{
"name": "kotlin-stdlib-jdk8",
"namespace": "org.jetbrains.kotlin",
"qualifiers": null,
"subpath": null,
"type": "maven",
"version": "1.8.0",
name: 'kotlin-stdlib-jdk8',
namespace: 'org.jetbrains.kotlin',
qualifiers: null,
subpath: null,
type: 'maven',
version: '1.8.0'
},
undefined,
],
],
undefined
]
]
},
{
"childProjects": [],
"dependencyPath": undefined,
"name": ":common:hello",
"packages": [
childProjects: [],
dependencyPath: undefined,
name: ':common:hello',
packages: [
[
{
"name": "kotlin-stdlib-jdk8",
"namespace": "org.jetbrains.kotlin",
"qualifiers": null,
"subpath": null,
"type": "maven",
"version": "1.8.0",
name: 'kotlin-stdlib-jdk8',
namespace: 'org.jetbrains.kotlin',
qualifiers: null,
subpath: null,
type: 'maven',
version: '1.8.0'
},
undefined,
],
],
},
undefined
]
]
}
],
"dependencyPath": undefined,
"name": "test",
"packages": [
dependencyPath: undefined,
name: 'test',
packages: [
[
{
"name": "kotlin-stdlib-jdk8",
"namespace": "org.jetbrains.kotlin",
"qualifiers": null,
"subpath": null,
"type": "maven",
"version": "1.8.0",
name: 'kotlin-stdlib-jdk8',
namespace: 'org.jetbrains.kotlin',
qualifiers: null,
subpath: null,
type: 'maven',
version: '1.8.0'
},
undefined,
undefined
],
[
{
"name": "kotlin-stdlib-jdk8",
"namespace": "org.jetbrains.kotlin",
"qualifiers": null,
"subpath": null,
"type": "maven",
"version": "1.8.0",
name: 'kotlin-stdlib-jdk8',
namespace: 'org.jetbrains.kotlin',
qualifiers: null,
subpath: null,
type: 'maven',
version: '1.8.0'
},
undefined,
],
undefined
]
],
"projectRegistry": [
projectRegistry: [
{
"childProjects": [],
"dependencyPath": undefined,
"name": ":common:hello",
"packages": [
childProjects: [],
dependencyPath: undefined,
name: ':common:hello',
packages: [
[
{
"name": "kotlin-stdlib-jdk8",
"namespace": "org.jetbrains.kotlin",
"qualifiers": null,
"subpath": null,
"type": "maven",
"version": "1.8.0",
name: 'kotlin-stdlib-jdk8',
namespace: 'org.jetbrains.kotlin',
qualifiers: null,
subpath: null,
type: 'maven',
version: '1.8.0'
},
undefined,
],
],
},
],
undefined
]
]
}
]
}
Loading

0 comments on commit 6f0c1b2

Please sign in to comment.