-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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(gradle): gradle atomizer #26663
feat(gradle): gradle atomizer #26663
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
☁️ Nx Cloud ReportCI is running/has finished running commands for commit a6484f9. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 6 targets
Sent with 💌 from NxCloud. |
b0d072c
to
165ea74
Compare
165ea74
to
4e71af1
Compare
4e71af1
to
985e712
Compare
985e712
to
9ae5588
Compare
9ae5588
to
289bbba
Compare
289bbba
to
b9ad060
Compare
b9ad060
to
0357401
Compare
22f5a04
to
192d5cb
Compare
192d5cb
to
9438420
Compare
9438420
to
a6484f9
Compare
@@ -58,6 +58,7 @@ function addPlugin(tree: Tree) { | |||
plugin: '@nx/gradle', | |||
options: { | |||
testTargetName: 'test', | |||
ciTargetName: 'test-ci', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't do this yet. It can be enabled manually for now.
packages/gradle/src/plugin/nodes.ts
Outdated
testTargetName?: string; | ||
classesTargetName?: string; | ||
buildTargetName?: string; | ||
[taskTargetName: string]: string | undefined; | ||
} | ||
|
||
function normalizeOptions(options: GradlePluginOptions): GradlePluginOptions { | ||
options ??= {}; | ||
options.ciTargetName ??= 'test-ci'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't set this by default. It should be the same as jest
where we don't set it by default, but people can update their nx.json
manually.
packages/gradle/src/plugin/nodes.ts
Outdated
const inputsMap = createInputsMap(context); | ||
|
||
const targets: Record<string, TargetConfiguration> = {}; | ||
const targetGroups: Record<string, string[]> = {}; | ||
for (const task of tasks) { | ||
const targetName = options?.[`${task.name}TargetName`] ?? task.name; | ||
|
||
const outputs = outputDirs.get(task.name); | ||
if (task.name === 'test') { | ||
const testFiles = await globWithWorkspaceContext( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this inside getTestTargets
packages/gradle/src/plugin/nodes.ts
Outdated
} | ||
targetGroups[taskType].push(testTargetName); | ||
|
||
if (!testFiles || testFiles.length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need a check for if they have ciTargetName
. If not, don't glob and don't add targets. If yes, glob and add targets.
packages/gradle/src/plugin/nodes.ts
Outdated
dependsOn: dependsOnMap['test'], | ||
metadata: { | ||
technologies: ['gradle'], | ||
description: `Runs Gradle Tests ${testName} in CI`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: `Runs Gradle Tests ${testName} in CI`, | |
description: `Runs tests for the ${testName} class`, |
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Expected Behavior
Related Issue(s)
Fixes #