Skip to content

Commit

Permalink
Merge pull request #7 from habuma/master
Browse files Browse the repository at this point in the history
Upgraded to Gradle 1.3 and latest DocBook reference plugin. Also cleaned up some build-time warnings.
  • Loading branch information
magott committed Dec 11, 2012
2 parents 66dc4cc + 1f7609c commit d01bc04
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 147 deletions.
42 changes: 22 additions & 20 deletions build.gradle
Expand Up @@ -3,7 +3,7 @@ buildscript {
maven { url 'http://repo.springsource.org/plugins-release' }
}
dependencies {
classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.1.3'
classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.2.2'
}
}

Expand All @@ -17,13 +17,15 @@ configure(allprojects) {
sourceCompatibility=1.5
targetCompatibility=1.5

springSocialVersion = '1.0.2.RELEASE'
jacksonVersion = '1.9.6'
junitVersion = '4.10'
mockitoVersion = '1.9.0'
springVersion = '3.1.0.RELEASE'
springSecurityCryptoVersion = '3.1.0.RELEASE'
springTestMvcVersion = "1.0.0.BUILD-SNAPSHOT"
ext {
springSocialVersion = '1.0.2.RELEASE'
jacksonVersion = '1.9.6'
junitVersion = '4.10'
mockitoVersion = '1.9.0'
springVersion = '3.1.0.RELEASE'
springSecurityCryptoVersion = '3.1.0.RELEASE'
springTestMvcVersion = "1.0.0.BUILD-SNAPSHOT"
}

[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none']

Expand All @@ -39,9 +41,9 @@ configure(allprojects) {
}

dependencies {
testCompile "junit:junit-dep:$junitVersion"
testCompile "org.mockito:mockito-all:$mockitoVersion"
testCompile "org.springframework:spring-test:$springVersion"
testCompile ("junit:junit-dep:$junitVersion")
testCompile ("org.mockito:mockito-all:$mockitoVersion")
testCompile ("org.springframework:spring-test:$springVersion")
}

// servlet-api (2.5) and tomcat-servlet-api (3.0) classpath entries should not be
Expand Down Expand Up @@ -93,10 +95,10 @@ configure(subprojects) { subproject ->
project('spring-social-yammer') {
description = 'Yammer API'
dependencies {
compile "org.springframework.social:spring-social-core:$springSocialVersion"
compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
compile "org.springframework.security:spring-security-crypto:$springSecurityCryptoVersion"
testCompile "org.springframework:spring-test-mvc:$springTestMvcVersion"
compile ("org.springframework.social:spring-social-core:$springSocialVersion")
compile ("org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion")
compile ("org.springframework.security:spring-security-crypto:$springSecurityCryptoVersion")
testCompile ("org.springframework:spring-test-mvc:$springTestMvcVersion")
}
}

Expand Down Expand Up @@ -188,7 +190,7 @@ configure(rootProject) {
description = "Builds -${classifier} archive, containing all jars and docs, " +
"suitable for community download page."

baseDir = "${project.name}-${project.version}";
ext.baseDir = "${project.name}-${project.version}";

from('src/dist') {
include 'readme.txt'
Expand All @@ -202,9 +204,9 @@ configure(rootProject) {
into "${baseDir}/docs"
}

from(zipTree(schemaZip.archivePath)) {
into "${baseDir}/schema"
}
// from(zipTree(schemaZip.archivePath)) {
// into "${baseDir}/schema"
// }

subprojects.each { subproject ->
into ("${baseDir}/libs") {
Expand All @@ -227,7 +229,7 @@ configure(rootProject) {

task wrapper(type: Wrapper) {
description = 'Generates gradlew[.bat] scripts'
gradleVersion = '1.1'
gradleVersion = '1.3'
}

}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Thu Feb 23 13:43:17 CET 2012
#Tue Dec 11 10:56:17 CST 2012
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.0-milestone-8a-bin.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.3-bin.zip
8 changes: 2 additions & 6 deletions gradlew
Expand Up @@ -9,10 +9,6 @@
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# ADDED BY HAND -- DO NOT ACCIDENTALLY DELETE WHEN UPGRADING GRADLE WRAPPER!
GRADLE_OPTS="-XX:MaxPermSize=1024m -Xmx1024m $GRADLE_OPTS"
# END ADDED BY HAND

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

Expand Down Expand Up @@ -105,13 +101,13 @@ if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT"
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
JAVA_OPTS="$JAVA_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
Expand Down
180 changes: 90 additions & 90 deletions gradlew.bat 100755 → 100644
@@ -1,90 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
12 changes: 6 additions & 6 deletions publish-maven.gradle
@@ -1,10 +1,10 @@
apply plugin: 'maven'

optionalDeps = []
providedDeps = []
ext.optionalDeps = []
ext.providedDeps = []

optional = { optionalDeps << it }
provided = { providedDeps << it }
ext.optional = { optionalDeps << it }
ext.provided = { providedDeps << it }

install {
repositories.mavenInstaller {
Expand All @@ -16,10 +16,10 @@ def customizePom(pom, gradleProject) {
pom.whenConfigured { generatedPom ->
// respect 'optional' and 'provided' dependencies
gradleProject.optionalDeps.each { dep ->
generatedPom.dependencies.find { it.artifactId == dep.name }?.optional = true
generatedPom.dependencies.findAll { it.artifactId == dep.name }*.optional = true
}
gradleProject.providedDeps.each { dep ->
generatedPom.dependencies.find { it.artifactId == dep.name }?.scope = 'provided'
generatedPom.dependencies.findAll { it.artifactId == dep.name }*.scope = 'provided'
}

// eliminate test-scoped dependencies (no need in maven central poms)
Expand Down
1 change: 0 additions & 1 deletion settings.gradle
Expand Up @@ -15,5 +15,4 @@
*/

rootProject.name = 'spring-social-yammer'
include 'docs'
include 'spring-social-yammer'

0 comments on commit d01bc04

Please sign in to comment.