+ another gradle update
+ fixed the dist/maven problem
This commit is contained in:
35
build.gradle
35
build.gradle
@@ -51,8 +51,8 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
javaprojects = subprojects.findAll { project ->
|
||||
project.path.startsWith(':spring-data-')
|
||||
javaprojects = subprojects.findAll {
|
||||
project -> project.path.startsWith(':spring-data-')
|
||||
}
|
||||
|
||||
configure(javaprojects) {
|
||||
@@ -88,9 +88,9 @@ configure(javaprojects) {
|
||||
testCompile "org.mockito:mockito-all:$mockitoVersion"
|
||||
}
|
||||
|
||||
sourceSets.main.classesDir = new File(buildDir, "classes/" + project.name.substring("spring-data".length() + 1))
|
||||
apply from: "$rootDir/maven.gradle"
|
||||
//sourceSets.main.classesDir = new File(buildDir, "classes/" + project.name.substring("spring-data".length() + 1))
|
||||
|
||||
apply from: "$rootDir/dist.gradle"
|
||||
}
|
||||
|
||||
ideaProject {
|
||||
@@ -101,4 +101,31 @@ ideaProject {
|
||||
|
||||
task wrapper(type: Wrapper) {
|
||||
gradleVersion = '0.9.2'
|
||||
}
|
||||
|
||||
// Distribution tasks
|
||||
task dist(type: Zip) {
|
||||
dependsOn subprojects*.tasks*.matching { task -> task.name == 'assemble' }
|
||||
|
||||
evaluationDependsOn(':docs')
|
||||
|
||||
def zipRootDir = "${project.name}-$version"
|
||||
into(zipRootDir) {
|
||||
from('$rootDir/docs/src/info') {
|
||||
include '*.txt'
|
||||
}
|
||||
into('dist') {
|
||||
from javaprojects.collect {project -> project.libsDir }
|
||||
}
|
||||
}
|
||||
doLast {
|
||||
ant.checksum(file: archivePath, algorithm: 'SHA1', fileext: '.sha1')
|
||||
}
|
||||
}
|
||||
|
||||
task uploadDist(type: org.springframework.gradle.tasks.S3DistroUpload) {
|
||||
description = "Upload Zip Distribution"
|
||||
archiveFile = dist.archivePath
|
||||
projectKey = 'DATAKV'
|
||||
projectName = 'Spring Data Key Value'
|
||||
}
|
||||
@@ -12,12 +12,12 @@ docbookHtmlSingle.stylesheet = new File(projectDir, 'docs/src/reference/resource
|
||||
[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.sourceFileName = 'index.xml'
|
||||
[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.sourceDirectory = new File(projectDir, 'docs/src/reference/docbook')
|
||||
|
||||
docbookHtml.stylesheet = new File(projectDir, 'docs/src/reference/resources/xsl/html-custom.xsl')
|
||||
docbookHtmlSingle.stylesheet = new File(projectDir, 'docs/src/reference/resources/xsl/html-single-custom.xsl')
|
||||
docbookFoPdf.stylesheet = new File(projectDir, 'docs/src/reference/resources/xsl/pdf-custom.xsl')
|
||||
def imagesDir = new File(projectDir, 'docs/src/reference/resources/images');
|
||||
// docbookFoPdf.admonGraphicsPath = "${imagesDir}/"
|
||||
docbookFoPdf.imgSrcPath = "${projectDir}/docs/reference/resources/"
|
||||
docbookHtml.stylesheet = new File(projectDir, 'src/reference/resources/xsl/html-custom.xsl')
|
||||
docbookHtmlSingle.stylesheet = new File(projectDir, 'src/reference/resources/xsl/html-single-custom.xsl')
|
||||
docbookFoPdf.stylesheet = new File(projectDir, 'src/reference/resources/xsl/pdf-custom.xsl')
|
||||
def imagesDir = new File(projectDir, 'src/reference/resources/images');
|
||||
docbookFoPdf.admonGraphicsPath = "${imagesDir}/"
|
||||
docbookFoPdf.imgSrcPath = "${imagesDir}"
|
||||
|
||||
spec = copySpec {
|
||||
into ('reference') {
|
||||
@@ -96,8 +96,9 @@ task docSiteLogin(type: org.springframework.gradle.tasks.Login) {
|
||||
}
|
||||
|
||||
// upload task
|
||||
task uploadApidocs(type: org.springframework.gradle.tasks.ScpUpload) {
|
||||
task uploadApi(type: org.springframework.gradle.tasks.ScpUpload) {
|
||||
dependsOn api
|
||||
description = "Upload API Distribution"
|
||||
baseName = "${rootProject.name}"
|
||||
appendix = 'apidocs'
|
||||
remoteDir = '.'
|
||||
|
||||
@@ -13,8 +13,7 @@ junitVersion = 4.8.1
|
||||
mockitoVersion = 1.8.5
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# version to be applied to all projects in this multi-project build. this is
|
||||
# the one and only location version changes need to be made.
|
||||
# ------------------------------------------------------------------------------
|
||||
# --------------------
|
||||
# Project wide version
|
||||
# --------------------
|
||||
springDataKeyValueVersion=1.0.0.BUILD-SNAPSHOT
|
||||
@@ -1,17 +1,5 @@
|
||||
apply plugin: 'maven'
|
||||
|
||||
// Distro zip
|
||||
// SpringSource s3 maven deployer
|
||||
configurations {
|
||||
antaws
|
||||
}
|
||||
|
||||
dependencies {
|
||||
antaws "org.springframework.build:org.springframework.build.aws.ant:3.0.3.RELEASE",
|
||||
"net.java.dev.jets3t:jets3t:0.6.1"
|
||||
}
|
||||
|
||||
|
||||
// Create a source jar for uploading
|
||||
task sourceJar(type: Jar) {
|
||||
classifier = 'sources'
|
||||
@@ -22,32 +10,14 @@ artifacts {
|
||||
archives sourceJar
|
||||
}
|
||||
|
||||
task dist(type: Zip) {
|
||||
dependsOn subprojects*.tasks*.matching { task -> task.name == 'assemble' }
|
||||
|
||||
evaluationDependsOn(':docs')
|
||||
|
||||
def zipRootDir = "${project.name}-$version"
|
||||
into(zipRootDir) {
|
||||
from(rootDir/docs/src/info) {
|
||||
include '*.txt'
|
||||
}
|
||||
into('dist') {
|
||||
from javaProjects.collect {project -> project.libsDir }
|
||||
}
|
||||
}
|
||||
doLast {
|
||||
ant.checksum(file: archivePath, algorithm: 'SHA1', fileext: '.sha1')
|
||||
}
|
||||
// Configuration for SpringSource s3 maven deployer
|
||||
configurations {
|
||||
deployerJars
|
||||
}
|
||||
|
||||
task uploadDist(type: org.springframework.gradle.tasks.S3DistroUpload) {
|
||||
archiveFile = dist.archivePath
|
||||
projectKey = 'DATAKV'
|
||||
projectName = 'Spring Data Key Value'
|
||||
dependencies {
|
||||
deployerJars "org.springframework.build.aws:org.springframework.build.aws.maven:3.0.0.RELEASE"
|
||||
}
|
||||
|
||||
|
||||
// Remove the archive configuration from the runtime configuration, so that anything added to archives
|
||||
// (such as the source jar) is no longer included in the runtime classpath
|
||||
configurations.default.extendsFrom = [configurations.runtime] as Set
|
||||
@@ -59,7 +29,6 @@ gradle.taskGraph.whenReady {graph ->
|
||||
// check properties defined and fail early
|
||||
s3AccessKey
|
||||
s3SecretAccessKey
|
||||
mavenSyncRepoDir
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +63,7 @@ uploadArchives {
|
||||
}
|
||||
}
|
||||
|
||||
pom.project {
|
||||
deployer.pom.project {
|
||||
licenses {
|
||||
license {
|
||||
name "The Apache Software License, Version 2.0"
|
||||
Reference in New Issue
Block a user