Skip to content

Commit 5b1cbf5

Browse files
authored
Merge pull request #43 from JeffersonLab/evio-6-dev
Change from maven to gradle, bump version number, update jars
2 parents 2651cdf + 72d7e14 commit 5b1cbf5

17 files changed

Lines changed: 464 additions & 181 deletions

.github/workflows/c_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout code
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v5
1212

1313
- name: Install dependencies
1414
run: sudo apt-get update && sudo apt-get install -y cmake build-essential libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev liblz4-dev doxygen

.github/workflows/doc_generation-6.0.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,12 @@ jobs:
2929
working-directory: '.'
3030
doxyfile-path: 'doc/doxygen/DoxyfileCC'
3131

32-
- name: Install Maven
33-
run: |
34-
sudo apt-get update
35-
sudo apt-get install -y maven
32+
# Setup gradle and build Java
33+
- name: Setup Gradle
34+
uses: gradle/actions/setup-gradle@v3
35+
36+
- name: Build with Gradle
37+
run: ./gradlew build
3638

3739
# generate the javadoc files
3840
- name: Set up JDK 17
@@ -41,7 +43,7 @@ jobs:
4143
java-version: '17'
4244
distribution: 'temurin'
4345
- name: Javadoc Action
44-
run: mvn javadoc:javadoc
46+
run: ./gradlew javadoc
4547

4648
# clean up the javadoc files including removing timestamps. OPTIONAL.
4749
- name: Tidy up the javadocs

.github/workflows/java_tests.yml

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,25 @@ jobs:
88
java_test:
99
name: Run JUnit Tests
1010
runs-on: ubuntu-latest
11-
container:
12-
image: maven:3.9-eclipse-temurin-17-alpine
1311

1412
steps:
1513
- name: Check out code
16-
uses: actions/checkout@v3
14+
uses: actions/checkout@v5
1715

18-
# Uncomment to set up Java and Maven manually, if desired
19-
# # (and probably comment out the container image above)
20-
# - name: Set up JDK 17
21-
# uses: actions/setup-java@v3
22-
# with:
23-
# distribution: temurin
24-
# java-version: 17
25-
# Install maven by hand (if not in container image)
26-
# - name: Maven Setup
27-
# run: sudo apt-get update && apt-get install -y maven
16+
- name: Set up JDK 17
17+
uses: actions/setup-java@v3
18+
with:
19+
distribution: temurin
20+
java-version: 17
2821

22+
# Setup gradle and build Java
23+
- name: Setup Gradle
24+
uses: gradle/actions/setup-gradle@v3
25+
26+
- name: Build with Gradle
27+
run: ./gradlew build
28+
29+
# Run tests with Gradle
2930
- name: Build and run tests
30-
run: mvn --batch-mode test
31+
run: ./gradlew test
32+

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### VERSION DEFINITIONS ###
44
cmake_minimum_required(VERSION 3.22)
5-
project(evio VERSION 6.1.3 LANGUAGES C CXX)
5+
project(evio VERSION 6.2.0 LANGUAGES C CXX)
66
set(CMAKE_C_STANDARD 11)
77
set(CMAKE_CXX_STANDARD 20)
88
# C/C++ build options

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ libraries are typically system-specific (e.g. using a command like `yum`, `dbn`,
4949
## **Java Library**
5050

5151
The Java version of evio (internally `org.jlab.coda.jevio`) can also be used for reading & writing
52-
`.evio` format files. A "fat" jar file with all dependencies is included in the `java/jars` folder,
53-
which should be all most users need to run and execute Java code utilizing the evio library.
52+
`.evio` format files. A "fat" jar file with all dependencies is included in the `java/jars` folder,
53+
the only thing strictly required to run and execute `et` in Java.
5454

5555
Java 17 is the default version used, however the Java evio library should be compatible with all
5656
java versions 8 and higher (note this has not been rigorously tested). If one wants to create a
5757
new jar file for any reason (e.g. to modify Java versions), do:
5858

5959
git clone https://github.com/JeffersonLab/evio/
6060
cd evio
61-
mvn clean install
61+
./gradlew
6262

6363
### Prerequisites
6464

65-
Requires Maven (`mvn`) and an installation of Java on your system.
65+
Gradle and an installation of Java on your system.
6666

6767
**Running on "ifarm" at JLab will not work unless you install java yourself**. Note that the default java versions on the farm will be too old to
6868
work. See downloads from [OpenJDK](https://openjdk.org/install/) or [Oracle](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html).

build.gradle.kts

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/*
2+
* This file was generated by the Gradle 'init' task.
3+
*
4+
* This project uses @Incubating APIs which are subject to change.
5+
*/
6+
7+
plugins {
8+
`java-library`
9+
`maven-publish`
10+
// `com.github.spotbugs`
11+
id("com.gradleup.shadow") version "9.2.2"
12+
}
13+
14+
repositories {
15+
mavenLocal()
16+
maven {
17+
url = uri("https://repo.maven.apache.org/maven2/")
18+
}
19+
}
20+
21+
dependencies {
22+
api(libs.org.lz4.lz4.java)
23+
api(files("$projectDir/java/jars/disruptor-4.0.0.jar"))
24+
testImplementation(platform("org.junit:junit-bom:5.10.3")) // Makes sure JUnit dependencies below have matching versions
25+
testImplementation("org.junit.jupiter:junit-jupiter")
26+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
27+
}
28+
29+
group = "org.jlab.coda"
30+
version = "6.2.0"
31+
description = "Jefferson Lab EVIO Java Library (JEVIO)"
32+
java.sourceCompatibility = JavaVersion.VERSION_17
33+
java.targetCompatibility = JavaVersion.VERSION_17
34+
35+
defaultTasks("build")
36+
37+
publishing {
38+
publications.create<MavenPublication>("maven") {
39+
from(components["java"])
40+
}
41+
}
42+
43+
tasks.withType<JavaCompile>() {
44+
options.encoding = "UTF-8"
45+
}
46+
47+
tasks.withType<Javadoc>() {
48+
options.encoding = "UTF-8"
49+
}
50+
51+
tasks.test {
52+
useJUnitPlatform()
53+
failOnNoDiscoveredTests = false
54+
}
55+
56+
// spotbugs {
57+
// toolVersion.set("4.7.3")
58+
// effort.set(com.github.spotbugs.snom.Effort.MAX)
59+
// reportLevel.set(com.github.spotbugs.snom.ReportLevel.LOW)
60+
// excludeFilter.set(file("config/spotbugs/exclude.xml"))
61+
// }
0 Bytes
Binary file not shown.

gradle.properties

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file was generated by the Gradle 'init' task.
2+
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
3+
4+
org.gradle.configuration-cache=true
5+
org.gradle.parallel=true
6+
org.gradle.caching=true
7+

gradle/libs.versions.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file was generated by the Gradle 'init' task.
2+
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
3+
4+
[versions]
5+
com-lmax-disruptor = "4.0.0"
6+
org-junit-jupiter-junit-jupiter = "5.9.3"
7+
org-lz4-lz4-java = "1.8.0"
8+
9+
[libraries]
10+
com-lmax-disruptor = { module = "com.lmax:disruptor", version.ref = "com-lmax-disruptor" }
11+
org-junit-jupiter-junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "org-junit-jupiter-junit-jupiter" }
12+
org-lz4-lz4-java = { module = "org.lz4:lz4-java", version.ref = "org-lz4-lz4-java" }

gradle/wrapper/gradle-wrapper.jar

44.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)