Skip to content

Commit

Permalink
Cherry-pick required commits from cn_sprk_3.3.0_rebased.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmnbroad committed Sep 26, 2022
1 parent 3e25e52 commit c0be97c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ RUN echo "source activate gatk" > /root/run_unit_tests.sh && \
echo "mkdir /gatk/srcdir" >> /root/run_unit_tests.sh && \
echo "cp -rp /gatkCloneMountPoint/src/main/java/* /gatk/srcdir" >> /root/run_unit_tests.sh && \
echo "export SOURCE_DIR=/gatk/srcdir" >> /root/run_unit_tests.sh && \
echo "export GRADLE_OPTS=\"-Xmx1024m -Dorg.gradle.daemon=false\"" >> /root/run_unit_tests.sh && \
echo "export GRADLE_OPTS=\"-Xmx1024m -Dorg.gradle.daemon=false --add-opens java.prefs/java.util.prefs=ALL-UNNAMED\"" >> /root/run_unit_tests.sh && \
echo "export CP_DIR=/gatk/testClasses" >> /root/run_unit_tests.sh && \
echo "ln -s /gatkCloneMountPoint/src/ /gatkCloneMountPoint/scripts/docker/src" >> /root/run_unit_tests.sh && \
echo "ln -s /gatkCloneMountPoint/build/ /gatkCloneMountPoint/scripts/docker/build" >> /root/run_unit_tests.sh && \
Expand Down
21 changes: 6 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import de.undercouch.gradle.tasks.download.Download

import javax.tools.ToolProvider
import java.time.format.DateTimeFormatter
import java.time.ZonedDateTime

mainClassName = "org.broadinstitute.hellbender.Main"

Expand Down Expand Up @@ -138,21 +136,13 @@ def looksLikeWereInAGitRepository(){
// Ensure that we have a clone of the git repository, and resolve any required git-lfs
// resource files that are needed to run the build but are still lfs stub files.
def ensureBuildPrerequisites(largeResourcesFolder, buildPrerequisitesMessage, skipGitCheck) {
if (!JavaVersion.current().isJava8Compatible()) {
throw new GradleException(
"Java 17 or later is required to build GATK, but ${JavaVersion.current()} was found. "
+ "$buildPrerequisitesMessage")
if (!JavaVersion.current().equals(JavaVersion.VERSION_17)) {
println("Warning: using Java ${JavaVersion.current()} but only Java 17 has been tested.")
}
//TODO: fix this comment
// Make sure we can get a ToolProvider class loader (for Java 8). If not we may have just a JRE.
if (JavaVersion.current().isJava8() && ToolProvider.getSystemToolClassLoader() == null) {
if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
throw new GradleException(
"The ClassLoader obtained from the Java ToolProvider is null. "
+ "A full Java 17 JDK must be installed, check that you are not using a JRE. $buildPrerequisitesMessage")
}
//TODO: fix this - the gradle version we're using has no isJava17
if (!JavaVersion.current().isJava8() && !JavaVersion.current().isJava11()) {
println("Warning: using Java ${JavaVersion.current()} but only Java 17 has been tested.")
"A Java 17 compatible (Java 17 or later) version is required to build GATK, but ${JavaVersion.current()} was found. "
+ "$buildPrerequisitesMessage")
}
if (!skipGitCheck && !looksLikeWereInAGitRepository() ) {
throw new GradleException("This doesn't appear to be a git folder. " +
Expand Down Expand Up @@ -615,6 +605,7 @@ task shadowTestClassJar(type: ShadowJar){

// A minimal jar that only contains the extra dependencies needed for running the tests
task shadowTestJar(type: ShadowJar){
dependsOn 'compileTestUtilsJava', 'processTestUtilsResources'
group = "Shadow"
description = " A minimal jar that only contains the extra dependencies needed for running the tests that arent packaged in the main shadow jar"
from {
Expand Down
5 changes: 3 additions & 2 deletions gatk
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,9 @@ PACKAGED_LOCAL_JAR_OPTIONS= [
"--add-opens", "java.base/jdk.internal.module=ALL-UNNAMED",
"--add-opens", "java.base/java.lang.module=ALL-UNNAMED",
"--add-opens", "java.security.jgss/sun.security.krb5=ALL-UNNAMED", "-Dio.netty.tryReflectionSetAccessible=true"
"--add-opens", "java.prefs/java.util.prefs=ALL-UNNAMED"
]
"--add-opens", "java.prefs/java.util.prefs=ALL-UNNAMED",
"-Dio.netty.tryReflectionSetAccessible=true"
]

DEFAULT_SPARK_ARGS_PREFIX = '--conf'
DEFAULT_SPARK_ARGS = {
Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/dockertest.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ task testOnPackagedReleaseJar(type: Test){
'-Dio.netty.tryReflectionSetAccessible=true'
]

classpath = files( testClassesJar, testDependencyJar, gatkJar )
classpath = files( gatkJar, testClassesJar, testDependencyJar)
testClassesDirs = files(testClassesUnpacked)
}

Expand Down

0 comments on commit c0be97c

Please sign in to comment.