Skip to content

Commit

Permalink
fix(gradle): only allow certain types of task to be cached (nrwl#22559)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi authored and FrozenPandaz committed Mar 28, 2024
1 parent 71a0b0d commit 30cc8c3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 26 deletions.
File renamed without changes.
23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/2-feature.md

This file was deleted.

7 changes: 5 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ contact_links:
- name: Read the community guidelines
about: "Please make sure you have read the submission guidelines before posting an issue"
url: https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-an-issue
- name: Want to start a discussion?
about: "Want to start a thread to discuss an idea? Use the discussions feature provided by GitHub."
- name: \U0001F680 Feature Request
about: "Suggest a new feature to make Nx better"
url: https://github.com/nrwl/nx/discussions/new?category=feature-requests
- name: Start a Discussion
about: "Start a discussion to share your experience with Nx, "
url: https://github.com/nrwl/nx/discussions
- name: Have a question?
url: https://go.nx.dev/community
Expand Down
3 changes: 2 additions & 1 deletion packages/gradle/src/plugin/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { projectGraphCacheDirectory } from 'nx/src/utils/cache-directory';
import { getGradleBinaryPath } from '../utils/exec-gradle';
import { getGradleReport } from '../utils/get-gradle-report';

const cacheableTaskType = new Set(['Build', 'Verification']);
const dependsOnMap = {
build: ['^build', 'classes'],
test: ['classes'],
Expand Down Expand Up @@ -184,7 +185,7 @@ function createGradleTargets(
options: {
cwd: projectRoot,
},
cache: !!outputs,
cache: cacheableTaskType.has(task.type),
inputs: inputsMap[task.name],
outputs: outputs ? [outputs] : undefined,
dependsOn: dependsOnMap[task.name],
Expand Down

0 comments on commit 30cc8c3

Please sign in to comment.