{"id":19656673,"url":"https://github.com/daggerok/heroku-gradle-buildpack-example","last_synced_at":"2026-05-14T17:33:21.467Z","repository":{"id":151041747,"uuid":"136988042","full_name":"daggerok/heroku-gradle-buildpack-example","owner":"daggerok","description":"Heroku gradle buildpack example.","archived":false,"fork":false,"pushed_at":"2018-06-11T23:05:40.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-27T02:23:35.184Z","etag":null,"topics":["buildpack","gradle","heroku","heroku-buildpack","herokuapp"],"latest_commit_sha":null,"homepage":"https://daggerok.github.io/heroku-gradle-buildpack-example","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daggerok.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-11T22:33:38.000Z","updated_at":"2018-06-11T23:08:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"50e2d355-3693-4c15-9928-e395b878870b","html_url":"https://github.com/daggerok/heroku-gradle-buildpack-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daggerok/heroku-gradle-buildpack-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fheroku-gradle-buildpack-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fheroku-gradle-buildpack-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fheroku-gradle-buildpack-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fheroku-gradle-buildpack-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daggerok","download_url":"https://codeload.github.com/daggerok/heroku-gradle-buildpack-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daggerok%2Fheroku-gradle-buildpack-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33035709,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buildpack","gradle","heroku","heroku-buildpack","herokuapp"],"created_at":"2024-11-11T15:28:35.278Z","updated_at":"2026-05-14T17:33:21.451Z","avatar_url":"https://github.com/daggerok.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= heroku-gradle-buildpack-example image:https://travis-ci.org/daggerok/heroku-gradle-buildpack-example.svg?branch=master[\"Build Status\", link=\"https://travis-ci.org/daggerok/heroku-gradle-buildpack-example\"] image:https://gitlab.com/daggerok/heroku-gradle-buildpack-example/badges/master/build.svg[\"Build Status\", link=\"https://gitlab.com/daggerok/heroku-gradle-buildpack-example/-/jobs\"]\n\n//tag::content[]\n== migrate from maven to gradle (heroku only)\n\n.install heroku cli, register (if has no account) and login\n[source,bash]\n----\nbrew install heroku\nheroku login\n----\n\n.clone my heroku maven (java buildpack) example project which has already ptrepared gradle stuff\n[source,yml]\n----\ngit clone https://github.com/daggerok/heroku-java-buildpack-example.git\nrm -rf .git .mvn mvnw* pom.xml heroku.yml\n----\n\n.add requred heroku-gradle setup\n[source,yml]\n----\necho \"task stage(dependsOn: 'build')\" \u003e\u003e build.gradle\n----\n\n.create heroku app and deploy to it with development profile\n[source,yml]\n----\ngit init .\nheroku create daggerok-gradle-buildpack\n\necho \"web: SPRING_PROFILES_ACTIVE=dev ./build/libs/*.jar\" \u003e Procfile\ngit add .\ngit commit -am \"First blood!\"\ngit push heroku master\n\nheroku logs -t\n# find output: The following profiles are active: dev,spring-boot,data-jpa\n----\n\nkey points here (if you just create app from scratch):\n\n- you need prepare gradle `stage` task for build\n\n  echo \"task stage(dependsOn: 'build')\" \u003e\u003e build.gradle\n\n- you need prepare Procfile with bash application startup command (in out case it's: `./build/libs/*.jar`)\n\n  echo \"web: SPRING_PROFILES_ACTIVE=dev ./build/libs/*.jar\" \u003e Procfile\n\n- you need install gradle wrapper in your project\n\n  gradle wrapper\n  git add -f gradle*\n  git commit -am \"Add gradle wrapper\"\n\n== going production\n\n.for production (heroku) version add postgres database\n[source,bash]\n----\nheroku addons:create heroku-postgresql:hobby-dev\n----\n\n.now let's configure correct heroku URL and switch spring-boot app to production prpofile which is using postgres database:\n[source,bash]\n----\necho \"web: SPRING_PROFILES_ACTIVE=prod APP_BASE_URL=https://daggerok-gradle-buildpack.herokuapp.com ./build/libs/*.jar\" \u003e Procfile\ngit add .\ngit commit -am \"Setup right heroku application environment variables\"\ngit push heroku master\n----\n\n.just FYI\n[source,bash]\n----\nheroku git:remote -a daggerok-gradle-buildpack\ngit remote -v\n# skip others...\nheroku  https://git.heroku.com/daggerok-gradle-buildpack.git (fetch)\nheroku  https://git.heroku.com/daggerok-gradle-buildpack.git (push)\n----\n\nlink:\n\n- link:https://devcenter.heroku.com/articles/getting-started-with-gradle-on-heroku#deploy-the-app[Getting Started with Gradle on Heroku]\n- link:https://devcenter.heroku.com/articles/deploying-gradle-apps-on-heroku[Heroku Gradle documentation]\n- link:https://github.com/heroku/heroku-buildpack-gradle[heroku buildpack gradle]\n- link:https://github.com/heroku/gradle-getting-started[Gradle heroku buildpack example project]\n\ngenerated by link:https://github.com/daggerok/generator-jvm/[generator-jvm] yeoman generator (java-spring-boot)\n//end::content[]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fheroku-gradle-buildpack-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaggerok%2Fheroku-gradle-buildpack-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaggerok%2Fheroku-gradle-buildpack-example/lists"}