Comments (5)
@naaman a better approach would be to get those plugins to support specifying the locations of caches for these tools, and then to use gradle.gradleUserHomeDir
as the cache dir because this is persistent on Heroku.
from heroku-buildpack-gradle.
Looks like the nodejs buildpack just started supporting user-defined cache directories with heroku/heroku-buildpack-nodejs#203. They're doing this via a custom cache_directories
attribute in package.json
, which seems reasonable to me. I want to cache not only node_modules
, but also the libraries pulled in by Bower. In my application these are written to src/main/webapp/lib
, i.e. it's not an option to write these files to gradle.gradleUserHomeDir
or elsewhere, because these files are actually going to be served by the application.
from heroku-buildpack-gradle.
@cbeams are you using the Node.js buildpack in conjunction with this buildpack (such as with buildpack-multi or heroku buildpacks:add
)?
Could the artifacts be cached in gradle.gradleUserHomeDir
and copied to the webapp location during the build?
from heroku-buildpack-gradle.
@jkutner I am not currently using buildpack-multi. I've done so before, and it's proved more hassle than it's worth. I'm using the normal grade buildpack in conjunction with https://github.com/srs/gradle-node-plugin, and this works well—save for the lack of caching of node_modules, bower_components, etc.
from heroku-buildpack-gradle.
@cbeams I created a branch for this. Can you test it out to make sure it does what you expect? You can use it by running:
$ heroku buildpacks:set https://github.com/heroku/heroku-buildpack-gradle#node-modules-cache
By default it should cache node_modules
and bower_components
. But you can override this to add others by running:
$ heroku config:set BUILD_CACHED_DIRS="node_modules bower_components other_dir"
from heroku-buildpack-gradle.
Related Issues (20)
- Add support for detecting gradle kotlin dsl files HOT 5
- Update gradle distribution to latest 1.10 HOT 3
- Invalid add-on specification. Buildpacks must inform addons as a string. HOT 1
- Require gradle wrapper and use `gradlew` script as detection hueristic HOT 3
- Build pack should use $CACHE_DIR/.gradle as GRADLE_USER_HOME HOT 1
- Allow custom task to be used to build HOT 1
- License? HOT 1
- Files missing from build HOT 1
- ./gradlew stage doesnt work unless pushing to heroku HEAD:master HOT 3
- Constant R14 Memory Quota Exceeded with basic Spring Boot application HOT 6
- Cache project-level cache between builds HOT 4
- Allow caching arbitrary directories during build HOT 6
- Couldn't follow symbolic link on each deploy HOT 1
- Spring Boot detection fails for several cases HOT 2
- Heroku CI slow builds HOT 6
- ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. HOT 1
- About specifying java version
- heroku CI: compilation during "test setup" and "test" fase HOT 8
- Add java-agent to /app/.java-agent HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from heroku-buildpack-gradle.