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
83 changes: 30 additions & 53 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
plugins {
id("com.github.spotbugs") version "5.2.1"
buildscript {
repositories {
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
dependencies {
classpath("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.0.4")
}
}

defaultTasks "build"
apply plugin: 'base'

ext {
revision = "git rev-parse --short HEAD".execute().text.trim()
Expand All @@ -13,27 +19,18 @@ ext {
// its better groovy/gradle too
file('version.txt').withReader { verionId = it.readLine() + "-" + revision }
}
allprojects {
apply plugin: 'java-library'
apply plugin: 'eclipse'

subprojects {
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'com.github.spotbugs'
sourceCompatibility = 21
apply plugin: 'eclipse'
apply plugin: "com.github.spotbugs"

//default value is libs according to java plugin
libsDirName = "lib"
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
sourceCompatibility = 21

subprojects {
//config spotbugs
spotbugs {
ignoreFailures = true
spotbugsTest.enabled = false
ignoreFailures = true
spotbugsTest.enabled = false
}
//output to html, the default is xml
spotbugsMain {
Expand All @@ -46,45 +43,25 @@ subprojects {
}
}

//config checkstyle
repositories {
mavenCentral()
flatDir(dirs:"$projectDir/../lib")
}

checkstyle {
configFile = file('../config/google_check.xml')
toolVersion = '10.12.4'
checkstyleTest.enabled=false
configFile = file('../config/google_check.xml')
toolVersion = '10.12.4'
checkstyleTest.enabled=false
}
checkstyleMain.onlyIf {project.hasProperty('checkstyle')}

repositories {
flatDir(dirs:"$projectDir/../lib")
mavenCentral()
}
dependencies {
testImplementation 'junit:junit:4.12'
dependencies {
testImplementation 'junit:junit:4.13.2'
}

sourceSets {
main { java.srcDirs=['src']; resources.srcDirs=['src'] }
test { java.srcDirs=['test']; test.resources.srcDirs=['test'] }
}

jar.doFirst {
manifest {
if(project.hasProperty('mainClassName') && project.getProperty('mainClassName') != null ) {
attributes 'Main-Class' : project.mainClassName
}
attributes 'Implementation-Title': project.name,
'Implementation-Version': verionId,
'SVN-Version': revision,
'Built-By': System.properties['user.name'],
'Date': new java.util.Date().toString(),
'Class-Path' : project.configurations.runtimeClasspath.collect { it.name }.join(' ')
}
}

build.doLast {
println "${project}: copy ${configurations.runtimeClasspath.collect { File file -> file.name }} to ${adamalib} and build/flat"
copy { from configurations.runtimeClasspath,libsDirectory; into file('build/flat') }
copy { from configurations.runtimeClasspath,libsDirectory; into adamalib }
main { java.srcDirs=['src']; resources.srcDirs=['src'] }
test { java.srcDirs=['test']; test.resources.srcDirs=['test'] }
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
16 changes: 8 additions & 8 deletions q3indel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ def isExecutable = true

//control the ordering of jars, make sure junit before <tool>.jar

// q3indel has some scala classes that require the following task (along with the scalal plugin and api dependency)
// q3indel has some scala classes that require the following task (along with the scalal plugin and implementation dependency)
sourceSets {
main { java.srcDirs=['src']; resources.srcDirs=['src']; scala.srcDirs=['scala/src'] }
test { java.srcDirs=['test']; test.resources.srcDirs=['test'];scala.srcDirs=['scala/test'] }
}
dependencies {

api project(':qcommon')
api project(':qio')
api project(':qbamfilter')
api project(':qpicard')
implementation project(':qcommon')
implementation project(':qio')
implementation project(':qbamfilter')
implementation project(':qpicard')

api 'org.scala-lang:scala-library:2.12.18'
api 'net.sf.jopt-simple:jopt-simple:4.6'
api group: 'org.ini4j', name: 'ini4j', version: '0.5.2'
implementation 'org.scala-lang:scala-library:2.12.18'
implementation 'net.sf.jopt-simple:jopt-simple:4.6'
implementation group: 'org.ini4j', name: 'ini4j', version: '0.5.2'
}


2 changes: 1 addition & 1 deletion q3indel/src/au/edu/qimr/indel/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import au.edu.qimr.indel.pileup.IndelMT;
import org.qcmg.common.log.QLogger;
import org.qcmg.common.util.LoadReferencedClasses;


public class Main {

Expand Down
14 changes: 7 additions & 7 deletions q3panel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ def isExecutable = true

dependencies {

api project(':qcommon')
api project(':qio')
implementation project(':qcommon')
implementation project(':qio')

api 'org.apache.commons:commons-lang3:3.4'
api 'net.sf.trove4j:core:3.1.0'
api 'net.sf.jopt-simple:jopt-simple:4.6'
api 'com.github.samtools:htsjdk:4.0.2'
implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'net.sf.trove4j:core:3.1.0'
implementation 'net.sf.jopt-simple:jopt-simple:4.6'
implementation 'com.github.samtools:htsjdk:4.0.2'

api group: 'com.io7m.xom',name: 'xom', version: '1.2.10'
implementation group: 'com.io7m.xom',name: 'xom', version: '1.2.10'
}
2 changes: 1 addition & 1 deletion q3panel/src/au/edu/qimr/panel/Q3ClinVar.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
import org.qcmg.common.model.ChrRangePosition;
import org.qcmg.common.util.Constants;
import org.qcmg.common.util.FileUtils;
import org.qcmg.common.util.LoadReferencedClasses;

import org.qcmg.common.util.Pair;
import org.qcmg.common.util.TabTokenizer;

Expand Down
2 changes: 1 addition & 1 deletion q3panel/src/au/edu/qimr/panel/Q3Panel.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
import org.qcmg.common.util.Constants;
import org.qcmg.common.util.FileUtils;
import org.qcmg.common.util.IndelUtils;
import org.qcmg.common.util.LoadReferencedClasses;

import org.qcmg.common.util.Pair;
import org.qcmg.common.util.SnpUtils;
import org.qcmg.common.util.TabTokenizer;
Expand Down
12 changes: 6 additions & 6 deletions q3tiledaligner/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ def isExecutable = true


dependencies {
api project(':qcommon')
api project(':qio')
implementation project(':qcommon')
implementation project(':qio')

api 'com.github.samtools:htsjdk:4.0.2'
api 'net.sf.trove4j:core:3.1.0'
api 'org.apache.commons:commons-lang3:3.4'
api 'net.sf.jopt-simple:jopt-simple:4.6'
implementation 'com.github.samtools:htsjdk:4.0.2'
implementation 'net.sf.trove4j:core:3.1.0'
implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'net.sf.jopt-simple:jopt-simple:4.6'
}
14 changes: 7 additions & 7 deletions q3vcftools/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ configurations {

dependencies {

api project(':qcommon')
api project(':qio')
implementation project(':qcommon')
implementation project(':qio')

api 'com.github.samtools:htsjdk:4.0.2'
api 'net.sf.jopt-simple:jopt-simple:4.6'
api 'net.sf.trove4j:core:3.1.0'
api group: 'com.jcraft', name: 'jsch', version: '0.1.54'
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
implementation 'com.github.samtools:htsjdk:4.0.2'
implementation 'net.sf.jopt-simple:jopt-simple:4.6'
implementation 'net.sf.trove4j:core:3.1.0'
implementation group: 'com.jcraft', name: 'jsch', version: '0.1.54'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.4'
}

2 changes: 1 addition & 1 deletion q3vcftools/src/au/edu/qimr/vcftools/AmalAnalyser.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.qcmg.common.meta.QExec;
import org.qcmg.common.util.Constants;
import org.qcmg.common.util.FileUtils;
import org.qcmg.common.util.LoadReferencedClasses;

import org.qcmg.common.util.TabTokenizer;


Expand Down
2 changes: 1 addition & 1 deletion q3vcftools/src/au/edu/qimr/vcftools/Amalgamator.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.qcmg.common.meta.QExec;
import org.qcmg.common.util.Constants;
import org.qcmg.common.util.FileUtils;
import org.qcmg.common.util.LoadReferencedClasses;

import org.qcmg.common.util.TabTokenizer;
import org.qcmg.common.vcf.VcfRecord;
import org.qcmg.common.vcf.VcfUtils;
Expand Down
2 changes: 1 addition & 1 deletion q3vcftools/src/au/edu/qimr/vcftools/AmalgamatorGS.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.qcmg.common.meta.QExec;
import org.qcmg.common.util.Constants;
import org.qcmg.common.util.FileUtils;
import org.qcmg.common.util.LoadReferencedClasses;

import org.qcmg.common.util.TabTokenizer;
import org.qcmg.common.vcf.VcfRecord;
import org.qcmg.common.vcf.VcfUtils;
Expand Down
2 changes: 1 addition & 1 deletion q3vcftools/src/au/edu/qimr/vcftools/Classify.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.qcmg.common.meta.QExec;
import org.qcmg.common.util.Constants;
import org.qcmg.common.util.FileUtils;
import org.qcmg.common.util.LoadReferencedClasses;

import org.qcmg.common.vcf.VcfRecord;
import org.qcmg.common.vcf.VcfUtils;
import org.qcmg.common.vcf.header.VcfHeaderUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.qcmg.common.meta.QExec;
import org.qcmg.common.util.Constants;
import org.qcmg.common.util.FileUtils;
import org.qcmg.common.util.LoadReferencedClasses;

import org.qcmg.common.vcf.VcfRecord;
import org.qcmg.common.vcf.VcfUtils;
import org.qcmg.common.vcf.header.VcfHeaderUtils;
Expand Down
2 changes: 1 addition & 1 deletion q3vcftools/src/au/edu/qimr/vcftools/MergeSameSamples.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import org.qcmg.common.model.ChrPosition;
import org.qcmg.common.util.Constants;
import org.qcmg.common.util.FileUtils;
import org.qcmg.common.util.LoadReferencedClasses;

import org.qcmg.common.vcf.ContentType;
import org.qcmg.common.vcf.VcfFileMeta;
import org.qcmg.common.vcf.VcfRecord;
Expand Down
2 changes: 1 addition & 1 deletion q3vcftools/src/au/edu/qimr/vcftools/Overlap.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.qcmg.common.meta.QExec;
import org.qcmg.common.util.Constants;
import org.qcmg.common.util.FileUtils;
import org.qcmg.common.util.LoadReferencedClasses;

import org.qcmg.common.util.TabTokenizer;
import org.qcmg.common.vcf.VcfRecord;
import org.qcmg.common.vcf.VcfUtils;
Expand Down
16 changes: 7 additions & 9 deletions qannotate/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ mainClassName = 'au.edu.qimr.qannotate.Main'
def scriptname = 'qannotate'
def isExecutable = true

configurations { junit }

/*
* qannotate requires snpEff and the version currently used is 4.0e
* This version of the snpEff jar file embedds a version of junit that is old,
Expand All @@ -25,14 +23,14 @@ dependencies {
//this junit is required by snpEff-4.0
junit ('junit:junit:4.10')

api project(':qcommon')
api project(':qio')
api project(':qbamfilter')
implementation project(':qcommon')
implementation project(':qio')
implementation project(':qbamfilter')
implementation project(':qpicard')

api 'com.github.samtools:htsjdk:4.0.2'
api 'net.sf.jopt-simple:jopt-simple:4.6'
api name: 'snpEff', version: '4.0e'
api 'com.fasterxml.jackson.core:jackson-databind:2.6.7'
implementation 'net.sf.jopt-simple:jopt-simple:4.6'
implementation name: 'snpEff', version: '4.0e'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.6.7'
}
//have to specify test classpath for both snpEff and qannotate
sourceSets.test.runtimeClasspath = configurations.junit + sourceSets.test.runtimeClasspath
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

import au.edu.qimr.qannotate.utils.MafElement;
import au.edu.qimr.qannotate.utils.SnpEffMafRecord;
import junit.framework.Assert;
import org.junit.Assert;


public class Vcf2mafIndelTest {
Expand Down
3 changes: 3 additions & 0 deletions qbamannotate/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ dependencies {
// https://mvnrepository.com/artifact/org.eclipse.persistence/org.eclipse.persistence.moxy
implementation 'org.eclipse.persistence:org.eclipse.persistence.moxy:3.0.3'


testImplementation project(':qpicard')
testImplementation project(':qtesting')
// testImplementation 'junit:junit:4.13.2'
}

8 changes: 4 additions & 4 deletions qbamfilter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ def isExecutable = true

dependencies {

api project(':qcommon')
api project(':qpicard')
implementation project(':qcommon')
implementation project(':qpicard')

api 'net.sf.jopt-simple:jopt-simple:4.6'
api 'org.antlr:antlr:3.2'
implementation 'net.sf.jopt-simple:jopt-simple:4.6'
implementation 'org.antlr:antlr:3.2'
}

6 changes: 3 additions & 3 deletions qbamfix/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ def isExecutable = true

dependencies {

api project(':qcommon')
api project(':qpicard')
api 'commons-cli:commons-cli:1.2'
implementation project(':qcommon')
implementation project(':qpicard')
implementation 'commons-cli:commons-cli:1.2'
}

2 changes: 1 addition & 1 deletion qbamfix/src/org/qcmg/qbamfix/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import org.qcmg.common.log.QLogger;
import org.qcmg.common.log.QLoggerFactory;
import org.qcmg.common.util.LoadReferencedClasses;

import org.qcmg.picard.HeaderUtils;
import org.qcmg.picard.SAMFileReaderFactory;

Expand Down
2 changes: 1 addition & 1 deletion qbamfix/test/org/qcmg/qbamfix/NewOptionsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.ArrayList;
import java.util.List;

import junit.framework.Assert;
import org.junit.Assert;

import org.junit.AfterClass;
import org.junit.BeforeClass;
Expand Down
Loading