Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for exporting raw dependencies #973

Merged
merged 3 commits into from
Feb 17, 2023

Conversation

hvvikram
Copy link
Collaborator

@hvvikram hvvikram commented Feb 16, 2023

Description: Add support for exporting raw dependencies

plugin can accept the following configuration

{
     okbuck {
            ...
           exportDependencies { enabled = false, file = ".okbuck/raw-deps" }
           ...
}

Supports exporting raw dependencies in JSON format.

./gradlew okbuck

Example exported json snippet:

[
  {
    "name": "hadoop-aws",
    "version": "2.8.2",
    "group": "org.apache.hadoop",
    "force": false,
    "excludeRules": [
      "javax.servlet",
      "org.mortbay.jetty",
      "slf4j-log4j12"
    ],
    "transitive": true
  },
 
  ....
]

Related issue(s):

@CLAassistant
Copy link

CLAassistant commented Feb 16, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@raviagarwal7 raviagarwal7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we reformat the added/modified files with google-java-formatter

plugin can accept two project parameters
* exportDependencies: to enable exporting of raw dependencies
* exportDependenciesFile: Name with optional relative path from the root of the project where the dependencies will be exported ( default: .okbuck/raw-deps )

Supports exporting raw dependencies in JSON format.

```
./gradlew okbuck -PexportDependencies=true -PexportDependenciesFile=.okbuck/raw-deps.json
```
* Ran google formatter
* Autoclose BufferedWriter to flush the contents and close
@hvvikram hvvikram merged commit c0bb2b6 into uber:master Feb 17, 2023
@hvvikram hvvikram deleted the export-raw-deps branch February 17, 2023 01:32
vicmns pushed a commit to vicmns/okbuck that referenced this pull request May 31, 2023
* feat: Add support for exporting raw dependencies

plugin can accept two project parameters
* exportDependencies: to enable exporting of raw dependencies
* exportDependenciesFile: Name with optional relative path from the root of the project where the dependencies will be exported ( default: .okbuck/raw-deps )

Supports exporting raw dependencies in JSON format.

```
./gradlew okbuck -PexportDependencies=true -PexportDependenciesFile=.okbuck/raw-deps.json
```

* Moved configurations to OKBuckExtension and handle excludeRule to use group:module when both are not blank

* * Addressed review comments
* Ran google formatter
* Autoclose BufferedWriter to flush the contents and close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants