Permalink
Browse files

Merge pull request #1 from habuma/master

Convert to submodule-free build
  • Loading branch information...
2 parents 77f3c17 + a9ae5ff commit 833878364a2c108bca7bea8206dc88db416ed044 @habuma habuma committed Apr 15, 2012
Showing with 618 additions and 298 deletions.
  1. +0 −3 .gitmodules
  2. 0 docs/src/info/license.txt → LICENSE
  3. +21 −0 NOTICE
  4. +215 −119 build.gradle
  5. +0 −1 buildSrc
  6. +1 −42 gradle.properties
  7. BIN gradle/wrapper/gradle-wrapper.jar
  8. +6 −0 gradle/wrapper/gradle-wrapper.properties
  9. +81 −64 gradlew
  10. +32 −68 gradlew.bat
  11. +60 −0 publish-maven.gradle
  12. BIN {docs → }/src/api/doc-files/th-background.png
  13. 0 {docs → }/src/api/overview.html
  14. 0 {docs → }/src/api/spring-javadoc.css
  15. 0 {docs/src/info → src/dist}/changelog.txt
  16. +201 −0 src/dist/license.txt
  17. 0 {docs/src/info → src/dist}/notice.txt
  18. +1 −1 {docs/src/info → src/dist}/readme.txt
  19. 0 {docs → }/src/reference/docbook/api.xml
  20. 0 {docs → }/src/reference/docbook/connecting.xml
  21. 0 {docs → }/src/reference/docbook/index.xml
  22. 0 {docs → }/src/reference/docbook/overview.xml
  23. 0 {docs → }/src/reference/resources/css/highlight.css
  24. 0 {docs → }/src/reference/resources/css/html.css
  25. 0 {docs → }/src/reference/resources/css/manual.css
  26. 0 {docs → }/src/reference/resources/css/stylesheet.css
  27. BIN {docs → }/src/reference/resources/image_src/oauth_flows.graffle
  28. BIN {docs/src/reference/resources/images → src/reference/resources/images/admon}/note.png
  29. BIN {docs → }/src/reference/resources/images/callouts/1.gif
  30. BIN {docs → }/src/reference/resources/images/callouts/1.png
  31. 0 {docs → }/src/reference/resources/images/callouts/1.svg
  32. BIN {docs → }/src/reference/resources/images/callouts/10.gif
  33. BIN {docs → }/src/reference/resources/images/callouts/10.png
  34. 0 {docs → }/src/reference/resources/images/callouts/10.svg
  35. BIN {docs → }/src/reference/resources/images/callouts/11.gif
  36. BIN {docs → }/src/reference/resources/images/callouts/11.png
  37. 0 {docs → }/src/reference/resources/images/callouts/11.svg
  38. BIN {docs → }/src/reference/resources/images/callouts/12.gif
  39. BIN {docs → }/src/reference/resources/images/callouts/12.png
  40. 0 {docs → }/src/reference/resources/images/callouts/12.svg
  41. BIN {docs → }/src/reference/resources/images/callouts/13.gif
  42. BIN {docs → }/src/reference/resources/images/callouts/13.png
  43. 0 {docs → }/src/reference/resources/images/callouts/13.svg
  44. BIN {docs → }/src/reference/resources/images/callouts/14.gif
  45. BIN {docs → }/src/reference/resources/images/callouts/14.png
  46. 0 {docs → }/src/reference/resources/images/callouts/14.svg
  47. BIN {docs → }/src/reference/resources/images/callouts/15.gif
  48. BIN {docs → }/src/reference/resources/images/callouts/15.png
  49. 0 {docs → }/src/reference/resources/images/callouts/15.svg
  50. 0 {docs → }/src/reference/resources/images/callouts/16.svg
  51. 0 {docs → }/src/reference/resources/images/callouts/17.svg
  52. 0 {docs → }/src/reference/resources/images/callouts/18.svg
  53. 0 {docs → }/src/reference/resources/images/callouts/19.svg
  54. BIN {docs → }/src/reference/resources/images/callouts/2.gif
  55. BIN {docs → }/src/reference/resources/images/callouts/2.png
  56. 0 {docs → }/src/reference/resources/images/callouts/2.svg
  57. 0 {docs → }/src/reference/resources/images/callouts/20.svg
  58. 0 {docs → }/src/reference/resources/images/callouts/21.svg
  59. 0 {docs → }/src/reference/resources/images/callouts/22.svg
  60. 0 {docs → }/src/reference/resources/images/callouts/23.svg
  61. 0 {docs → }/src/reference/resources/images/callouts/24.svg
  62. 0 {docs → }/src/reference/resources/images/callouts/25.svg
  63. 0 {docs → }/src/reference/resources/images/callouts/26.svg
  64. 0 {docs → }/src/reference/resources/images/callouts/27.svg
  65. 0 {docs → }/src/reference/resources/images/callouts/28.svg
  66. 0 {docs → }/src/reference/resources/images/callouts/29.svg
  67. BIN {docs → }/src/reference/resources/images/callouts/3.gif
  68. BIN {docs → }/src/reference/resources/images/callouts/3.png
  69. 0 {docs → }/src/reference/resources/images/callouts/3.svg
  70. 0 {docs → }/src/reference/resources/images/callouts/30.svg
  71. BIN {docs → }/src/reference/resources/images/callouts/4.gif
  72. BIN {docs → }/src/reference/resources/images/callouts/4.png
  73. 0 {docs → }/src/reference/resources/images/callouts/4.svg
  74. BIN {docs → }/src/reference/resources/images/callouts/5.gif
  75. BIN {docs → }/src/reference/resources/images/callouts/5.png
  76. 0 {docs → }/src/reference/resources/images/callouts/5.svg
  77. BIN {docs → }/src/reference/resources/images/callouts/6.gif
  78. BIN {docs → }/src/reference/resources/images/callouts/6.png
  79. 0 {docs → }/src/reference/resources/images/callouts/6.svg
  80. BIN {docs → }/src/reference/resources/images/callouts/7.gif
  81. BIN {docs → }/src/reference/resources/images/callouts/7.png
  82. 0 {docs → }/src/reference/resources/images/callouts/7.svg
  83. BIN {docs → }/src/reference/resources/images/callouts/8.gif
  84. BIN {docs → }/src/reference/resources/images/callouts/8.png
  85. 0 {docs → }/src/reference/resources/images/callouts/8.svg
  86. BIN {docs → }/src/reference/resources/images/callouts/9.gif
  87. BIN {docs → }/src/reference/resources/images/callouts/9.png
  88. 0 {docs → }/src/reference/resources/images/callouts/9.svg
  89. BIN {docs → }/src/reference/resources/images/facebook-authorize-basic.png
  90. BIN {docs → }/src/reference/resources/images/facebook-authorize-loginbutton.png
  91. BIN {docs → }/src/reference/resources/images/facebook-authorize-scoped.png
  92. BIN {docs → }/src/reference/resources/images/important.png
  93. BIN {docs → }/src/reference/resources/images/logo.png
  94. BIN {docs/src/reference/resources/images/admon → src/reference/resources/images}/note.png
  95. BIN {docs → }/src/reference/resources/images/oauth1_flow.png
  96. BIN {docs → }/src/reference/resources/images/oauth2_flow.png
  97. BIN {docs → }/src/reference/resources/images/sign-in-with-facebook.png
  98. BIN {docs → }/src/reference/resources/images/sign-in-with-twitter-d.png
  99. BIN {docs → }/src/reference/resources/images/sign-in-with-twitter.png
  100. BIN {docs → }/src/reference/resources/images/spring-social-twitter-example.png
  101. BIN {docs → }/src/reference/resources/images/tip.png
  102. BIN {docs → }/src/reference/resources/images/twitter-authorize.png
  103. BIN {docs → }/src/reference/resources/images/xdev-spring_logo.jpg
  104. 0 {docs → }/src/reference/resources/xsl/html-custom.xsl
  105. 0 {docs → }/src/reference/resources/xsl/html-single-custom.xsl
  106. 0 {docs → }/src/reference/resources/xsl/pdf-custom.xsl
View
@@ -1,3 +0,0 @@
-[submodule "buildSrc"]
- path = buildSrc
- url = git://github.com/SpringSource/spring-build-gradle.git
File renamed without changes.
View
@@ -0,0 +1,21 @@
+ ==========================================================================
+ == NOTICE file corresponding to section 4 d of the Apache License, ==
+ == Version 2.0, in this case for the Spring Social TripIt distribution. ==
+ ==========================================================================
+
+ This product includes software developed by
+ the Apache Software Foundation (http://www.apache.org).
+
+ The end-user documentation included with a redistribution, if any,
+ must include the following acknowledgement:
+
+ "This product includes software developed by the Spring Framework
+ Project (http://www.springframework.org)."
+
+ Alternatively, this acknowledgement may appear in the software itself,
+ if and wherever such third-party acknowledgements normally appear.
+
+ The names "Spring", "Spring Framework", and "Spring Social" must
+ not be used to endorse or promote products derived from this software
+ without prior written permission. For written permission, please contact
+ enquiries@springsource.com.
View
@@ -1,155 +1,251 @@
-/*
- * Copyright 2010 the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- import org.springframework.build.Version
-
-// -----------------------------------------------------------------------------
-// Main gradle build file for Spring Social TripIt
-// @author Chris Beams
-// @author Craig Walls
-// -----------------------------------------------------------------------------
-
-// -----------------------------------------------------------------------------
-// Configuration for the root project
-// -----------------------------------------------------------------------------
-description = 'Spring Social TripIt'
-abbreviation = 'SOCIAL-TRIPIT'
-
-apply plugin: 'base'
-apply plugin: 'idea'
-
-def buildSrcDir = "$rootDir/buildSrc"
-apply from: "$buildSrcDir/wrapper.gradle"
-apply from: "$buildSrcDir/maven-root-pom.gradle"
-
-// -----------------------------------------------------------------------------
-// Configuration for all projects including this one (the root project)
-//
-// @see settings.gradle for list of all subprojects
-// -----------------------------------------------------------------------------
-allprojects {
- // group will translate to groupId during pom generation and deployment
- group = 'org.springframework.social'
-
- // version will be used in maven pom generation as well as determining
- // where artifacts should be deployed, based on release type of snapshot,
- // milestone or release.
- // @see org.springframework.build.Version under buildSrc/ for more info
- // @see gradle.properties for the declaration of this property.
- version = new Version(springSocialTripItVersion)
-
- // default set of maven repositories to be used when resolving dependencies
+buildscript {
repositories {
- mavenRepo urls: 'http://maven.springframework.org/release'
- mavenRepo urls: 'http://maven.springframework.org/milestone'
- mavenRepo urls: 'http://maven.springframework.org/snapshot'
- mavenCentral()
+ maven { url 'http://repo.springsource.org/plugins-release' }
+ }
+ dependencies {
+ classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.1.3'
}
}
+configure(allprojects) {
+ apply plugin: 'java'
+ apply plugin: 'eclipse'
+ apply plugin: 'idea'
-// -----------------------------------------------------------------------------
-// Create collections of subprojects - each will receive their own configuration
-// - all subprojects that start with spring-social-* are 'java projects'
-// - documentation-related subprojects are not collected here
-//
-// @see configure(*) sections below
-// -----------------------------------------------------------------------------
-
-javaprojects = subprojects.findAll { project ->
- project.path.startsWith(':spring-social-')
-}
-
-// -----------------------------------------------------------------------------
-// Configuration for all java subprojects
-// -----------------------------------------------------------------------------
-configure(javaprojects) {
-
- apply plugin: 'java' // tasks for conventional java lifecycle
- apply plugin: 'maven' // `gradle install` to push jars to local .m2 cache
- apply plugin: 'eclipse' // `gradle eclipse` to generate .classpath/.project
- apply plugin: 'idea' // `gradle idea` to generate .ipr/.iml
-
- // set up dedicated directories for jars and source jars.
- // this makes it easier when putting together the distribution
- libsBinDir = new File(libsDir, 'bin')
- libsSrcDir = new File(libsDir, 'src')
-
- // add tasks for creating source jars and generating poms etc
- apply from: "$buildSrcDir/maven-deployment.gradle"
+ group = 'org.springframework.social'
- // add tasks for finding and publishing .xsd files
- apply from: "$buildSrcDir/schema-publication.gradle"
+ sourceCompatibility=1.5
+ targetCompatibility=1.5
- springSocialVersion = '1.0.0.BUILD-SNAPSHOT'
+ springSocialVersion = '1.0.2.RELEASE'
jacksonVersion = '1.9.2'
junitVersion = '4.8.2'
mockitoVersion = '1.8.5'
springVersion = '3.1.0.RELEASE'
springSecurityVersion = '3.1.0.RELEASE'
- sourceSets {
- main {
- resources {
- srcDirs = ['src/main/java']
- }
- }
- test {
- resources {
- srcDirs = ['src/test/java']
- }
- }
+ [compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none']
+
+ sourceSets.test.resources.srcDirs = ['src/test/resources', 'src/test/java']
+
+ test.systemProperty("java.awt.headless", "true")
+
+ repositories {
+ maven { url "http://repo.springsource.org/libs-release" }
+ maven { url "http://repo.springsource.org/libs-milestone" }
+ maven { url "http://repo.springsource.org/libs-snapshot" }
+ maven { url "http://repo.springsource.org/ebr-maven-external" }
}
- // dependencies that are common across all java projects
dependencies {
testCompile "junit:junit:$junitVersion"
testCompile "org.mockito:mockito-all:$mockitoVersion"
testCompile "org.springframework:spring-test:$springVersion"
testCompile "org.springframework.security:spring-security-crypto:$springSecurityVersion"
}
- // enable all compiler warnings (GRADLE-1077)
- [compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:all']
-
- // generate .classpath files without GRADLE_CACHE variable (GRADLE-1079)
- eclipseClasspath.variables = [:]
+ // servlet-api (2.5) and tomcat-servlet-api (3.0) classpath entries should not be
+ // exported to dependent projects in Eclipse to avoid false compilation errors due
+ // to changing APIs across these versions
+ eclipse.classpath.file.whenMerged { classpath ->
+ classpath.entries.findAll { entry -> entry.path.contains('servlet-api') }*.exported = false
+ }
}
+configure(subprojects) { subproject ->
+ apply from: "${rootProject.projectDir}/publish-maven.gradle"
+
+ jar {
+ manifest.attributes['Implementation-Title'] = subproject.name
+ manifest.attributes['Implementation-Version'] = subproject.version
+
+ from("${rootProject.projectDir}/src/dist") {
+ include "license.txt"
+ include "notice.txt"
+ into "META-INF"
+ expand(copyright: new Date().format('yyyy'), version: project.version)
+ }
+ }
-// -----------------------------------------------------------------------------
-// Configuration for each individual core java subproject
-//
-// @see configure(javaprojects) above for general config
-// -----------------------------------------------------------------------------
+ javadoc {
+ options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
+ options.author = true
+ options.header = project.name
+ //options.overview = "${projectDir}/src/main/java/overview.html"
+ }
+
+ task sourcesJar(type: Jar, dependsOn:classes) {
+ classifier = 'sources'
+ from sourceSets.main.allJava
+ }
+
+ task javadocJar(type: Jar) {
+ classifier = 'javadoc'
+ from javadoc
+ }
+
+ artifacts {
+ archives sourcesJar
+ archives javadocJar
+ }
+}
project('spring-social-tripit') {
description = 'TripIt API'
dependencies {
compile "org.springframework.social:spring-social-core:$springSocialVersion"
- compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
+ compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
testCompile "org.springframework.social:spring-social-test:$springSocialVersion"
}
}
-// -----------------------------------------------------------------------------
-// Configuration for the docs subproject
-// -----------------------------------------------------------------------------
-project('docs') {
- apply from: "$buildSrcDir/docs.gradle"
+configure(rootProject) {
+ description = 'Spring Social TripIt'
+
+ apply plugin: 'docbook-reference'
+
+ reference {
+ sourceDir = file('src/reference/docbook')
+ }
+
+ // don't publish the default jar for the root project
+ configurations.archives.artifacts.clear()
+
+ dependencies { // for integration tests
+ }
+
+ task api(type: Javadoc) {
+ group = 'Documentation'
+ description = 'Generates aggregated Javadoc API documentation.'
+ title = "${rootProject.description} ${version} API"
+ options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
+ options.author = true
+ options.header = rootProject.description
+ options.overview = 'src/api/overview.html'
+ options.links(
+ 'http://docs.jboss.org/jbossas/javadoc/4.0.5/connector'
+ )
+ source subprojects.collect { project ->
+ project.sourceSets.main.allJava
+ }
+ destinationDir = new File(buildDir, "api")
+ classpath = files(subprojects.collect { project ->
+ project.sourceSets.main.compileClasspath
+ })
+ maxMemory = '1024m'
+ }
+
+ task docsZip(type: Zip) {
+ group = 'Distribution'
+ classifier = 'docs'
+ description = "Builds -${classifier} archive containing api and reference " +
+ "for deployment at static.springframework.org/spring-social/docs."
+
+ from('src/dist') {
+ include 'changelog.txt'
+ }
+
+ from (api) {
+ into 'api'
+ }
+
+ from (reference) {
+ into 'reference'
+ }
+ }
+
+ task schemaZip(type: Zip) {
+ group = 'Distribution'
+ classifier = 'schema'
+ description = "Builds -${classifier} archive containing all " +
+ "XSDs for deployment at static.springframework.org/schema."
+
+ subprojects.each { subproject ->
+ def Properties schemas = new Properties();
+
+ subproject.sourceSets.main.resources.find {
+ it.path.endsWith('META-INF/spring.schemas')
+ }?.withInputStream { schemas.load(it) }
+
+ for (def key : schemas.keySet()) {
+ def shortName = key.replaceAll(/http.*schema.(.*).spring-.*/, '$1')
+ assert shortName != key
+ File xsdFile = subproject.sourceSets.main.resources.find {
+ it.path.endsWith(schemas.get(key))
+ }
+ assert xsdFile != null
+ into (shortName) {
+ from xsdFile.path
+ }
+ }
+ }
+ }
+
+ task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) {
+ group = 'Distribution'
+ classifier = 'dist'
+ description = "Builds -${classifier} archive, containing all jars and docs, " +
+ "suitable for community download page."
+
+ baseDir = "${project.name}-${project.version}";
+
+ from('src/dist') {
+ include 'readme.txt'
+ include 'license.txt'
+ include 'notice.txt'
+ into "${baseDir}"
+ expand(copyright: new Date().format('yyyy'), version: project.version)
+ }
+
+ from(zipTree(docsZip.archivePath)) {
+ into "${baseDir}/docs"
+ }
+
+ from(zipTree(schemaZip.archivePath)) {
+ into "${baseDir}/schema"
+ }
+
+ subprojects.each { subproject ->
+ into ("${baseDir}/libs") {
+ from subproject.jar
+ if (subproject.tasks.findByPath('sourcesJar')) {
+ from subproject.sourcesJar
+ }
+ if (subproject.tasks.findByPath('javadocJar')) {
+ from subproject.javadocJar
+ }
+ }
+ }
+ }
+
+ artifacts {
+ archives docsZip
+// archives schemaZip
+ archives distZip
+ }
+
+ task wrapper(type: Wrapper) {
+ description = 'Generates gradlew[.bat] scripts'
+ gradleVersion = '1.0-milestone-8a'
+ }
+
+}
+
+task updateRootDocs << {
+ copy {
+ from 'src/dist'
+ into "${rootProject.projectDir}"
+ include 'notice.txt'
+ expand(copyright: new Date().format('yyyy'), version: project.version)
+ rename { filename -> 'NOTICE' }
+ }
+
+ copy {
+ from 'src/dist'
+ into "${rootProject.projectDir}"
+ include 'license.txt'
+ rename { filename -> 'LICENSE' }
+ }
}
-apply from: "$buildSrcDir/dist.gradle"
-apply from: "$buildSrcDir/checks.gradle"
+build.dependsOn('updateRootDocs')
Submodule buildSrc deleted from 308ed0
Oops, something went wrong.

0 comments on commit 8338783

Please sign in to comment.