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
6 changes: 3 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
distribution: 'zulu'
java-version: '21'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
java-version: '21'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down
105 changes: 57 additions & 48 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,42 @@
plugins {
id "com.github.hierynomus.license" version "0.14.0"
plugins{
id 'java'
id 'jacoco'
id 'eclipse'
id 'application'
id 'base'
}
apply plugin: 'java'
apply plugin: 'base'
apply plugin: 'application'
apply plugin: 'eclipse'
apply plugin: 'jacoco'

import org.apache.tools.ant.filters.ReplaceTokens

mainClassName = 'org.jreliability.tester.ReliabilityTester'
group = 'org.jreliability'

/*
* define global parameters here, e.g. versions numbers of tools which need to be consistent for all subprojects
* they are all accesible via project.parametername e.g. project.opt4jJavaVersion to get the used java version for Opt4J
*/
ext{
jreliabilityJavaVersion = "21"
junitVersion = "5.10.2"
mockitoVersion = "5.10.0"
jacocoVersion = "0.8.11"
}

jacoco{
toolVersion = project.jacocoVersion
}


java {
withJavadocJar()
withSourcesJar()
sourceCompatibility = project.jreliabilityJavaVersion
targetCompatibility = project.jreliabilityJavaVersion
toolchain {
languageVersion.set(JavaLanguageVersion.of(project.jreliabilityJavaVersion))
}
}

/*
* Gets the version name from the latest Git tag
*/
Expand All @@ -32,20 +60,19 @@ ext {
dateISO = new Date().format("yyyy-MM-dd")
}

mainClassName = 'org.jreliability.tester.ReliabilityTester'
group = 'org.jreliability'

repositories {
mavenCentral()
}

dependencies {
compile group: 'net.sourceforge.collections', name: 'collections-generic', version: '4.01'
compile group: 'de.fosd.typechef', name: 'javabdd_repackaged', version: '1.0b2'
compile group: 'org.bitbucket.vahidi', name: 'jdd', version: '108'
compile files('lib/ptolemyplot-5.7.jar')
implementation group: 'net.sourceforge.collections', name: 'collections-generic', version: '4.01'
implementation group: 'com.github.com-github-javabdd', name: 'com.github.javabdd', version: '9.0.0'
implementation files('lib/ptolemyplot-5.7.jar')

testCompile 'junit:junit:4.12'
testImplementation platform(group: 'org.junit', name: 'junit-bom', version: project.junitVersion)
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter'
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: project.mockitoVersion
}

jar {
Expand All @@ -63,24 +90,17 @@ if (JavaVersion.current().isJava8Compatible()) {
}
}

license {
include "**/*.java"
header rootProject.file('utils/licenseHeader')
headerDefinitions {
custom_definition {
firstLine = "/*******************************************************************************"
endLine = " *******************************************************************************/"
beforeEachLine = " * "
firstLineDetectionPattern = "/*"
lastLineDetectionPattern = " *"
allowBlankLines = false
isMultiline = true
}
}
mapping {
java='custom_definition'
}
strictCheck true
test {
// Enable JUnit 5 (Gradle 4.6+).
useJUnitPlatform()

// Always run tests, even when nothing changed.
dependsOn 'cleanTest'

// Show test results.
testLogging {
events "passed", "skipped", "failed"
}
}

jacocoTestCoverageVerification {
Expand All @@ -91,11 +111,11 @@ jacocoTestReport {
dependsOn jacocoTestCoverageVerification

reports {
html.enabled true
html.required = true
html.destination(file("${buildDir}/reports/jacoco"))
xml.enabled = true
xml.required = true
xml.destination(file("${buildDir}/reports/jacoco/report.xml"))
csv.enabled = true
csv.required = true
csv.destination(file("${buildDir}/reports/jacoco/report.csv"))
}

Expand All @@ -114,17 +134,6 @@ jacocoTestReport {
}
}


task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

artifacts {
archives sourcesJar
archives javadocJar
Expand All @@ -134,7 +143,7 @@ task alldocs(type: Javadoc, dependsOn: javadoc) {
title = "JReliability version $version Project API Documentation"
destinationDir = new File(project.buildDir, 'docs/javadoc')
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PUBLIC
options.links 'https://docs.oracle.com/en/java/javase/12/docs/api/'
options.links "https://docs.oracle.com/en/java/javase/${jreliabilityJavaVersion}/docs/api/"
options.linkSource = true
}

Expand Down
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-6.6.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading