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.
113 lines
3.3 KiB
113 lines
3.3 KiB
5 years ago
|
apply plugin: 'org.springframework.build.compile'
|
||
|
apply plugin: 'org.springframework.build.optional-dependencies'
|
||
|
apply plugin: 'org.springframework.build.test-sources'
|
||
5 years ago
|
apply plugin: "maven"
|
||
13 years ago
|
|
||
5 years ago
|
jar {
|
||
|
manifest.attributes["Implementation-Title"] = project.name
|
||
|
manifest.attributes["Implementation-Version"] = project.version
|
||
|
manifest.attributes["Automatic-Module-Name"] = project.name.replace('-', '.') // for Jigsaw
|
||
|
manifest.attributes["Created-By"] =
|
||
|
"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
|
||
|
|
||
|
from("${rootDir}/src/docs/dist") {
|
||
|
include "license.txt"
|
||
|
include "notice.txt"
|
||
|
into "META-INF"
|
||
|
expand(copyright: new Date().format("yyyy"), version: project.version)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
javadoc {
|
||
|
description = "Generates project-level javadoc for use in -javadoc jar"
|
||
|
|
||
|
options.encoding = "UTF-8"
|
||
|
options.memberLevel = JavadocMemberLevel.PROTECTED
|
||
|
options.author = true
|
||
|
options.header = project.name
|
||
|
options.use = true
|
||
|
options.links(project.ext.javadocLinks)
|
||
|
options.addStringOption("Xdoclint:none", "-quiet")
|
||
|
|
||
|
// Suppress warnings due to cross-module @see and @link references.
|
||
|
// Note that global 'api' task does display all warnings.
|
||
|
logging.captureStandardError LogLevel.INFO
|
||
|
logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
|
||
|
}
|
||
|
|
||
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
||
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||
|
archiveClassifier.set("sources")
|
||
|
from sourceSets.main.allSource
|
||
|
// Don't include or exclude anything explicitly by default. See SPR-12085.
|
||
|
}
|
||
|
|
||
|
task javadocJar(type: Jar) {
|
||
|
archiveClassifier.set("javadoc")
|
||
|
from javadoc
|
||
|
}
|
||
|
|
||
|
artifacts {
|
||
|
archives sourcesJar
|
||
|
archives javadocJar
|
||
|
}
|
||
|
|
||
13 years ago
|
install {
|
||
12 years ago
|
repositories.mavenInstaller {
|
||
|
customizePom(pom, project)
|
||
|
}
|
||
13 years ago
|
}
|
||
|
|
||
|
def customizePom(pom, gradleProject) {
|
||
12 years ago
|
pom.whenConfigured { generatedPom ->
|
||
|
// eliminate test-scoped dependencies (no need in maven central poms)
|
||
|
generatedPom.dependencies.removeAll { dep ->
|
||
12 years ago
|
dep.scope == "test"
|
||
12 years ago
|
}
|
||
13 years ago
|
|
||
12 years ago
|
// sort to make pom dependencies order consistent to ease comparison of older poms
|
||
|
generatedPom.dependencies = generatedPom.dependencies.sort { dep ->
|
||
|
"$dep.scope:$dep.groupId:$dep.artifactId"
|
||
|
}
|
||
|
|
||
7 years ago
|
def managedVersions = dependencyManagement.managedVersions
|
||
|
generatedPom.dependencies.findAll{dep -> !dep.version }.each { dep ->
|
||
|
dep.version = managedVersions["${dep.groupId}:${dep.artifactId}"]
|
||
|
}
|
||
|
|
||
12 years ago
|
// add all items necessary for maven central publication
|
||
|
generatedPom.project {
|
||
|
name = gradleProject.description
|
||
|
description = gradleProject.description
|
||
11 years ago
|
url = "https://github.com/spring-projects/spring-framework"
|
||
12 years ago
|
organization {
|
||
11 years ago
|
name = "Spring IO"
|
||
6 years ago
|
url = "https://projects.spring.io/spring-framework"
|
||
12 years ago
|
}
|
||
|
licenses {
|
||
|
license {
|
||
8 years ago
|
name "Apache License, Version 2.0"
|
||
6 years ago
|
url "https://www.apache.org/licenses/LICENSE-2.0"
|
||
12 years ago
|
distribution "repo"
|
||
12 years ago
|
}
|
||
|
}
|
||
|
scm {
|
||
11 years ago
|
url = "https://github.com/spring-projects/spring-framework"
|
||
|
connection = "scm:git:git://github.com/spring-projects/spring-framework"
|
||
|
developerConnection = "scm:git:git://github.com/spring-projects/spring-framework"
|
||
12 years ago
|
}
|
||
|
developers {
|
||
|
developer {
|
||
12 years ago
|
id = "jhoeller"
|
||
|
name = "Juergen Hoeller"
|
||
10 years ago
|
email = "jhoeller@pivotal.io"
|
||
12 years ago
|
}
|
||
|
}
|
||
11 years ago
|
issueManagement {
|
||
6 years ago
|
system = "GitHub"
|
||
6 years ago
|
url = "https://github.com/spring-projects/spring-framework/issues"
|
||
11 years ago
|
}
|
||
12 years ago
|
}
|
||
|
}
|
||
13 years ago
|
}
|