Skip to content

Commit

Permalink
fix warnings in build.gradle, fix warnings in distro/prank
Browse files Browse the repository at this point in the history
  • Loading branch information
rdk committed Jun 27, 2024
1 parent b04799f commit efd666e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 42 deletions.
49 changes: 27 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//file:noinspection SpellCheckingInspection
//file:noinspection GroovyAssignabilityCheck


buildscript { // for "com.github.ben-manes.versions" plugin
repositories {
maven {
Expand All @@ -12,23 +13,27 @@ buildscript { // for "com.github.ben-manes.versions" plugin
}
}

apply plugin: "com.github.ben-manes.versions" // ./gradlew dependencyUpdates
plugins {
id 'java'
id 'groovy'
}

apply plugin: "com.github.ben-manes.versions" // ./gradlew dependencyUpdates

apply plugin: 'groovy'
apply plugin: 'java'

group = 'cz.siret'
version = '2.5-dev.6.biojava71'
version = '2.5-dev.7'

description = 'Ligand binding site prediction based on machine learning.'


allprojects {
apply plugin: 'java'
sourceCompatibility = 17
targetCompatibility = 17
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

def distroDir = "$projectDir/distro"

repositories {
mavenCentral()
mavenLocal()
Expand All @@ -48,29 +53,29 @@ sourceSets {
}
}


processResources {
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [
"project_version": project.version
]
}

task copyDependenciesToDist( type: Copy ) {
into "$buildDir/../distro/bin/lib"
tasks.register('copyDependenciesToDist', Copy) {
from configurations.runtimeClasspath

into "$distroDir/bin/lib"
}

task copyBinaryToDist( type: Copy ) {
tasks.register('copyBinaryToDist', Copy) {
dependsOn jar

into "$buildDir/../distro/bin"
from "$buildDir/bin"
from "$projectDir/build/bin"
into "$distroDir/bin"
include "*.jar"
}

task copyDocumentation( type: Copy ) {
into "$buildDir/../distro/"
from "$buildDir/../"
tasks.register('copyDocumentation', Copy) {
from "$distroDir/../"
into "$distroDir"
include "README.md", "LICENSE.txt"
}

Expand All @@ -91,8 +96,8 @@ jar {
}

clean {
delete "$buildDir/../distro/bin"
delete "$buildDir/../distro/test_output"
delete "$distroDir/bin"
delete "$distroDir/test_output"
}

test {
Expand All @@ -104,7 +109,7 @@ test {
// set heap size for the test JVM(s)
maxHeapSize = "2g"

def distroDir = "$project.projectDir/distro"

inputs.dir "$distroDir/test_data"
inputs.files("$distroDir/models", "$distroDir/config/default.groovy")

Expand All @@ -122,7 +127,6 @@ test {
showStackTraces true

showStandardStreams = false
// showStandardStreams = true
}

// listen to standard out and standard error of the test JVM(s)
Expand All @@ -149,7 +153,7 @@ static def maturityLevel(String version) {
def qualifiersRegex = qualifiers.collect { /(?i).*[.\-]$it[.\-\d]*/ }

def index = qualifiersRegex.findIndexOf { version ==~ it }
return (index < 0) ? qualifiers.size : index
return (index < 0) ? qualifiers.size() : index
}

tasks.named("dependencyUpdates").configure {
Expand Down Expand Up @@ -198,4 +202,5 @@ dependencies {

testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.10.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.2'

}
9 changes: 0 additions & 9 deletions distro/prank
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,4 @@ else
fi


JAVA_VERSION=`"$JAVACMD" -version 2>&1 | head -1 | cut -d '"' -f 2`
JAVA_VERSION_MAJOR=`echo $JAVA_VERSION | cut -d '.' -f 1`
if [[ "$JAVA_VERSION_MAJOR" -ge 11 ]]; then
# disable Groovy warnings in Java 11
export JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/sun.nio.fs=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.annotation=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.module=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.net.spi=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.channels=ALL-UNNAMED --add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED --add-opens=java.base/java.nio.file.spi=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.security.acl=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security.interfaces=ALL-UNNAMED --add-opens=java.base/java.security.spec=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.text.spi=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.time.chrono=ALL-UNNAMED --add-opens=java.base/java.time.format=ALL-UNNAMED --add-opens=java.base/java.time.temporal=ALL-UNNAMED --add-opens=java.base/java.time.zone=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/java.util.function=ALL-UNNAMED --add-opens=java.base/java.util.jar=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.util.spi=ALL-UNNAMED --add-opens=java.base/java.util.stream=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED --add-opens=java.desktop/java.applet=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.color=ALL-UNNAMED --add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.desktop/java.awt.geom=ALL-UNNAMED --add-opens=java.desktop/java.awt.im=ALL-UNNAMED --add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED --add-opens=java.desktop/java.awt.image=ALL-UNNAMED --add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.print=ALL-UNNAMED --add-opens=java.desktop/java.beans=ALL-UNNAMED --add-opens=java.desktop/java.beans.beancontext=ALL-UNNAMED --add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED --add-opens=java.logging/java.util.logging=ALL-UNNAMED --add-opens=java.management/java.lang.management=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.rmi/java.rmi=ALL-UNNAMED --add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED --add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED --add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED --add-opens=java.rmi/java.rmi.server=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.border=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED"
fi



"$JAVACMD" $JAVA_OPTS -cp "${CLASSPATH}" cz.siret.prank.program.Main "$@"
13 changes: 2 additions & 11 deletions prank.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,12 @@ else
fi


JAVA_VERSION=`"$JAVACMD" -version 2>&1 | head -1 | cut -d '"' -f 2`
JAVA_VERSION_MAJOR=`echo $JAVA_VERSION | cut -d '.' -f 1`
#if [[ "$JAVA_VERSION_MAJOR" -ge 11 ]]; then
# # disable Groovy warnings in Java 11
# export JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/sun.nio.fs=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.annotation=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.module=ALL-UNNAMED --add-opens=java.base/java.lang.ref=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.net.spi=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.nio.channels=ALL-UNNAMED --add-opens=java.base/java.nio.channels.spi=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.nio.charset.spi=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/java.nio.file.attribute=ALL-UNNAMED --add-opens=java.base/java.nio.file.spi=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.security.acl=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.security.interfaces=ALL-UNNAMED --add-opens=java.base/java.security.spec=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.text.spi=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=java.base/java.time.chrono=ALL-UNNAMED --add-opens=java.base/java.time.format=ALL-UNNAMED --add-opens=java.base/java.time.temporal=ALL-UNNAMED --add-opens=java.base/java.time.zone=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED --add-opens=java.base/java.util.function=ALL-UNNAMED --add-opens=java.base/java.util.jar=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.util.spi=ALL-UNNAMED --add-opens=java.base/java.util.stream=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.datatransfer/java.awt.datatransfer=ALL-UNNAMED --add-opens=java.desktop/java.applet=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-opens=java.desktop/java.awt.color=ALL-UNNAMED --add-opens=java.desktop/java.awt.desktop=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd=ALL-UNNAMED --add-opens=java.desktop/java.awt.dnd.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.event=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.desktop/java.awt.geom=ALL-UNNAMED --add-opens=java.desktop/java.awt.im=ALL-UNNAMED --add-opens=java.desktop/java.awt.im.spi=ALL-UNNAMED --add-opens=java.desktop/java.awt.image=ALL-UNNAMED --add-opens=java.desktop/java.awt.image.renderable=ALL-UNNAMED --add-opens=java.desktop/java.awt.peer=ALL-UNNAMED --add-opens=java.desktop/java.awt.print=ALL-UNNAMED --add-opens=java.desktop/java.beans=ALL-UNNAMED --add-opens=java.desktop/java.beans.beancontext=ALL-UNNAMED --add-opens=java.instrument/java.lang.instrument=ALL-UNNAMED --add-opens=java.logging/java.util.logging=ALL-UNNAMED --add-opens=java.management/java.lang.management=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.rmi/java.rmi=ALL-UNNAMED --add-opens=java.rmi/java.rmi.activation=ALL-UNNAMED --add-opens=java.rmi/java.rmi.dgc=ALL-UNNAMED --add-opens=java.rmi/java.rmi.registry=ALL-UNNAMED --add-opens=java.rmi/java.rmi.server=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED --add-opens=java.desktop/javax.swing=ALL-UNNAMED --add-opens=java.desktop/javax.swing.border=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text=ALL-UNNAMED --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED --add-opens=java.desktop/sun.awt=ALL-UNNAMED --add-opens=java.desktop/sun.java2d=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED"
#fi



PARAMS="$PRANK_LOCALENV_PARAMS"



CMD="$JAVACMD $JAVA_OPTS -cp ${CLASSPATH} cz.siret.prank.program.Main ${PARAMS} $@"
#CMD="$JAVACMD $JAVA_OPTS -cp ${CLASSPATH} cz.siret.prank.program.Main ${PARAMS} $@"
#echo "+" $CMD

"$JAVACMD" $JAVA_OPTS -cp "${CLASSPATH}" cz.siret.prank.program.Main ${PARAMS} "$@"


0 comments on commit efd666e

Please sign in to comment.