-
Notifications
You must be signed in to change notification settings - Fork 22
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
Pascal Gélinas
committed
Dec 2, 2013
1 parent
6abb08b
commit 8edfbf3
Showing
3 changed files
with
274 additions
and
247 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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Definition of a custom attribute that reverse binary attribute | ||
[attr]textfile text diff merge | ||
|
||
# Declare files as binary by default preventing potential problematic end-of-line conversion | ||
* binary | ||
|
||
# Declare files that will always have native line endings on checkout. | ||
*.checkstyle textfile | ||
*.css textfile | ||
*.gitattributes textfile | ||
*.gitignore textfile | ||
*.gradle textfile | ||
*.java textfile | ||
*.js textfile | ||
*.json textfile | ||
*.MF textfile | ||
*.md textfile | ||
*.properties textfile | ||
*.txt textfile | ||
|
||
# Declare files that will always have LF line endings on checkout. | ||
*.sh textfile eol=lf | ||
gradlew textfile eol=lf | ||
|
||
# Declare files that will always have CRLF line endings on checkout. | ||
*.bat textfile eol=crlf | ||
*.cmd textfile eol=crlf |
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,158 +1,158 @@ | ||
group = "com.nuecho" | ||
version = "1.0.0" | ||
|
||
subprojects { | ||
apply plugin: 'eclipse' | ||
apply plugin: 'ivy-publish' // ivy publishing is for fallback if maven doesn't work. | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
group = rootProject.group | ||
version = rootProject.version | ||
|
||
repositories { mavenCentral() } | ||
|
||
signing { | ||
required { gradle.taskGraph.hasTask("uploadArchives") } // Only sign during release. | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer(name: 'mavenCentral') { | ||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
// Add credentials only if they are present in the project. | ||
// Avoid build failure if not trying to release and user doesn't have proper credentials. | ||
if(project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')){ | ||
authentication(userName: sonatypeUsername, password: sonatypePassword) | ||
} | ||
} | ||
|
||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
// All these are required for maven central release. | ||
// See https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-6.CentralSyncRequirement | ||
pom.project { | ||
name 'rivr' | ||
description 'Rivr is a lightweight open-source dialogue engine enabling flexible VoiceXML web application development for the agile Java developer and enterprise.' | ||
url 'http://rivr.nuecho.com/' | ||
|
||
scm { | ||
url 'scm:[email protected]:nuecho/rivr.git' | ||
connection 'scm:[email protected]:nuecho/rivr.git' | ||
developerConnection 'scm:[email protected]:nuecho/rivr.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.html' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'nuecho' | ||
name 'Nu Echo inc.' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
// Configure the java projects release. | ||
|
||
def javaProjects = [project(':rivr-core'), project(':rivr-voicexml')] | ||
|
||
configure(javaProjects) { | ||
apply plugin: 'java' | ||
apply plugin: 'checkstyle' | ||
|
||
dependencies { checkstyle 'com.puppycrawl.tools:checkstyle:5.5' } | ||
|
||
checkstyle.configFile = rootProject.file('checkstyle/checkstyle.xml') | ||
sourceCompatibility = '1.6' | ||
|
||
// Fix for Unable to get class information | ||
checkstyleMain { classpath += configurations.compile } | ||
checkstyleTest { classpath += configurations.compile } | ||
|
||
task sourcesJar(type: Jar) { | ||
from sourceSets.main.java | ||
classifier 'sources' | ||
} | ||
|
||
// Required for Maven central | ||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
eclipse { | ||
project { | ||
natures 'net.sf.eclipsecs.core.CheckstyleNature' | ||
buildCommand 'net.sf.eclipsecs.core.CheckstyleBuilder' | ||
} | ||
classpath { | ||
defaultOutputDir = file("${project.projectDir}/build/classes") | ||
// This should probably be submitted as a patch to the eclipse plugin. | ||
containers.clear() | ||
containers.add("org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6") | ||
} | ||
} | ||
|
||
|
||
// Maven central release use the "old" uploadArchives mechanism since maven-publish doesn't support signing yet. | ||
artifacts { | ||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
|
||
artifacts { archives jar } | ||
|
||
uploadArchives{ | ||
repositories { | ||
mavenCentral{ | ||
pom.project{ packaging 'jar' } | ||
} | ||
} | ||
} | ||
} | ||
|
||
task globalJavadoc(type: Javadoc) { | ||
source javaProjects.collect {project -> project.sourceSets.main.allJava } | ||
destinationDir = new File(buildDir, 'javadoc') | ||
classpath = files(javaProjects.collect {project -> project.sourceSets.main.compileClasspath}) | ||
|
||
// To use Java 7 Javadoc: | ||
// gradlew -DjavadocExecutable=/usr/java/jdk7/bin/javadoc globalJavadoc | ||
if(System.getProperty("javadocExecutable") != null) { | ||
executable = System.getProperty("javadocExecutable") | ||
} | ||
|
||
configure(options) { | ||
splitIndex true | ||
linkSource true | ||
windowTitle "Rivr API documentation" | ||
docTitle "Rivr documentation ($project.version)" | ||
bottom 'Copyright © 2013 <a href="http://www.nuecho.com">Nu Echo Inc.</a>.' | ||
use = true | ||
noTimestamp = true | ||
group("Rivr Core Packages", "com.nuecho.rivr.core*") | ||
group("Rivr VoiceXML Packages", "com.nuecho.rivr.voicexml*") | ||
footer "To report errors, inconsistencies and omissions in the Rivr API documentation, please <a href=\"https://github.com/nuecho/rivr/issues/new\" target=\"_blank\">open an issue</a>." | ||
links "http://download.oracle.com/javase/6/docs/api/" | ||
links "http://download.oracle.com/javaee/6/api/" | ||
links "http://slf4j.org/api/" | ||
links "https://json-processing-spec.java.net/nonav/releases/1.0/fcs/javadocs/" | ||
setOverview("${projectDir}/doc/javadoc-extra/overview.html") | ||
stylesheetFile = new File( projectDir, 'doc/javadoc-extra/rivr-javadoc.css' ) | ||
docTitle "<a href=\"http://rivr.nuecho.com/\" target=\"_blank\"><img src=\"http://rivr.nuecho.com/img/logo.png\" /></a><br/>API documentation of <a href=\"http://rivr.nuecho.com/\" target=\"_blank\">Rivr</a> $project.version" | ||
} | ||
} | ||
|
||
group = "com.nuecho" | ||
version = "1.0.0" | ||
|
||
subprojects { | ||
apply plugin: 'eclipse' | ||
apply plugin: 'ivy-publish' // ivy publishing is for fallback if maven doesn't work. | ||
apply plugin: 'maven' | ||
apply plugin: 'signing' | ||
|
||
group = rootProject.group | ||
version = rootProject.version | ||
|
||
repositories { mavenCentral() } | ||
|
||
signing { | ||
required { gradle.taskGraph.hasTask("uploadArchives") } // Only sign during release. | ||
sign configurations.archives | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer(name: 'mavenCentral') { | ||
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") { | ||
// Add credentials only if they are present in the project. | ||
// Avoid build failure if not trying to release and user doesn't have proper credentials. | ||
if(project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')){ | ||
authentication(userName: sonatypeUsername, password: sonatypePassword) | ||
} | ||
} | ||
|
||
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } | ||
|
||
// All these are required for maven central release. | ||
// See https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-6.CentralSyncRequirement | ||
pom.project { | ||
name 'rivr' | ||
description 'Rivr is a lightweight open-source dialogue engine enabling flexible VoiceXML web application development for the agile Java developer and enterprise.' | ||
url 'http://rivr.nuecho.com/' | ||
|
||
scm { | ||
url 'scm:[email protected]:nuecho/rivr.git' | ||
connection 'scm:[email protected]:nuecho/rivr.git' | ||
developerConnection 'scm:[email protected]:nuecho/rivr.git' | ||
} | ||
|
||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.html' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id 'nuecho' | ||
name 'Nu Echo inc.' | ||
email '[email protected]' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
// Configure the java projects release. | ||
|
||
def javaProjects = [project(':rivr-core'), project(':rivr-voicexml')] | ||
|
||
configure(javaProjects) { | ||
apply plugin: 'java' | ||
apply plugin: 'checkstyle' | ||
|
||
dependencies { checkstyle 'com.puppycrawl.tools:checkstyle:5.5' } | ||
|
||
checkstyle.configFile = rootProject.file('checkstyle/checkstyle.xml') | ||
sourceCompatibility = '1.6' | ||
|
||
// Fix for Unable to get class information | ||
checkstyleMain { classpath += configurations.compile } | ||
checkstyleTest { classpath += configurations.compile } | ||
|
||
task sourcesJar(type: Jar) { | ||
from sourceSets.main.java | ||
classifier 'sources' | ||
} | ||
|
||
// Required for Maven central | ||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
classifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
eclipse { | ||
project { | ||
natures 'net.sf.eclipsecs.core.CheckstyleNature' | ||
buildCommand 'net.sf.eclipsecs.core.CheckstyleBuilder' | ||
} | ||
classpath { | ||
defaultOutputDir = file("${project.projectDir}/build/classes") | ||
// This should probably be submitted as a patch to the eclipse plugin. | ||
containers.clear() | ||
containers.add("org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6") | ||
} | ||
} | ||
|
||
|
||
// Maven central release use the "old" uploadArchives mechanism since maven-publish doesn't support signing yet. | ||
artifacts { | ||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
|
||
artifacts { archives jar } | ||
|
||
uploadArchives{ | ||
repositories { | ||
mavenCentral{ | ||
pom.project{ packaging 'jar' } | ||
} | ||
} | ||
} | ||
} | ||
|
||
task globalJavadoc(type: Javadoc) { | ||
source javaProjects.collect {project -> project.sourceSets.main.allJava } | ||
destinationDir = new File(buildDir, 'javadoc') | ||
classpath = files(javaProjects.collect {project -> project.sourceSets.main.compileClasspath}) | ||
|
||
// To use Java 7 Javadoc: | ||
// gradlew -DjavadocExecutable=/usr/java/jdk7/bin/javadoc globalJavadoc | ||
if(System.getProperty("javadocExecutable") != null) { | ||
executable = System.getProperty("javadocExecutable") | ||
} | ||
|
||
configure(options) { | ||
splitIndex true | ||
linkSource true | ||
windowTitle "Rivr API documentation" | ||
docTitle "Rivr documentation ($project.version)" | ||
bottom 'Copyright © 2013 <a href="http://www.nuecho.com">Nu Echo Inc.</a>.' | ||
use = true | ||
noTimestamp = true | ||
group("Rivr Core Packages", "com.nuecho.rivr.core*") | ||
group("Rivr VoiceXML Packages", "com.nuecho.rivr.voicexml*") | ||
footer "To report errors, inconsistencies and omissions in the Rivr API documentation, please <a href=\"https://github.com/nuecho/rivr/issues/new\" target=\"_blank\">open an issue</a>." | ||
links "http://download.oracle.com/javase/6/docs/api/" | ||
links "http://download.oracle.com/javaee/6/api/" | ||
links "http://slf4j.org/api/" | ||
links "https://json-processing-spec.java.net/nonav/releases/1.0/fcs/javadocs/" | ||
setOverview("${projectDir}/doc/javadoc-extra/overview.html") | ||
stylesheetFile = new File( projectDir, 'doc/javadoc-extra/rivr-javadoc.css' ) | ||
docTitle "<a href=\"http://rivr.nuecho.com/\" target=\"_blank\"><img src=\"http://rivr.nuecho.com/img/logo.png\" /></a><br/>API documentation of <a href=\"http://rivr.nuecho.com/\" target=\"_blank\">Rivr</a> $project.version" | ||
} | ||
} | ||
|
||
task wrapper(type: Wrapper) { gradleVersion = '1.9' } |
Oops, something went wrong.