Skip to content

Commit

Permalink
Merge pull request #44 from DeepBlueRobotics/enable-caching
Browse files Browse the repository at this point in the history
Enable Caching
  • Loading branch information
CoolSpy3 committed May 29, 2024
2 parents c042b52 + 16f9c8c commit fe36fbd
Showing 1 changed file with 15 additions and 9 deletions.
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
}
}
}
}

0 comments on commit fe36fbd

Please sign in to comment.