Skip to content
Merged
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: 11 additions & 31 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,25 @@ name: CI

on:
push:
branches:
- master
branches: [ master ]
pull_request:
branches:
- master
branches: [ master ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17, 21 ]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.2.2

- uses: gradle/wrapper-validation-action@v1

- uses: actions/setup-java@v2
- uses: actions/setup-java@v4.7.1
with:
distribution: zulu
java-version: 8

- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Build with Gradle
run: ./gradlew build
java-version: ${{ matrix.java }}

- name: Publish to GitHub Packages with Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew publishAllPublicationsToGitHubPackagesRepository
- uses: gradle/actions/setup-gradle@v4.4.0

- name: Cleanup Gradle cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- run: ./gradlew build --warning-mode all
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ emotionml-checker-java Changelog
[Unreleased]
------------

### Added

- Testing on Java 17, 21

### Removed

- Testing on Java 8, 11
- Snapshot hosting on GitHub Packages

### Changed

- Build with Gradle v8.14.1
- Upgraded dependencies
- Upgraded GitHub Actions

[v1.2.2] (2022-01-16)
-------------------

Expand Down
81 changes: 1 addition & 80 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,89 +2,10 @@ emotionml-checker-java
======================

[![CI](https://github.com/marytts/emotionml-checker-java/actions/workflows/main.yml/badge.svg)](https://github.com/marytts/emotionml-checker-java/actions/workflows/main.yml)
[![Maven Central](https://maven-badges.sml.io/sonatype-central/de.dfki.mary/emotionml-checker-java/badge.svg)](https://central.sonatype.com/artifact/de.dfki.mary/emotionml-checker-java)

A generic implementation of EmotionML checks, in Java.

Dependency resolution
---------------------

### Releases

As of v1.2.1, release artifacts for this component is available via Maven Central.

#### Gradle

Add this to your `build.gradle`:

```gradle
repositories {
mavenCentral()
}

dependencies {
implementation group: 'de.dfki.mary', name: 'emotionml-checker-java', version: '1.2.1'
}
```

#### Maven

Add this to your `pom.xml`:

```xml
<dependency>
<groupId>de.dfki.mary</groupId>
<artifactId>emotionml-checker-java</artifactId>
<version>1.2.1</version>
</dependency>
```

### Snapshots

Snapshot releases are hosted via GitHub Packages.

Ensure you have a valid GitHub personal access token with `read:packages` scope.

#### Gradle

Configure your GitHub username and token as Gradle properties `GitHubPackagesUsername` and `GitHubPackagesPassword`, respectively.

Then, add this to your `build.gradle`:

```gradle
repositories {
exclusiveContent {
forRepository {
maven {
name 'GitHubPackages'
url 'https://maven.pkg.github.com/marytts/emotionml-checker-java'
credentials PasswordCredentials
}
}
filter {
includeModule 'de.dfki.mary', 'emotionml-checker-java'
}
}
}

dependencies {
implementation group: 'de.dfki.mary', name: 'emotionml-checker-java', version: '1.3-SNAPSHOT'
}
```

#### Maven

Configure your Maven `settings.xml` to [authenticate to GitHub Packages](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry).

Then, add this to your `pom.xml`:

```xml
<dependency>
<groupId>de.dfki.mary</groupId>
<artifactId>emotionml-checker-java</artifactId>
<version>1.3-SNAPSHOT</version>
</dependency>
```

Building
--------

Expand Down
35 changes: 12 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
plugins {
id 'java-library'
id 'application'
id 'maven-publish'
id 'signing'
id 'maven-publish'
}

group 'de.dfki.mary'
version '1.3-SNAPSHOT'
description 'A generic implementation of EmotionML checks, in Java'

ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
group = 'de.dfki.mary'
version = '1.3-SNAPSHOT'
description = 'A generic implementation of EmotionML checks, in Java'

repositories {
mavenCentral()
}

dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
testCompileOnly 'junit:junit:4.13.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
testImplementation libs.junit.jupiter
testCompileOnly libs.junit
testRuntimeOnly libs.junit.vintage.engine
}

java {
Expand Down Expand Up @@ -78,24 +76,15 @@ publishing {
}
repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/$System.env.GITHUB_REPOSITORY"
credentials {
username = System.env.GITHUB_ACTOR
password = System.env.GITHUB_TOKEN
}
}
if (isReleaseVersion) {
maven {
name = 'OSSRH'
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials(PasswordCredentials)
}
url = layout.buildDirectory.dir('repo')
}
}
}

signing {
required { isReleaseVersion }
sign publishing.publications.mavenJava
}

tasks.withType(Sign).configureEach {
onlyIf { !version.endsWith("SNAPSHOT") }
}
8 changes: 8 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[versions]
junit = "4.13.2"
junit-jupiter = "5.8.2"

[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit-jupiter" }
junit-vintage-engine = { group = "org.junit.vintage", name = "junit-vintage-engine", version.ref = "junit-jupiter" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
47 changes: 32 additions & 15 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading