GithubHelp home page GithubHelp logo

Comments (5)

ldaley avatar ldaley commented on July 30, 2024

@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.

cbeams avatar cbeams commented on July 30, 2024

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.

jkutner avatar jkutner commented on July 30, 2024

@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.

cbeams avatar cbeams commented on July 30, 2024

@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.

jkutner avatar jkutner commented on July 30, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.