Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
567eece
commit 0b46f18
Showing
5 changed files
with
159 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,211 +1,48 @@ | |||
// used for artifact names, building doc upload urls, etc. | |||
description = 'Spring Shell' | |||
abbreviation = 'SPSH' | |||
|
|||
apply plugin: 'base' | apply plugin: 'base' | ||
|
apply plugin: "java" | ||
buildscript { | apply plugin: 'eclipse' | ||
repositories { | apply plugin: 'idea' | ||
add(new org.apache.ivy.plugins.resolver.URLResolver()) { | |||
name = "GitHub" | |||
addIvyPattern 'http://cloud.github.com/downloads/costin/gradle-stuff/[organization].[module]-[artifact]-[revision].[ext]' | |||
addArtifactPattern 'http://cloud.github.com/downloads/costin/gradle-stuff/[organization].[module]-[revision].[ext]' | |||
} | |||
mavenCentral() | |||
mavenLocal() | |||
mavenRepo name: "springsource-org-release", urls: "http://repository.springsource.com/maven/bundles/release" | |||
mavenRepo name: "springsource-org-external", urls: "http://repository.springsource.com/maven/bundles/external" | |||
|
|||
} | |||
|
|||
dependencies { | |||
classpath 'org.springframework:gradle-stuff:0.1-20110421' | |||
classpath 'net.sf.docbook:docbook-xsl:1.75.2:ns-resources@zip' | |||
} | |||
} | |||
|
|
||
allprojects { | allprojects { | ||
group = 'org.springframework.shell' | group = 'org.springframework.shell' | ||
version = "$springShellVersion" | version = "$springShellVersion" | ||
|
|||
releaseBuild = version.endsWith('RELEASE') | |||
snapshotBuild = version.endsWith('SNAPSHOT') | |||
|
|||
|
|
||
repositories { | repositories { | ||
mavenLocal() | mavenLocal() | ||
mavenCentral() | mavenCentral() | ||
// Public Spring artefacts | maven{ | ||
mavenRepo name: "springsource-org-release", urls: "http://repository.springsource.com/maven/bundles/release" | url "http://repository.springsource.com/maven/bundles/release" | ||
mavenRepo name: "spring-release", urls: "http://maven.springframework.org/release" | url "http://maven.springframework.org/release" | ||
mavenRepo name: "spring-milestone", urls: "http://maven.springframework.org/milestone" | url "http://maven.springframework.org/milestone" | ||
mavenRepo name: "spring-snapshot", urls: "http://maven.springframework.org/snapshot" | url "http://maven.springframework.org/snapshot" | ||
mavenRepo name: "sonatype-snapshot", urls: "http://oss.sonatype.org/content/repositories/snapshots" | url "http://oss.sonatype.org/content/repositories/snapshots" | ||
mavenRepo name: "ext-snapshots", urls: "http://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo-ext/" | url "http://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo-ext/" | ||
mavenRepo name: "data-nucleus", urls: "http://www.datanucleus.org/downloads/maven2/" | url "http://www.datanucleus.org/downloads/maven2/" | ||
mavenRepo name: "conjars.org", urls: "http://conjars.org/repo" | url "http://conjars.org/repo" | ||
} | |||
} | } | ||
} | } | ||
|
|
||
apply plugin: "java" | |||
apply plugin: "maven" | |||
apply plugin: 'eclipse' // `gradle eclipse` to generate .classpath/.project | |||
apply plugin: 'idea' // `gradle idea` to generate .ipr/.iml | |||
apply plugin: 'docbook' | |||
|
|||
|
|||
// Common dependencies | |||
dependencies { | dependencies { | ||
|
|||
// Logging | |||
runtime "log4j:log4j:$log4jVersion" | runtime "log4j:log4j:$log4jVersion" | ||
|
|||
// Spring Framework | |||
compile "org.springframework:spring-core:$springVersion" | compile "org.springframework:spring-core:$springVersion" | ||
compile "org.springframework:spring-context-support:$springVersion" | compile "org.springframework:spring-context-support:$springVersion" | ||
compile "commons-io:commons-io:$commonsioVersion" | compile "commons-io:commons-io:$commonsioVersion" | ||
compile "net.sourceforge.jline:jline:$jlineVersion" | compile "net.sourceforge.jline:jline:$jlineVersion" | ||
compile "org.fusesource.jansi:jansi:$jansiVersion" | compile "org.fusesource.jansi:jansi:$jansiVersion" | ||
|
|||
// needed for use of @Configuration extension points. | |||
compile "cglib:cglib:$cglibVersion" | compile "cglib:cglib:$cglibVersion" | ||
|
|
||
|
|
||
// Testing | // Testing | ||
testCompile "junit:junit:$junitVersion" | testCompile "junit:junit:$junitVersion" | ||
testCompile "org.mockito:mockito-core:$mockitoVersion" | testCompile "org.mockito:mockito-core:$mockitoVersion" | ||
testCompile "org.springframework:spring-test:$springVersion" | testCompile "org.springframework:spring-test:$springVersion" | ||
testCompile("javax.annotation:jsr250-api:1.0") { optional = true } | testCompile "javax.annotation:jsr250-api:1.0" | ||
testRuntime "org.codehaus.groovy:groovy:$groovyVersion" | testRuntime "org.codehaus.groovy:groovy:$groovyVersion" | ||
|
|
||
} | } | ||
|
|
||
javaprojects = rootProject | |||
|
|||
sourceCompatibility = 1.6 | |||
targetCompatibility = 1.6 | |||
|
|||
javadoc { | |||
srcDir = file("${projectDir}/docs/src/api") | |||
destinationDir = file("${buildDir}/api") | |||
tmpDir = file("${buildDir}/api-work") | |||
|
|||
configure(options) { | |||
stylesheetFile = file("${srcDir}/spring-javadoc.css") | |||
overview = "${srcDir}/overview.html" | |||
docFilesSubDirs = true | |||
outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET | |||
breakIterator = true | |||
author = true | |||
showFromProtected() | |||
|
|||
// groups = [ | |||
// 'Spring Data Hadoop' : ['org.springframework.data.hadoop*'], | |||
// ] | |||
|
|||
links = [ | |||
"http://static.springframework.org/spring/docs/3.0.x/javadoc-api", | |||
"http://download.oracle.com/javase/6/docs/api", | |||
"http://logging.apache.org/log4j/docs/api/", | |||
] | |||
|
|||
exclude "org/springframework/data/hadoop/config/**" | |||
} | |||
|
|||
title = "${rootProject.description} ${version} API" | |||
|
|||
// collect all the sources that will be included in the javadoc output | |||
source javaprojects.collect {project -> | |||
project.sourceSets.main.allJava | |||
} | |||
|
|||
// collect all main classpaths to be able to resolve @see refs, etc. | |||
// this collection also determines the set of projects that this | |||
// task dependsOn, thus the runtimeClasspath is used to ensure all | |||
// projects are included, not just *dependencies* of all classes. | |||
// this is awkward and took me a while to figure out. | |||
classpath = files(javaprojects.collect {project -> | |||
project.sourceSets.main.runtimeClasspath | |||
}) | |||
|
|||
// copy the images from the doc-files dir over to the target | |||
doLast { task -> | |||
copy { | |||
from file("${task.srcDir}/doc-files") | |||
into file("${task.destinationDir}/doc-files") | |||
} | |||
} | |||
} | |||
|
|||
ideaProject { | |||
withXml { provider -> | |||
provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git' | |||
} | |||
} | |||
|
|||
task wrapper(type: Wrapper) { | task wrapper(type: Wrapper) { | ||
gradleVersion = '1.0-milestone-3' | |||
description = "Generate the Gradle wrapper" | |||
group = "Distribution" | |||
} | } | ||
|
|
||
apply from: "$rootDir/maven.gradle" | defaultTasks 'build' | ||
|
|||
// Distribution tasks | |||
task dist(type: Zip) { | |||
description = "Generate the ZIP Distribution" | |||
group = "Distribution" | |||
dependsOn assemble, subprojects*.tasks*.matching { task -> task.name == 'assemble' } | |||
|
|||
// evaluationDependsOn(':docs') | |||
|
|||
def zipRootDir = "${project.name}-$version" | |||
into(zipRootDir) { | |||
from('/docs/src/info') { | |||
include '*.txt' | |||
} | |||
from('/docs/build/') { | |||
into 'docs' | |||
include 'reference/**/*' | |||
} | |||
from('samples/') { | |||
into 'samples' | |||
exclude '**/build/**' | |||
exclude '**/bin/**' | |||
exclude '**/.settings/**' | |||
exclude '**/.gradle/**' | |||
exclude '**/.*' | |||
} | |||
from('build/') { | |||
into 'docs' | |||
include 'api/**/*' | |||
} | |||
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, dependsOn: dist) { | |||
description = "Upload the ZIP Distribution" | |||
group = "Distribution" | |||
archiveFile = dist.archivePath | |||
projectKey = 'SHDP' | |||
projectName = 'Spring Data Hadoop' | |||
} | |||
|
|||
assemble.dependsOn = ['jar', 'sourceJar', 'javadocJar'] | |||
|
|||
task run(type: JavaExec) { | |||
description = 'Runs the application' | |||
main = "org.springframework.shell.Bootstrap" | |||
classpath = sourceSets.main.runtimeClasspath | |||
} | |||
|
|||
//defaultTasks 'run' | |||
|
|||
|
|||
defaultTasks 'build' |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,6 +1,6 @@ | |||
#Mon Sep 19 20:44:55 EEST 2011 | #Wed Apr 25 10:23:49 CST 2012 | ||
distributionBase=GRADLE_USER_HOME | distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | zipStorePath=wrapper/dists | ||
distributionUrl=http\://repo.gradle.org/gradle/distributions/gradle-1.0-milestone-3-bin.zip | distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-rc-2-bin.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.