Skip to content

Commit

Permalink
Fix hangup during recording (#31)
Browse files Browse the repository at this point in the history
* Added null check in `addRecordingResult` to prevent error if a hang-up occurs during recording.

* Formatted rivr.js.

* Fixed Javadoc

* Upgraded gradle wrapper to version 7.6.

* Changed version to 1.0.13.
Updated gradle.build files for gradle 7.6 and added `maven-publish` plugin.

* changes.md: Added changes for 1.0.13.
  • Loading branch information
gawi committed Feb 14, 2023
1 parent 00df3ff commit 4fbed3f
Show file tree
Hide file tree
Showing 14 changed files with 352 additions and 275 deletions.
158 changes: 74 additions & 84 deletions build.gradle
@@ -1,12 +1,12 @@
group = "com.nuecho"
version = "1.0.12"
version = "1.0.13"

// Configure the java projects release.

def javaProjects = [project(':rivr-core'), project(':rivr-voicexml')]

configure(javaProjects) {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'checkstyle'

Expand All @@ -15,16 +15,18 @@ configure(javaProjects) {
}

checkstyle.configFile = rootProject.file('checkstyle/checkstyle.xml')
sourceCompatibility = '1.6'
targetCompatibility = '1.6'
sourceCompatibility = '8'
targetCompatibility = '8'

// Fix for Unable to get class information
// Fix for "Unable to get class information" message in checkstyle
checkstyleMain {
classpath += configurations.compile
classpath += configurations.implementation
classpath += configurations.api
}

checkstyleTest {
classpath += configurations.compile
classpath += configurations.implementation
classpath += configurations.api
}

eclipse {
Expand All @@ -34,106 +36,96 @@ configure(javaProjects) {
}
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")
}
}

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
}

// Maven central release use the "old" uploadArchives mechanism since maven-publish doesn't support signing yet.
artifacts {
archives javadocJar
archives sourcesJar
}
}

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()
}
def mavenProjects = ['rivr-core', 'rivr-voicexml', 'rivr-voicexml-dialogue-runner']

signing {
required {
gradle.taskGraph.hasTask("uploadArchives") // Only sign during release.
}
sign configurations.archives
}
if (project.name in mavenProjects) {
apply plugin: 'maven-publish'
apply plugin: 'signing'

uploadArchives {
repositories {
mavenDeployer {
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)
}
}
mavenCentral()
}

beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment)
}
publishing {
publications {
maven(MavenPublication) {
groupId = 'com.nuecho'
artifactId = project.name
version = rootProject.version

// 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 {
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 = 'https://github.com/nuecho/rivr'

scm {
url = 'scm:git@github.com:nuecho/rivr.git'
connection = 'scm:git@github.com:nuecho/rivr.git'
developerConnection = 'scm:git@github.com:nuecho/rivr.git'
}

// 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 'https://github.com/nuecho/rivr'

scm {
url 'scm:git@github.com:nuecho/rivr.git'
connection 'scm:git@github.com:nuecho/rivr.git'
developerConnection 'scm:git@github.com: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'
}
}

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 = 'rivr-support@nuecho.com'
}
}
}

developers {
developer {
id 'nuecho'
name 'Nu Echo inc.'
email 'rivr-support@nuecho.com'
}
}
if (rootProject.hasProperty('sonatypeUsername') && rootProject.hasProperty('sonatypePassword')) {
repositories {
maven {
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username sonatypeUsername
password sonatypePassword
}
}
}
}
}

signing {
required {
gradle.taskGraph.hasTask("uploadArchives") // Only sign during release.
}
sign(publishing.publications["maven"])
}
}
}

configure(javaProjects) {
uploadArchives {
repositories {
mavenDeployer {
pom.project {
packaging 'jar'
}
java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications {
maven(MavenPublication) {
from project.components.java
}
}
}
Expand All @@ -157,8 +149,6 @@ task globalJavadoc(type: Javadoc, dependsOn: prepareJavadoc ) {
project -> project.sourceSets.main.compileClasspath}
)

// To use Java 7 Javadoc:
// gradlew -DjavadocExecutable=/opt/java/java-7/bin/javadoc globalJavadoc
if(System.getProperty("javadocExecutable") != null) {
executable = System.getProperty("javadocExecutable")
}
Expand All @@ -168,7 +158,7 @@ task globalJavadoc(type: Javadoc, dependsOn: prepareJavadoc ) {
linkSource true
windowTitle "Rivr API documentation"
docTitle "Rivr documentation ($project.version)"
bottom 'Copyright &copy; 2019 <a href="https://www.nuecho.com">Nu Echo Inc.</a>.'
bottom 'Copyright &copy; 2023 <a href="https://www.nuecho.com">Nu Echo Inc.</a>.'
use = true
noTimestamp = true
group("Rivr Core Packages", "com.nuecho.rivr.core*")
Expand All @@ -191,4 +181,4 @@ void createVersionFile(File resourceDir, String fileName) {
writer.write(version)
writer.write("\n")
writer.close()
}
}
38 changes: 38 additions & 0 deletions changes.md
@@ -1,5 +1,43 @@
# Rivr change log

## Version 1.0.13:

### Rivr core

#### Changed

* Code compiled for Java 8+.

#### Added

* (nothing)

#### Removed

* (nothing)

#### Fixed

* (nothing)

### Rivr VoiceXML

#### Changed

* Code compiled for Java 8+.

#### Added

* (nothing)

#### Removed

* (nothing)

#### Fixed

* Fixed problem with hangup during recording. In `rivr.js`, the `addRecordingResult` was raising an error when the `record$` variable is null or undefined. A null check was added.

## Version 1.0.12:

### Rivr core
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 4fbed3f

Please sign in to comment.