Skip to content
Browse files

Merging build/single-project

  • Loading branch information...
2 parents efad4fe + 53adc06 commit 9013658e356c8d0ac584bf15c385f96d15664343 @quidryan quidryan committed
View
69 build.gradle
@@ -1,5 +1,5 @@
// Establish version and status
-ext.githubProjectName = rootProject.name // Change if github project name is not the same as the root project's name
+ext.githubProjectName = rootProject.name
buildscript {
repositories { mavenCentral() }
@@ -16,51 +16,38 @@ apply from: file('gradle/check.gradle')
apply from: file('gradle/license.gradle')
apply from: file('gradle/release.gradle')
-subprojects {
- // Closure to configure all the POM with extra info, common to all projects
- pom {
- project {
- url "https://github.com/Netflix/${rootProject.githubProjectName}"
- scm {
- connection "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git"
- url "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git"
- developerConnection "scm:git:git@github.com:Netflix/${rootProject.githubProjectName}.git"
- }
- issueManagement {
- system 'github'
- url "https://github.com/Netflix/${rootProject.githubProjectName}/issues"
- }
+// Closure to configure all the POM with extra info, common to all projects
+pom {
+ project {
+ url "https://github.com/Netflix/${githubProjectName}"
+ scm {
+ connection "scm:git:git@github.com:Netflix/${githubProjectName}.git"
+ url "scm:git:git@github.com:Netflix/${githubProjectName}.git"
+ developerConnection "scm:git:git@github.com:Netflix/${githubProjectName}.git"
+ }
+ issueManagement {
+ system 'github'
+ url "https://github.com/Netflix/${githubProjectName}/issues"
}
}
group = "com.netflix.${githubProjectName}" // TEMPLATE: Set to organization of project
-
- dependencies {
- compile 'javax.ws.rs:jsr311-api:1.1.1'
- compile 'com.sun.jersey:jersey-core:1.11'
- testCompile 'org.testng:testng:6.1.1'
- testCompile 'org.mockito:mockito-core:1.8.5'
- }
}
-project(':') {
- apply plugin: 'java'
-
- dependencies {
- compile 'joda-time:joda-time:1.6.2'
- compile 'org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-csv:1.0-r706900_3'
- compile 'com.github.stephenc.high-scale-lib:high-scale-lib:1.1.2'
- compile 'com.google.guava:guava:11.0.1'
- compile 'org.apache.cassandra:cassandra-all:1.1.1'
- compile 'org.apache.cassandra:cassandra-thrift:1.1.1'
- compile 'com.eaio.uuid:uuid:3.2'
- compile 'org.slf4j:slf4j-api:1.6.4'
- compile 'org.codehaus.jettison:jettison:1.2'
- compile 'commons-codec:commons-codec:1.5'
- compile 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.3'
- compile 'commons-lang:commons-lang:2.4'
- compile 'org.apache.thrift:libthrift:0.7.0'
- testCompile 'junit:junit:4.8.1'
- }
+dependencies {
+ compile 'joda-time:joda-time:1.6.2'
+ compile 'org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-csv:1.0-r706900_3'
+ compile 'com.github.stephenc.high-scale-lib:high-scale-lib:1.1.2'
+ compile 'com.google.guava:guava:11.0.1'
+ compile 'org.apache.cassandra:cassandra-all:1.1.1'
+ compile 'org.apache.cassandra:cassandra-thrift:1.1.1'
+ compile 'com.eaio.uuid:uuid:3.2'
+ compile 'org.slf4j:slf4j-api:1.6.4'
+ compile 'org.codehaus.jettison:jettison:1.2'
+ compile 'commons-codec:commons-codec:1.5'
+ compile 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.3'
+ compile 'commons-lang:commons-lang:2.4'
+ compile 'org.apache.thrift:libthrift:0.7.0'
+ testCompile 'junit:junit:4.8.1'
}
View
20 codequality/HEADER
@@ -1,13 +1,13 @@
- Copyright 2012 Netflix, Inc.
+Copyright ${year} Netflix, Inc.
- 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
+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
+ 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.
+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.
View
2 gradle.properties
@@ -1 +1 @@
-version=1.7
+version=1.0.7-SNAPSHOT
View
40 gradle/check.gradle
@@ -1,25 +1,23 @@
-subprojects {
- // Checkstyle
- apply plugin: 'checkstyle'
- tasks.withType(Checkstyle) { ignoreFailures = true }
- checkstyle {
- ignoreFailures = true // Waiting on GRADLE-2163
- configFile = rootProject.file('codequality/checkstyle.xml')
- }
+// Checkstyle
+apply plugin: 'checkstyle'
+tasks.withType(Checkstyle) { ignoreFailures = true }
+checkstyle {
+ ignoreFailures = true // Waiting on GRADLE-2163
+ configFile = rootProject.file('codequality/checkstyle.xml')
+}
- // FindBugs
- apply plugin: 'findbugs'
- //tasks.withType(Findbugs) { reports.html.enabled true }
+// FindBugs
+apply plugin: 'findbugs'
+//tasks.withType(Findbugs) { reports.html.enabled true }
- // PMD
- apply plugin: 'pmd'
- //tasks.withType(Pmd) { reports.html.enabled true }
+// PMD
+apply plugin: 'pmd'
+//tasks.withType(Pmd) { reports.html.enabled true }
- apply plugin: 'cobertura'
- cobertura {
- sourceDirs = sourceSets.main.java.srcDirs
- format = 'html'
- includes = ['**/*.java', '**/*.groovy']
- excludes = []
- }
+apply plugin: 'cobertura'
+cobertura {
+ sourceDirs = sourceSets.main.java.srcDirs
+ format = 'html'
+ includes = ['**/*.java', '**/*.groovy']
+ excludes = []
}
View
47 gradle/convention.gradle
@@ -1,40 +1,25 @@
+apply plugin: 'java' // Plugin as major conventions
-// For Artifactory
-rootProject.status = version.contains('-SNAPSHOT')?'snapshot':'release'
+sourceCompatibility = 1.6
-subprojects { project ->
- apply plugin: 'java' // Plugin as major conventions
+// GRADLE-2087 workaround, perform after java plugin
+status = version.contains('-SNAPSHOT')?'snapshot':'release'
- version = rootProject.version
-
- sourceCompatibility = 1.6
-
- // GRADLE-2087 workaround, perform after java plugin
- status = rootProject.status
-
- task sourcesJar(type: Jar, dependsOn:classes) {
- classifier = 'sources'
- from sourceSets.main.allSource
- }
-
- task javadocJar(type: Jar, dependsOn:javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
- }
-
- artifacts {
- archives sourcesJar
- archives javadocJar
- }
+task sourcesJar(type: Jar, dependsOn:classes) {
+ classifier = 'sources'
+ from sourceSets.main.allSource
+}
- javadoc.doFirst { println "" }
+task javadocJar(type: Jar, dependsOn:javadoc) {
+ classifier = 'javadoc'
+ from javadoc.destinationDir
}
-task aggregateJavadoc(type: Javadoc) {
- description = 'Aggregate all subproject docs into a single docs directory'
- source subprojects.collect {project -> project.sourceSets.main.allJava }
- classpath = files(subprojects.collect {project -> project.sourceSets.main.compileClasspath})
- destinationDir = new File(projectDir, 'doc')
+javadoc.doFirst { println "" }
+
+artifacts {
+ archives sourcesJar
+ archives javadocJar
}
// Generate wrapper, which is distributed as part of source to alleviate the need of installing gradle
View
2 gradle/license.gradle
@@ -1,9 +1,7 @@
// Dependency for plugin was set in buildscript.gradle
-subprojects {
apply plugin: 'license' //nl.javadude.gradle.plugins.license.LicensePlugin
license {
header rootProject.file('codequality/HEADER')
ext.year = Calendar.getInstance().get(Calendar.YEAR)
}
-}
View
61 gradle/maven.gradle
@@ -1,43 +1,44 @@
// Maven side of things
-subprojects {
- apply plugin: 'maven' // Java plugin has to have been already applied for the conf2scope mappings to work
- apply plugin: 'signing'
+apply plugin: 'maven' // Java plugin has to have been already applied for the conf2scope mappings to work
+apply plugin: 'signing'
- signing {
- required { gradle.taskGraph.hasTask(uploadMavenCentral) }
- sign configurations.archives
- }
+signing {
+ required { gradle.taskGraph.hasTask(uploadMavenCentral) }
+ sign configurations.archives
+}
- /**
- * Publishing to Maven Central example provided from http://jedicoder.blogspot.com/2011/11/automated-gradle-project-deployment-to.html
- */
- task uploadMavenCentral(type:Upload, dependsOn: signArchives) {
- configuration = configurations.archives
- doFirst {
- repositories.mavenDeployer {
- beforeDeployment { org.gradle.api.artifacts.maven.MavenDeployment deployment -> signing.signPom(deployment) }
+/**
+ * Publishing to Maven Central example provided from http://jedicoder.blogspot.com/2011/11/automated-gradle-project-deployment-to.html
+ * artifactory will execute uploadArchives to force generation of ivy.xml, and we don't want that to trigger an upload to maven
+ * central, so using custom upload task.
+ */
+task uploadMavenCentral(type:Upload, dependsOn: signArchives) {
+ configuration = configurations.archives
+ doFirst {
+ repositories.mavenDeployer {
+ beforeDeployment { org.gradle.api.artifacts.maven.MavenDeployment deployment -> signing.signPom(deployment) }
- // To test deployment locally, use the following instead of oss.sonatype.org
- //repository(url: "file://localhost/${rootProject.rootDir}/repo")
+ // To test deployment locally, use the following instead of oss.sonatype.org
+ //repository(url: "file://localhost/${rootProject.rootDir}/repo")
- repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2') {
- authentication(userName: rootProject.sonatypeUsername, password: rootProject.sonatypePassword)
- }
+ repository(url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2') {
+ authentication(userName: rootProject.sonatypeUsername, password: rootProject.sonatypePassword)
+ }
- // Prevent datastamp from being appending to artifacts during deployment
- uniqueVersion = false
+ // Prevent datastamp from being appending to artifacts during deployment
+ uniqueVersion = false
- // Closure to configure all the POM with extra info, common to all projects
- pom.project {
- licenses {
- license {
- name 'The Apache Software License, Version 2.0'
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
- distribution 'repo'
- }
+ // Closure to configure all the POM with extra info, common to all projects
+ pom.project {
+ licenses {
+ license {
+ name 'The Apache Software License, Version 2.0'
+ url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ distribution 'repo'
}
}
}
}
}
}
+
View
21 gradle/release.gradle
@@ -7,8 +7,7 @@ task release(overwrite: true, dependsOn: commitNewVersion) << {
commitNewVersion.dependsOn updateVersion
updateVersion.dependsOn createReleaseTag
createReleaseTag.dependsOn preTagCommit
-def buildTasks = tasks.matching { it.name =~ /:build/ }
-preTagCommit.dependsOn buildTasks
+preTagCommit.dependsOn build
preTagCommit.dependsOn checkSnapshotDependencies
//checkSnapshotDependencies.dependsOn confirmReleaseVersion // Introduced in 1.0, forces readLine
//confirmReleaseVersion.dependsOn unSnapshotVersion
@@ -24,9 +23,9 @@ task uploadArtifactory(type: GradleBuild) {
startParameter.getExcludedTaskNames().add('check')
tasks = [ 'build', 'artifactoryPublish' ]
}
-
task releaseArtifactory(dependsOn: [checkSnapshotDependencies, uploadArtifactory])
+
task buildWithArtifactory(type: GradleBuild) {
startParameter = project.gradle.startParameter.newInstance()
startParameter.addInitScript( file('gradle/netflix-oss.gradle') )
@@ -35,21 +34,19 @@ task buildWithArtifactory(type: GradleBuild) {
}
// Ensure upload happens before taggging but after all pre-checks
-//releaseArtifactory.dependsOn checkSnapshotDependencies
+releaseArtifactory.dependsOn checkSnapshotDependencies
createReleaseTag.dependsOn releaseArtifactory
gradle.taskGraph.whenReady { taskGraph ->
if ( taskGraph.hasTask(uploadArtifactory) && rootProject.status == 'release' && !taskGraph.hasTask(':release') ) {
- throw new GradleException('Project has to be release status releasing to Artifactory')
+ throw new GradleException('"release" task has to be run before uploading a release to Artifactory')
}
}
-subprojects.each { project ->
- project.uploadMavenCentral.dependsOn rootProject.checkSnapshotDependencies
- rootProject.createReleaseTag.dependsOn project.uploadMavenCentral
- gradle.taskGraph.whenReady { taskGraph ->
- if ( taskGraph.hasTask(project.uploadMavenCentral) && !taskGraph.hasTask(':release') ) {
- throw new GradleException('"release" task has to be run before uploading to Maven Central')
- }
+project.uploadMavenCentral.dependsOn rootProject.checkSnapshotDependencies
+rootProject.createReleaseTag.dependsOn project.uploadMavenCentral
+gradle.taskGraph.whenReady { taskGraph ->
+ if ( taskGraph.hasTask(project.uploadMavenCentral) && !taskGraph.hasTask(':release') ) {
+ throw new GradleException('"release" task has to be run before uploading to Maven Central')
}
}
View
BIN gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
View
180 gradlew.bat
@@ -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
View
1 settings.gradle
@@ -0,0 +1 @@
+rootProject.name='astyanax'

0 comments on commit 9013658

Please sign in to comment.
Something went wrong with that request. Please try again.