How to build import spring plugins

i try create spring plugin in buildSrc like this

plugins {
    java
    id("org.springframework.boot") version ("2.2.3.RELEASE") apply false
//    id("io.spring.dependency-management") version ("1.0.10.RELEASE") apply false
}

repositories {
    mavenCentral()
}

dependencies {

    compileOnly("org.projectlombok:lombok")
    annotationProcessor("org.projectlombok:lombok")

    testCompileOnly("org.projectlombok:lombok")
    testAnnotationProcessor("org.projectlombok:lombok")

     guava
    implementation("com.google.guava:guava")
}

i import spring to manage my dependency version, but i get error

* What went wrong:
Invalid plugin request [id: 'org.springframework.boot', version: '2.2.3.RELEASE', apply: false]. Plugin requests from precompiled scripts must not include a version number. Please remove the version from the offending request and make sure the module containing the requested plugin 'org.springframework.boot' is an implementation dependency of project ':buildSrc'.
Invalid plugin request [id: 'io.spring.dependency-management', version: '1.0.10.RELEASE', apply: false]. Plugin requests from precompiled scripts must not include a version number. Please remove the version from the offending request and make sure the module containing the requested plugin 'io.spring.dependency-management' is an implementation dependency of project ':buildSrc'.

i want manage sub project dependency version by spring, what should i do what can i do ??

Two things to note:

  1. Don’t use io.spring.dependency-management, that is from a time where Gradle did not have native BOM support. Use implementation(platform(...)) instead.
  2. What is unclear with the error message? You are having a version in the plugins block of a precompiled script plugin and that is not allowed. You can actually also delete apply false because that has absolutely no effect at all in a precompiled script plugin. If you want to add a plugin to the class path, declare it as implementation dependency in buildSrc/build.gradle.kts, if you want to apply it, add it to the same place and use the plugins block, but without version.