{"id":23885778,"url":"https://github.com/spasam/spring-boot-build-info","last_synced_at":"2025-04-10T01:23:49.913Z","repository":{"id":37900820,"uuid":"175905530","full_name":"spasam/spring-boot-build-info","owner":"spasam","description":"Gradle plugin to generate build information that can be consumed by Spring Boot Actuator Info","archived":false,"fork":false,"pushed_at":"2022-11-11T11:21:45.000Z","size":65,"stargazers_count":3,"open_issues_count":3,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T03:05:04.498Z","etag":null,"topics":["actuator","build-info","gradle","plugin","spring-boot"],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spasam.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2019-03-15T23:51:10.000Z","updated_at":"2022-06-14T16:27:01.000Z","dependencies_parsed_at":"2023-01-20T23:16:55.970Z","dependency_job_id":null,"html_url":"https://github.com/spasam/spring-boot-build-info","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spasam%2Fspring-boot-build-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spasam%2Fspring-boot-build-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spasam%2Fspring-boot-build-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spasam%2Fspring-boot-build-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spasam","download_url":"https://codeload.github.com/spasam/spring-boot-build-info/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248138747,"owners_count":21053941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["actuator","build-info","gradle","plugin","spring-boot"],"created_at":"2025-01-04T05:54:01.326Z","updated_at":"2025-04-10T01:23:49.888Z","avatar_url":"https://github.com/spasam.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Build Info generator Gradle plugin for Spring Boot Actuator\n\nThis gradle plugin generates properties file(s) that can be consumed by [Spring Boot Actuator Info endpoint](https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-endpoints.html#production-ready-application-info)\n\n-----\n[![Plugin](https://img.shields.io/badge/Gradle%20Plugin-latest-green.svg)](https://plugins.gradle.org/plugin/com.pasam.gradle.buildinfo)\n[![Build Status](https://travis-ci.org/spasam/spring-boot-build-info.svg?branch=master)](https://travis-ci.org/spasam/spring-boot-build-info)\n-----\n\n## Prerequisites\n\n`Java` and `Spring Boot` gradle plugins are expected to be present in `build.gradle`. Example:\n\n```groovy\nplugins {\n  ...\n  id 'java'\n  id 'org.springframework.boot' version '2.1.3.RELEASE'\n  ...\n}\n```\n\n## Usage\n\nAdd the following in your `build.gradle plugins` section:\n\n```groovy\nplugins {\n  ...\n  id 'com.pasam.gradle.buildinfo' version '0.1.3'\n  ...\n}\n```\n\n## Properties\n\nThis gradle plugin depends on [gradle-git-properties](https://github.com/n0mer/gradle-git-properties) plugin version `2.0.0`. There is no explicit need to depend on `gradle-git-properties` in your project. `git.properties` generated by `gradle-git-properties` contains extensive information about the state of SCM at the time of the build. See output below.\n\nThis gradle plugin generates `build-info.properties` that includes the following information:\n\n### Project specific properties from build.gradle\n* artifact\n* name\n* group\n* version\n* time (build date/time)\n* source-compatibility\n* target-compatibility\n\n### JVM system properties:\n* user.name\n* java.vendor\n* java.version\n* os.arch\n* os.name\n* os.version\n\n### Environment variables:\n* BUILD_URL (only if set. Useful when running builds on Jenkins)\n\n### Runtime dependencies (jars)\n\n## Output\n\nDuring the build, `git.properties` will be generated in build resources directory. `git.properties` should look like:\n\n```properties\ngit.branch=master\ngit.build.host=my-host\ngit.build.time=2019-03-17T18\\:25\\:23-0400\ngit.build.user.email=email@example.com\ngit.build.user.name=Seshu Pasam\ngit.build.version=unspecified\ngit.closest.tag.commit.count=\ngit.closest.tag.name=\ngit.commit.id=2f4f4f52af30ea10d4dbfe0489aad924a0a86009\ngit.commit.id.abbrev=2f4f4f5\ngit.commit.id.describe=\ngit.commit.message.full=Commit message full\ngit.commit.message.short=Commit message short\ngit.commit.time=2019-03-13T11\\:45\\:48-0400\ngit.commit.user.email=email@users.noreply.github.com\ngit.commit.user.name=Seshu Pasam\ngit.dirty=true\ngit.remote.origin.url=git@github.com\\:spasam/spring-boot-build-info\ngit.tags=1.29.0\ngit.total.commit.count=25\n```\n\n`build-info.properties` file will also be generated in build resources META-INF directory. Contents of this properties file should look like:\n\n```properties\nbuild.artifact = spring-boot-build-info\nbuild.name = spring-boot-build-info\nbuild.group = com.pasam\nbuild.version = 0.1.2\nbuild.time = 2019-03-17T22:42:50.131910Z\nbuild.source-compatibility = 11\nbuild.target-compatibility = 11\nbuild.user-name = spasam\nbuild.java-vendor = Oracle Corporation\nbuild.java-version = 11.0.1\nbuild.os-arch = x86_64\nbuild.os-name = Mac OS X\nbuild.os-version = 10.14.3\nbuild.dependencies.spring-boot = 2.1.3.RELEASE\nbuild.dependencies.activation = 1.1\n...\n```\n\nWith Spring Boot actuator enabled, actuator should serve up `git` and `build-info` properties as JSON. Accessing `\u003chost\u003e:\u003cmgmg-port\u003e/\u003cactuator-info-endpoint\u003e` should dump JSON similar to:\n\n```json\n{\n  \"git\": {\n    \"branch\": \"master\",\n    \"build\": {\n      \"time\": \"2019-03-17T23:29:20Z\",\n      \"version\": \"0.1.2\",\n      \"user\": {\n        \"name\": \"Seshu Pasam\",\n        \"email\": \"email@example.com\"\n      },\n      \"host\": \"my-host\"\n    },\n    \"commit\": {\n      \"time\": \"2019-03-15T22:32:25Z\",\n      \"message\": {\n        \"full\": \"Commit message full\",\n        \"short\": \"Commit message fshort\"\n      },\n      \"id\": {\n        \"describe\": \"\",\n        \"abbrev\": \"14b1431\",\n        \"full\": \"14b1431cfee81908c1ca70bda79b9e28625cfbd2\"\n      },\n      \"user\": {\n        \"email\": \"email@example.com\",\n        \"name\": \"Seshu Pasam\"\n      }\n    },\n    \"dirty\": \"true\",\n    \"tags\": \"1.30.0-rc6,1.30.0-rc7\",\n    \"total\": {\n      \"commit\": {\n        \"count\": \"28\"\n      }\n    },\n    \"closest\": {\n      \"tag\": {\n        \"commit\": {\n          \"count\": \"\"\n        },\n        \"name\": \"\"\n      }\n    },\n    \"remote\": {\n      \"origin\": {\n        \"url\": \"git@github.com:spasam/spring-boot-build-info\"\n      }\n    }\n  },\n  \"build\": {\n    \"dependencies\": {\n      \"spring-boot\": \"2.1.3.RELEASE\",\n      \"activation\": \"1.1\"\n    },\n    \"os-arch\": \"x86_64\",\n    \"version\": \"0.1.2\",\n    \"user-name\": \"spasam\",\n    \"os-name\": \"Mac OS X\",\n    \"source-compatibility\": \"11\",\n    \"java-vendor\": \"Oracle Corporation\",\n    \"name\": \"spring-boot-build-info\",\n    \"time\": \"2019-03-17T23:29:19.531Z\",\n    \"artifact\": \"spring-boot-build-info\",\n    \"group\": \"com.pasam\",\n    \"java-version\": \"11.0.1\",\n    \"target-compatibility\": \"11\",\n    \"os-version\": \"10.14.3\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspasam%2Fspring-boot-build-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspasam%2Fspring-boot-build-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspasam%2Fspring-boot-build-info/lists"}