
Prior to this commit, the published Maven POMs would not pass the Maven Central mandatory checks. This commit adds the missing project name and description metadata for most artifacts. The Spring Boot Gradle plugin artifact was also missing this information and this is now added in the plugin metadata itself. This is also updating the project page URL which is now hosted directly on spring.io. Fixes gh-21457
128 lines
3.3 KiB
Groovy
128 lines
3.3 KiB
Groovy
plugins {
|
|
id "java-gradle-plugin"
|
|
id "maven-publish"
|
|
id "org.asciidoctor.jvm.convert"
|
|
id "org.asciidoctor.jvm.pdf"
|
|
id "org.springframework.boot.conventions"
|
|
id "org.springframework.boot.internal-dependency-management"
|
|
id "org.springframework.boot.maven-repository"
|
|
id "org.springframework.boot.optional-dependencies"
|
|
}
|
|
|
|
description = "Spring Boot Gradle Plugin"
|
|
|
|
configurations {
|
|
asciidoctorExtensions
|
|
documentation
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
url "https://repo.spring.io/release"
|
|
mavenContent {
|
|
includeGroup "io.spring.asciidoctor"
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
api(platform(project(":spring-boot-project:spring-boot-dependencies")))
|
|
|
|
asciidoctorExtensions(platform(project(":spring-boot-project:spring-boot-parent")))
|
|
asciidoctorExtensions("io.spring.asciidoctor:spring-asciidoctor-extensions-block-switch")
|
|
|
|
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
|
|
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
|
|
implementation("io.spring.gradle:dependency-management-plugin")
|
|
implementation("org.apache.commons:commons-compress")
|
|
implementation("org.springframework:spring-core")
|
|
|
|
optional(platform(project(":spring-boot-project:spring-boot-dependencies")))
|
|
optional("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50")
|
|
|
|
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
|
testImplementation("org.assertj:assertj-core")
|
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
|
testImplementation("org.mockito:mockito-core")
|
|
testImplementation("org.testcontainers:testcontainers")
|
|
}
|
|
|
|
gradlePlugin {
|
|
plugins {
|
|
springBootPlugin {
|
|
id = "org.springframework.boot"
|
|
displayName = "Spring Boot Gradle Plugin"
|
|
description = "Spring Boot Gradle Plugin"
|
|
implementationClass = "org.springframework.boot.gradle.plugin.SpringBootPlugin"
|
|
}
|
|
}
|
|
}
|
|
|
|
task preparePluginValidationClasses(type: Copy) {
|
|
destinationDir = file("$buildDir/classes/java/pluginValidation")
|
|
from(sourceSets.main.output.classesDirs) {
|
|
exclude "**/CreateBootStartScripts.class"
|
|
}
|
|
}
|
|
|
|
validatePlugins {
|
|
classes.setFrom preparePluginValidationClasses
|
|
}
|
|
|
|
task dependencyVersions(type: org.springframework.boot.build.constraints.ExtractVersionConstraints) {
|
|
enforcedPlatform(":spring-boot-project:spring-boot-dependencies")
|
|
}
|
|
|
|
tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
|
|
dependsOn dependencyVersions
|
|
doFirst {
|
|
attributes "dependency-management-plugin-version": dependencyVersions.versionConstraints["io.spring.gradle:dependency-management-plugin"]
|
|
}
|
|
}
|
|
|
|
asciidoctor {
|
|
configurations "asciidoctorExtensions"
|
|
sources {
|
|
include "index.adoc"
|
|
}
|
|
attributes "stylesheet": "css/style.css"
|
|
}
|
|
|
|
asciidoctorPdf {
|
|
sources {
|
|
include "index.adoc"
|
|
}
|
|
}
|
|
|
|
javadoc {
|
|
options {
|
|
author = true
|
|
docTitle = "Spring Boot Gradle Plugin ${project.version} API"
|
|
encoding = "UTF-8"
|
|
memberLevel = "protected"
|
|
outputLevel = "quiet"
|
|
splitIndex = true
|
|
use = true
|
|
windowTitle = "Spring Boot Gradle Plugin ${project.version} API"
|
|
}
|
|
}
|
|
|
|
task zip(type: Zip) {
|
|
dependsOn asciidoctor, asciidoctorPdf
|
|
duplicatesStrategy "fail"
|
|
from(asciidoctorPdf.outputDir) {
|
|
into "reference/pdf"
|
|
rename "index.pdf", "${project.name}-reference.pdf"
|
|
}
|
|
from(asciidoctor.outputDir) {
|
|
into "reference/html"
|
|
}
|
|
from(javadoc) {
|
|
into "api"
|
|
}
|
|
}
|
|
|
|
artifacts {
|
|
"documentation" zip
|
|
}
|