Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 26 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,18 @@ allprojects() {

subprojects() {
apply plugin: 'java'
apply plugin: 'maven'

uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
}
}
}
apply plugin: 'maven-publish'



repositories() {
mavenCentral()
}

compileJava.options.encoding = 'UTF-8'
javadoc.options.encoding = 'UTF-8'
sourceCompatibility = 1.7
targetCompatibility = 1.7
sourceCompatibility = 11
targetCompatibility = 11

task javadocJar(type: Jar) {
classifier = 'javadoc'
Expand All @@ -48,5 +37,26 @@ subprojects() {
from sourceSets.main.allSource
}

publishing {
repositories {
maven {
url = uri("${rootProject.projectDir}/maven-repo")
}
}
}

// uploadArchives {
// repositories {
// mavenDeployer {
// repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
// authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
// }
// snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
// authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
// }
// }
// }
// }

artifacts.archives packageSources, javadocJar
}
14 changes: 8 additions & 6 deletions sphinx4-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
description = 'Sphinx4 core'

dependencies {
compile project(':sphinx4-data')

compile group: 'org.apache.commons', name: 'commons-math3', version:'3.2'

testCompile group: 'org.testng', name: 'testng', version:'6.8.8'
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version:'1.3'
implementation project(':sphinx4-data')
implementation('org.apache.commons:commons-math3:3.6.1')
// xml lib was removed from jdk11
implementation("jakarta.xml.bind:jakarta.xml.bind-api:4.0.0")
implementation("com.sun.xml.bind:jaxb-impl:4.0.0")

testImplementation("org.testng:testing:7.6.1")
testImplementation('org.hamcrest:hamcrest-library:2.2')
}

test.useTestNG()
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
import java.util.Iterator;
import java.util.List;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlMixed;
import javax.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.annotation.XmlAttribute;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlMixed;
import jakarta.xml.bind.annotation.XmlRootElement;

import edu.cmu.sphinx.fst.Fst;
import edu.cmu.sphinx.fst.semiring.Semiring;
Expand Down
6 changes: 3 additions & 3 deletions sphinx4-samples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
description = 'Sphinx4 demo applications'

dependencies {
compile project(':sphinx4-core')
compile project(':sphinx4-data')
implementation project(':sphinx4-core')
implementation project(':sphinx4-data')
}

jar {
from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
from configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}