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

Enable Caching #44

Merged
merged 5 commits into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ task archiveTemplate(type: Tar) {
exclude "node_modules"
into "asyncapi-template" // npm requires that everything be in a top-level folder
}

// Allow the outputs of this task to be cached
outputs.cacheIf { true }
}

// Add a task to generate java source code for the devices using npx to run
Expand All @@ -59,6 +62,9 @@ task generateDeviceFiles(type: NpxTask) {
// when necessary.
inputs.files(archiveTemplate.outputs)
outputs.dir(outputDir).withPropertyName("outputDir")

// Allow the outputs of this task to be cached
outputs.cacheIf { true }
}

// Include the generated files in the source to compile.
Expand All @@ -71,17 +77,17 @@ task cleanDeviceFiles(type: Delete) {

// Use a version of node and npm that is known to work.
node {
download = true
version = '20.12.2'
npmVersion = '10.5.0'
download = true
version = '20.12.2'
npmVersion = '10.5.0'
}

publishing {
publications {
maven(MavenPublication) {
groupId = 'org.carlmontrobotics'
artifactId = 'WPIWebSockets'
from components.java
publications {
maven(MavenPublication) {
groupId = 'org.carlmontrobotics'
artifactId = 'WPIWebSockets'
from components.java
}
}
}
}
Loading