gradle使用指南

本文记录一下gradle的使用指南:

参考资料:

  1. Spring Boot Gradle Plugin Reference Guide
  2. BootBuildImage (Spring Boot Gradle Plugin 2.7.0 API)
  3. Spring Boot Gradle Plugin Reference Guide

build.gradle中plugin使用本地文件

参考资料:

  1. java - using gradle plugin from flatDir source - Stack Overflow
  2. Declaring repositories
  3. java - Adding local plugin to a Gradle project - Stack Overflow
  4. maven - How to make Gradle repository point to local directory - Stack Overflow
  5. Declaring repositories

spring-cloud-bindings无法下载

根据以下参考资料6,spring-cloud-bindings已从repo.spring.io迁移至Maven Central。
根据参考资料7,可以在plugins中指定:

implementation group: 'org.springframework.cloud', name: 'spring-cloud-bindings', version: '1.11.0'

参考资料:

  1. Image building fails when downloading spring-cloud-bindings · Issue #33699 · spring-projects/spring-boot · GitHub
  2. spring-cloud-bindings download returning 404 when running spring buildpack · Issue #225 · paketo-buildpacks/spring-boot · GitHub
  3. Notice of Permissions Changes to repo.spring.io, January 2023
  4. Image building fails when downloading spring-cloud-bindings · Issue #33699 · spring-projects/spring-boot · GitHub
  5. Builds failing as spring-cloud-bindings not accessible from repo.spring.io · Issue #304 · paketo-buildpacks/spring-boot · GitHub
  6. Publish to Maven Central · Issue #71 · spring-cloud/spring-cloud-bindings · GitHub
  7. Maven Central: org.springframework.cloud:spring-cloud-bindings:1.11.0
  8. Release Notes for Paketo Spring Boot Buildpack