Skip to content

Commit

Permalink
Merge pull request #147 from psibre/testing
Browse files Browse the repository at this point in the history
Upgradle
  • Loading branch information
psibre authored Oct 27, 2024
2 parents d0b7ca0 + 6be61f8 commit 0249433
Show file tree
Hide file tree
Showing 32 changed files with 443 additions and 352 deletions.
61 changes: 20 additions & 41 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: CI

on:
push:
Expand All @@ -14,57 +14,36 @@ jobs:
os:
- ubuntu-latest
- macos-latest
java-version:
java_version:
- 8
- 11
- 13
- 17
exclude:
- os: macos-latest
java_version: 8
- os: macos-latest
java_version: 13
java_version: 17
fail-fast: false
runs-on: ${{ matrix.os }}

steps:
# https://github.com/actions/checkout
- uses: actions/checkout@v2
- uses: actions/[email protected]

# https://github.com/gradle/wrapper-validation-action
- uses: gradle/wrapper-validation-action@v1

# https://github.com/actions/setup-java
- uses: actions/setup-java@v2
with:
distribution: adopt
java-version: ${{ matrix.java-version }}

# https://github.com/actions/cache
- name: Cache Gradle packages
uses: actions/cache@v2
- uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Install Linux prerequisites
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update
sudo apt -y install sox speech-tools
distribution: zulu
java-version: ${{ matrix.java_version }}

- name: Install macOS prerequisites
if: ${{ runner.os == 'macOS' }}
run: brew install speech-tools

- name: Build with Gradle
- if: runner.os == 'Linux'
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false
run: ./gradlew build
DEBIAN_FRONTEND: noninteractive
run: >
sudo apt-get -qq update &&
sudo apt-get -qq install sox speech-tools
- if: runner.os == 'macOS'
run: brew install sox speech-tools

- name: Cleanup Gradle Cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- uses: gradle/[email protected]
with:
arguments: build --warning-mode all
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Gradle MaryTTS voicebuilding plugin
- Plugin usage documented in readme
- Testing on OpenJDK 11 and 13

### Removed

- Support for Gradle versions older than v7.0

### Changed

- Migrate testing from Travis CI to GitHub Actions
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
```
For details, see https://plugins.gradle.org/plugin/de.dfki.mary.voicebuilding-legacy.

Note that Gradle v6.2 or higher is required.
Note that Gradle v7.0 or higher is required.

Prerequisites
-------------
Expand Down
57 changes: 34 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,49 @@ pluginBundle {
}

repositories {
jcenter()
gradlePluginPortal()
mavenCentral()
exclusiveContent {
forRepository {
maven {
name 'DFKI-MLT'
url 'https://raw.githubusercontent.com/DFKI-MLT/Maven-Repository/main'
}
}
filter {
includeGroup 'de.dfki.lt.jtok'
}
}
exclusiveContent {
forRepository {
gradlePluginPortal()
}
filter {
includeModule 'de.dfki.mary', 'gradle-marytts-component-plugin'
}
}
}

dependencies {
implementation localGroovy()
implementation group: 'de.dfki.mary', name: 'marytts-runtime', version: maryttsVersion, {
implementation group: 'de.dfki.mary', name: 'marytts-runtime', version: libs.versions.marytts.get(), {
exclude group: '*', module: 'groovy-all'
exclude group: '*', module: 'mwdumper'
exclude group: '*', module: 'sgt'
exclude group: 'com.twmacinta', module: 'fast-md5'
exclude group: 'gov.nist.math', module: 'Jampack'
}
implementation group: 'de.dfki.mary', name: 'gradle-marytts-component-plugin', version: '0.2.2'
implementation group: 'org.m2ci.msp', name: 'gradle-praat-wrapper-plugin', version: '0.6'
implementation group: 'org.m2ci.msp', name: 'jtgt', version: '0.6.1'
testImplementation group: 'org.testng', name: 'testng', version: '7.0.0'
implementation group: 'de.dfki.mary', name: 'gradle-marytts-component-plugin', version: '0.3.2'
implementation group: 'io.github.m2ci-msp', name: 'gradle-praat-wrapper-plugin', version: '0.7.0'
implementation group: 'io.github.m2ci-msp', name: 'jtgt', version: '0.7.0'
testImplementation group: 'org.testng', name: 'testng', version: '7.5.1'
testImplementation group: 'xmlunit', name: 'xmlunit', version: '1.6'
}

java {
withSourcesJar()
}

processResources {
doLast {
file("$destinationDir/maryttsVersion.txt").text = maryttsVersion
file("$destinationDir/maryttsVersion.txt").text = libs.versions.marytts.get()
}
}

Expand All @@ -94,25 +116,14 @@ test {
}
}
failFast = true
doFirst {
// path to shared testkit gradle home
systemProperty 'testProjectDir', temporaryDir
// dynamic marytts version
systemProperty 'maryVersion', maryttsVersion
}
}

task sourceJar(type: Jar) {
from sourceSets.main.allJava
systemProperty 'java.io.tmpdir', temporaryDir
systemProperty 'maryVersion', libs.versions.marytts.get()
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar {
classifier 'sources'
}
}
}
repositories {
Expand Down
1 change: 0 additions & 1 deletion gradle.properties

This file was deleted.

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 0249433

Please sign in to comment.