Skip to content

Commit

Permalink
update to gradle-version 6.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
lindenb committed Feb 6, 2020
1 parent 583b6f4 commit 0d69d16
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 31 deletions.
56 changes: 44 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
gradle -Djvarkit.delete.jar=true -Djvarkit.disable.test=true all all2
gradle -Djvarkit.generate.doc=false all all2
*/

//import org.gradle.internal.logging.text.StyledTextOutput
Expand Down Expand Up @@ -267,20 +269,35 @@ libraries.put("arq",new Library().


public class CompileJVarkit extends DefaultTask {
@Input @Optional
String mainClass = ''
@Input @Optional
String srcDir =''
@Input @Optional
String testDir =''
@Input @Optional
String tmpDir = ""
@Input @Optional
String distDir = ""
@Input @Optional
String docDir = ""
@Input @Optional
String testNgDir=""
@Input @Optional
String jdkTarget = "8"
@Input @Optional
String jdkSource = "8"
@Input @Optional
Library jarLibs = new Library();
boolean requireJfx = false;
@Input
boolean requireJfx = false;
@Input @Optional
String deprecatedMsg = null;
def xsdFiles =[];
@Input @Optional
def xsdFiles =[];
@Input @Optional
String endMsg = null;
@Input
boolean with_jni = false;

CompileJVarkit() {
Expand Down Expand Up @@ -448,6 +465,7 @@ public class CompileJVarkit extends DefaultTask {

}
}
@Input
boolean isJavaFxAvailable() {
try {
this.getClass().getClassLoader().loadClass("javafx.embed.swing.JFXPanel");
Expand All @@ -457,11 +475,17 @@ public class CompileJVarkit extends DefaultTask {
return false;
}
}

@Input
boolean isFatJar() {
return java.lang.System.getProperty("jvarkit.fat.jar","true").equals("true");
}

private boolean isGeneratingDoc() {
if(!java.lang.System.getProperty("jvarkit.generate.doc","true").equals("true")) return false;
return true;
}

@Input
String getMainPackage() {
String s= this.mainClass;
int dollar = s.indexOf('$');
Expand All @@ -470,7 +494,8 @@ public class CompileJVarkit extends DefaultTask {
if(dot==-1) return "";
return s.substring(0,dot);
}
File getMainJavaTestFile() {

private File getMainJavaTestFile() {
String travis = java.lang.System.getenv("TRAVIS");
if(travis!=null && travis.equals("true")) return null;
if(java.lang.System.getProperty("jvarkit.disable.test","false").equals("true")) return null;
Expand All @@ -482,25 +507,30 @@ public class CompileJVarkit extends DefaultTask {
if(!f.exists()) return null;
return f;
}

@Input
String getMainJavaSource() {
String s = this.mainClass;
int dollar = s.indexOf('$');
if(dollar!=-1) s=s.substring(0,dollar);
s = this.srcDir + "/" + s.replace('.','/')+".java";
return s;
}
@Input
String getTestNgClass() {
String s = this.mainClass;
int dollar = s.indexOf('$');
if(dollar!=-1) s=s.substring(0,dollar);
return s+"Test";
}
@Input
String getAntInclude() {
final String s= this.getMainJavaSource();
final int slash = s.lastIndexOf('/');
String s2 = "**"+s.substring(slash);
return s2;
}
@Input
String getAntTestInclude() {
String s= this.getMainJavaSource();
int slash = s.lastIndexOf('/');
Expand All @@ -510,7 +540,7 @@ public class CompileJVarkit extends DefaultTask {
return "**"+s+"Test.java";
}
public String toString() {
return ""+this.getName()+" "+this.mainClass;
return ""+this.getName()+" "+this.mainClass;
}

private void compileJni() {
Expand All @@ -521,11 +551,11 @@ public class CompileJVarkit extends DefaultTask {
}
}
catch(Exception err) {
project.logger.warn("Compiling JNI failed. "+err.getMessage());
}
project.logger.warn("Compiling JNI failed. "+err.getMessage());
}
}


private String getExecutablePath(String exe) {
try {
def stdout = new ByteArrayOutputStream()
Expand All @@ -538,6 +568,7 @@ public class CompileJVarkit extends DefaultTask {
catch(Exception err) { return "";}
}

@Input
public String getGitHash() {
try {
def stdout = new ByteArrayOutputStream()
Expand All @@ -550,16 +581,17 @@ public class CompileJVarkit extends DefaultTask {
catch(Exception err) { return "undefined";}
}

/**
def getConfiguration() {
//System.err.println("SEACHING "+ this.configName);
//System.err.println("SEARCHING "+ this.configName);
//project.configurations.each{ System.err.println("conf : "+it.name); }
def c= project.configurations.find{it.name == this.configName}
//System.err.println("GOT::"+this.configName +" = "+c);
if(c==null) throw new GradleException("Cannot find config "+this.configName+" "+c);
return c;
}

*/

@TaskAction
void doIt() {
Expand Down Expand Up @@ -690,7 +722,7 @@ public class CompileJVarkit extends DefaultTask {
// done : https://stackoverflow.com/questions/14516693/
project.logger.lifecycle("jar file generated :" + distJar)


if( isGeneratingDoc()) {
/* generate doc */
ant.java(
jar : this.distDir+"/${this.name}.jar" , fork: true
Expand All @@ -700,7 +732,7 @@ public class CompileJVarkit extends DefaultTask {
arg(value: "--helpFormat")
arg(value: "make-doc")
}

}

/** test */

Expand Down
9 changes: 8 additions & 1 deletion docs/SamFindClippedRegions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@ Fins clipped position in one or more bam.
```
Usage: samfindclippedregions [options] Files
Options:
--bcf-output
If this program writes a VCF to a file, The format is first guessed from
the file suffix. Otherwise, force BCF output. The current supported BCF
version is : 2.1 which is not compatible with bcftools/htslib (last
checked 2019-11-15)
Default: false
--generate-vcf-md5
Generate MD5 checksum for VCF output.
Default: false
--gtf
Optional gtf file. Will be used to set a warning if the junction could
be a junction exon-exon of a retrogene. A GTF (General Transfer Format)
file. See https://www.ensembl.org/info/website/upload/gff.html .
file. See https://www.ensembl.org/info/website/upload/gff.html . Please
note that CDS are only detected if a start and stop codons are defined.
-h, --help
print help and exit
--helpFormat
Expand Down
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-5.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
28 changes: 18 additions & 10 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

##############################################################################
##
Expand Down Expand Up @@ -28,16 +28,16 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn ( ) {
warn () {
echo "$*"
}

die ( ) {
die () {
echo
echo "$*"
echo
Expand Down Expand Up @@ -154,11 +154,19 @@ if $cygwin ; then
esac
fi

# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
APP_ARGS=$(save "$@")

exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
8 changes: 1 addition & 7 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down Expand Up @@ -49,7 +49,6 @@ goto fail
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
Expand All @@ -60,11 +59,6 @@ set _SKIP=2
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line
Expand Down

0 comments on commit 0d69d16

Please sign in to comment.