Spring Framework
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.7 KiB

plugins {
id 'java-gradle-plugin'
id 'checkstyle'
}
repositories {
mavenCentral()
gradlePluginPortal()
}
ext {
def propertiesFile = new File(new File("$projectDir").parentFile, "gradle.properties")
propertiesFile.withInputStream {
def properties = new Properties()
properties.load(it)
set("kotlinVersion", properties["kotlinVersion"])
}
}
dependencies {
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}"
implementation "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-compiler-embeddable:${kotlinVersion}"
implementation "me.champeau.gradle:japicmp-gradle-plugin:0.3.0"
implementation "org.gradle:test-retry-gradle-plugin:1.4.1"
implementation "io.spring.javaformat:spring-javaformat-gradle-plugin:${javaFormatVersion}"
implementation "io.spring.nohttp:nohttp-gradle:0.0.11"
}
gradlePlugin {
plugins {
apiDiffPlugin {
id = "org.springframework.build.api-diff"
implementationClass = "org.springframework.build.api.ApiDiffPlugin"
}
conventionsPlugin {
id = "org.springframework.build.conventions"
implementationClass = "org.springframework.build.ConventionsPlugin"
}
Stop publishing distribution zip artifact Prior to this commit, the Spring Framework build would publish several zip artifacts: * a "*-schema.zip" containing all the XSD schemas produced * a "*-docs.zip" containing the API docs * a "*-dist.zip" containing all of the above, plus module jars Since the reference docs are now produced by Antora in a separate process, the "*-docs.zip" does not contain the reference docs anymore. But it still contains the API docs which are automatically fetched from the artifact repository and published on the docs.spring.io website. This commit intends to update the current arrangement and optimize the build. First, the "*-dist.zip" is not published anymore, since it cannot be consumed anyway by the community: repo.spring.io does not distribute release artifacts publicly, developers are expected to get them from Maven Central. This arrangement is quite dated anyway and is not really useful in current application build setups. The generation of API docs is moved to a new "framework-api" module, separating it from the reference docs module ("framework-docs") which contains Java, Kotlin and Asciidoctor sources. This removes the custom javadoc aggregation task and instead uses a dedicated Gradle plugin. This change also adds a new `-PskipDocs` Gradle project property that skips entirely the documentation tasks (javadoc, kdocs) as well as the "distrbution" tasks managed in the framework-api module. This allows developers to publish locally a SNAPSHOT of Spring Framework without creating the entire documentation distribution. This is particularly useful for local testing. For example, `$ ./gradlew pTML -PskipDocs`. Closes gh-31049
1 year ago
localDevPlugin {
id = "org.springframework.build.localdev"
implementationClass = "org.springframework.build.dev.LocalDevelopmentPlugin"
}
optionalDependenciesPlugin {
id = "org.springframework.build.optional-dependencies"
implementationClass = "org.springframework.build.optional.OptionalDependenciesPlugin"
}
runtimeHintsAgentPlugin {
id = "org.springframework.build.runtimehints-agent"
implementationClass = "org.springframework.build.hint.RuntimeHintsAgentPlugin"
}
}
}