Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile with Java 11 and update to gradle 8.4 #96

Open
wants to merge 13 commits into
base: gradle-build-java-11
Choose a base branch
from
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Gradle Package

on:
push:
branches: [ gradle-build ]
branches: [ gradle-build-java-11 ]

pull_request:
branches: [ gradle-build ]
branches: [ gradle-build-java-11 ]
workflow_dispatch:


Expand All @@ -28,7 +28,7 @@ jobs:
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: 'temurin'
cache: gradle

Expand Down
335 changes: 107 additions & 228 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion jpf-core
Submodule jpf-core updated 262 files
45 changes: 26 additions & 19 deletions jpf-symbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ def getCurrentVersion() {

version = currentVersion

sourceCompatibility = 1.8
targetCompatibility = 1.8
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}

repositories {
mavenCentral()
Expand Down Expand Up @@ -59,6 +61,11 @@ dependencies {

}

compileTestJava.dependsOn copyResources
compileExamplesJava.dependsOn copyResources
compilePeersJava.dependsOn copyResources
compileClassesJava.dependsOn copyResources

task compile {
group = "SPF Build"
description = "Compiles all JPF symbc sources."
Expand All @@ -71,34 +78,34 @@ task compile {
}

task createJpfClassesJar(type: Jar) {
archiveName = "jpf-symbc-classes.jar"
destinationDir = file("${buildDir}")
archiveFileName = "jpf-symbc-classes.jar"
destinationDirectory = file("${buildDir}")

group = "SPF Jars"
description = "Creates the ${archiveName} file."
description = "Creates the ${archiveFileName} file."

dependsOn compile
dependsOn copyResources

from sourceSets.main.java.outputDir
from sourceSets.annotations.java.outputDir
from sourceSets.classes.java.outputDir
from sourceSets.main.output.classesDirs
from sourceSets.annotations.output.classesDirs
from sourceSets.classes.output.classesDirs
}

task createJpfJar(type: Jar) {
archiveName = "jpf-symbc.jar"
destinationDir = file("${buildDir}")
archiveFileName = "jpf-symbc.jar"
destinationDirectory = file("${buildDir}")

group = "SPF Jars"
description = "Creates the ${archiveName} file."
description = "Creates the ${archiveFileName} file."

dependsOn compile
dependsOn copyResources

from sourceSets.main.java.outputDir
from sourceSets.peers.java.outputDir
from sourceSets.annotations.java.outputDir
from sourceSets.classes.java.outputDir
from sourceSets.main.output.classesDirs
from sourceSets.peers.output.classesDirs
from sourceSets.annotations.output.classesDirs
from sourceSets.classes.output.classesDirs

manifest {
attributes "Implementation-Title": "Symbolic Pathfinder system"
Expand All @@ -107,16 +114,16 @@ task createJpfJar(type: Jar) {
}

task createAnnotationsJar(type: Jar) {
archiveName = "jpf-symbc-annotations.jar"
destinationDir = file("${buildDir}")
archiveFileName = "jpf-symbc-annotations.jar"
destinationDirectory = file("${buildDir}")

group = "SPF Jars"
description = "Creates the ${archiveName} file."
description = "Creates the ${archiveFileName} file."

dependsOn compile
dependsOn copyResources

from sourceSets.annotations.java.outputDir
from sourceSets.annotations.output.classesDirs
}

task buildJars {
Expand Down
6 changes: 3 additions & 3 deletions jpf-symbc/gradle/build-resources.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ task copyResources(type: Copy) {
dependsOn generateVersion

from new File(projectDir, "build.properties")
into sourceSets.main.java.outputDir.path + "/gov/nasa/jpf"
into sourceSets.main.output.classesDirs.getSingleFile().path + "/gov/nasa/jpf"

from new File(projectDir, ".version")
into sourceSets.main.java.outputDir.path + "/gov/nasa/jpf"
}
into sourceSets.main.output.classesDirs.getSingleFile().path + "/gov/nasa/jpf"
}
18 changes: 9 additions & 9 deletions jpf-symbc/gradle/distribution.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ task srcDist(type: Zip) {
group = "SPF Distribution"
description = "Builds the source distribution."

baseName = project.name
version = project.version
classifier = "src"
extension = "zip"
archiveBaseName = project.name
archiveVersion = project.version
archiveClassifier = "src"
archiveExtension = "zip"

destinationDir = buildDir
destinationDirectory = buildDir
includeEmptyDirs = false

from projectDir
Expand All @@ -28,11 +28,11 @@ task dist(type: Zip) {
group = "SPF Distribution"
description = "Builds binary distribution."

baseName = project.name
version = project.version
extension = "zip"
archiveBaseName = project.name
archiveVersion = project.version
archiveExtension = "zip"

destinationDir = buildDir
destinationDirectory = buildDir
includeEmptyDirs = false

from projectDir
Expand Down
12 changes: 6 additions & 6 deletions jpf-symbc/gradle/source-sets.gradle
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
sourceSets {
annotations {
java.srcDirs = ["src/annotations"]
java.outputDir = file("${buildDir}/annotations")
java.destinationDirectory.set(file("${buildDir}/annotations"))
}
main {
java.srcDirs = ["src/main"]
java.outputDir = file("${buildDir}/main")
java.destinationDirectory.set(file("${buildDir}/main"))
compileClasspath += sourceSets.annotations.output
}
classes {
java.srcDirs = ["src/classes"]
java.outputDir = file("${buildDir}/classes")
java.destinationDirectory.set(file("${buildDir}/classes"))
compileClasspath += sourceSets.main.output + sourceSets.annotations.output
}
peers {
java.srcDirs = ["src/peers"]
java.outputDir = file("${buildDir}/peers")
java.destinationDirectory.set(file("${buildDir}/peers"))
compileClasspath += sourceSets.main.output + sourceSets.annotations.output
}
examples {
java.srcDirs = ["src/examples"]
java.outputDir = file("${buildDir}/examples")
java.destinationDirectory.set(file("${buildDir}/examples"))
compileClasspath += sourceSets.main.output + sourceSets.annotations.output + sourceSets.classes.output
}
test {
java.srcDirs = ["src/tests"]
java.outputDir = file("${buildDir}/tests")
java.destinationDirectory.set(file("${buildDir}/tests"))
compileClasspath += sourceSets.annotations.output + sourceSets.classes.output + sourceSets.peers.output
runtimeClasspath += compileClasspath
}
Expand Down
2 changes: 1 addition & 1 deletion jpf-symbc/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading
Loading