Skip to content

Commit

Permalink
Merge branch 'master' into twobit
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso authored Oct 2, 2023
2 parents df59d5a + 227302e commit d4e1bfb
Show file tree
Hide file tree
Showing 197 changed files with 7,728 additions and 3,955 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/gradle_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: temurin
- name: Cache Gradle packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
Expand All @@ -30,4 +31,4 @@ jobs:
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
rm -f ~/.gradle/caches/modules-2/gc.properties
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ out/
*.csi.gz
*.sai
/test/batch/snapshots/
/src/main/java/org/broad/igv/sam/mods/BMScale.java
/src/main/java/org/broad/igv/sam/mods/BMScale.form
/ignore/
107 changes: 36 additions & 71 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The MIT License (MIT)
//
// Copyright (c) 2007-2019 Broad Institute
// Copyright (c) 2007-2019 Broad Institut≈e
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand All @@ -27,26 +27,25 @@ apply plugin: 'application'

import org.apache.tools.ant.filters.ReplaceTokens

//import proguard.gradle.ProGuardTask

mainClassName = 'org.broad.igv.ui.Main'
ext.moduleName = 'org.igv'

// Build sourceset for ProGuard
buildscript {
repositories {
mavenCentral()
}
dependencies {
[group: 'net.sf.proguard', name: 'proguard-gradle', version: '6.1.1']
classpath 'net.sf.proguard:proguard-gradle:6.1.1'
}
}

repositories {
mavenCentral()
}

java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}

sourceSets {
main {
resources {
Expand Down Expand Up @@ -111,7 +110,7 @@ dependencies {
[group: 'org.xerial.snappy', name: 'snappy-java', version: '1.1.7.3'],
[group: 'org.apache.commons', name: 'commons-jexl', version: '2.1.1'],
[group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'],
[group: 'com.github.samtools', name: 'htsjdk', version: '3.0.0'],
[group: 'com.github.samtools', name: 'htsjdk', version: '3.0.5'],
[group: 'org.swinglabs', name: 'swing-layout', version: '1.0.3'],
//[group: 'org.bidib.com.jidesoft', name: 'jide-common', version: '3.7.3'], // no longer in Maven Central
[group: 'com.google.guava', name: 'guava', version: '27.0.1-jre'],
Expand All @@ -123,14 +122,18 @@ dependencies {
// Amazon deps
[group: 'software.amazon.awssdk', name: 'cognitoidentity', version: '2.16.7'],
[group: 'software.amazon.awssdk', name: 'sts', version: '2.16.7'],
[group: 'software.amazon.awssdk', name: 's3', version: '2.16.7']
[group: 'software.amazon.awssdk', name: 's3', version: '2.16.7'],
[group: 'software.amazon.awssdk', name: 'sso', version: '2.16.7']
)

testImplementation(
[group: 'junit', name: 'junit', version: '4.12'],
[group: 'junit', name: 'junit', version: '4.13'],
[group: 'com.sparkjava', name: 'spark-core', version: '2.2'],
[group: 'org.glassfish.jersey.core', name: 'jersey-common', version: '2.22.4']
)
testRuntimeOnly(
[group: 'org.junit.vintage', name:'junit-vintage-engine', version:'5.8.2']
)
}


Expand Down Expand Up @@ -178,35 +181,7 @@ tasks.withType(Test) {
systemProperties['org.xerial.snappy.tempdir'] = 'build/tmp'
maxHeapSize = '2g'
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}

compileTestJava {
inputs.property("moduleName", moduleName)
doFirst {
options.compilerArgs = [
'--module-path', classpath.asPath,
'--add-modules', 'junit',
'--patch-module', "$moduleName=" + files(sourceSets.test.java.srcDirs).asPath,
]
classpath = files()
}
}

test {
inputs.property("moduleName", moduleName)

doFirst {
jvmArgs = [
'-Dcom.sun.xml.bind.v2.bytecode.ClassTailor.noOptimize',
'--module-path', classpath.asPath,
'--add-modules', 'junit',
'--add-modules', 'ALL-MODULE-PATH',
'--add-reads', "$moduleName=junit",
'@scripts/test_suite.args',
'--patch-module', "$moduleName=" + files(sourceSets.test.java.outputDir, sourceSets.main.output.resourcesDir).asPath,
]
classpath = files()
}
useJUnitPlatform()
}

task createDist(type: Copy, dependsOn: jar) {
Expand All @@ -228,10 +203,11 @@ task createDist(type: Copy, dependsOn: jar) {
}
// Copies all Maven-fetched dependency jars
with copySpec {
from configurations.default {
from configurations.runtimeClasspath {
exclude '**/*log4j*.jar'
}
into "lib"
duplicatesStrategy DuplicatesStrategy.EXCLUDE
}
with copySpec { from("genomes/sizes") {} into "lib/genomes" }

Expand All @@ -243,32 +219,32 @@ tasks.distTar.enabled = false
tasks.startScripts.enabled = false

task createDistZip(type: Zip, dependsOn: createDist) {
archiveName = "IGV_${version}.zip"
archiveFileName = "IGV_${archiveVersion}.zip"
from("${buildDir}/IGV-dist")
into "IGV_${version}"
into "IGV_${archiveVersion}"
}

task createLinuxDistZip(type: Zip, dependsOn: createDist) {
archiveName = "IGV_Linux_${version}.zip"
archiveFileName = "IGV_Linux_${archiveVersion}.zip"
from("${buildDir}/IGV-dist") {
exclude "*.bat"
exclude "*.command"
exclude 'igvtools*'
exclude 'lib/genomes'
}
into "IGV_Linux_${version}"
into "IGV_Linux_${archiveVersion}"
}

task createLinuxWithJavaDistZip(type: Zip, dependsOn: createDist) {
archiveName = "IGV_Linux_${version}_WithJava.zip"
with copySpec { from jdkBundleLinux into "jdk-11" }
archiveFileName = "IGV_Linux_${archiveVersion}_WithJava.zip"
with copySpec { from jdkBundleLinux into "jdk-17" }
from("${buildDir}/IGV-dist") {
exclude "*.bat"
exclude "*.command"
exclude 'igvtools*'
exclude 'lib/genomes'
}
into "IGV_Linux_${version}"
into "IGV_Linux_${archiveVersion}"
doLast {
if (jdkBundleLinux == "") {
throw new GradleException("Required property not set: jdkBundleLinux");
Expand All @@ -277,26 +253,27 @@ task createLinuxWithJavaDistZip(type: Zip, dependsOn: createDist) {
}

task createMacDistZip(type: Zip, dependsOn: createDist) {
archiveName = "IGV_Mac_${version}.zip"
archiveFileName = "IGV_Mac_${archiveVersion}.zip"
from("${buildDir}/IGV-dist") {
exclude "*.bat"
exclude "*_hidpi*"
exclude "igvtools*"
exclude 'lib/genomes'
}
into "IGV_Mac_${version}"

into "IGV_Mac_${archiveVersion}"
}

task createMacWithJavaDistZip(type: Zip, dependsOn: createDist) {
archiveName = "IGV_Mac_${version}_WithJava.zip"
with copySpec { from jdkBundleMac into "jdk-11" }
archiveFileName = "IGV_Mac_${archiveVersion}_WithJava.zip"
with copySpec { from jdkBundleMac into "jdk-17" }
from("${buildDir}/IGV-dist") {
exclude "*.bat"
exclude "*_hidpi*"
exclude "igvtools*"
exclude 'lib/genomes'
}
into "IGV_Mac_${version}"
into "IGV_Mac_${archiveVersion}"
doLast {
if (jdkBundleMac == "") {
throw new GradleException("Required property not set: jdkBundleMac");
Expand Down Expand Up @@ -338,7 +315,7 @@ task createMacAppDist(type: Copy, dependsOn: createDist) {
}

task createMacAppDistZip(type: Zip, dependsOn: createMacAppDist) {
archiveName = "IGV_MacApp_${version}.zip"
archiveFileName = "IGV_MacApp_${archiveVersion}.zip"
from("${buildDir}/IGV-MacApp-dist")

doLast {
Expand All @@ -347,8 +324,8 @@ task createMacAppDistZip(type: Zip, dependsOn: createMacAppDist) {
}

task createMacAppWithJavaDistZip(type: Zip, dependsOn: createMacAppDist) {
archiveName = "IGV_MacApp_${version}_WithJava.zip"
with copySpec { from jdkBundleMac into "IGV_${version}.app/Contents/jdk-11" }
archiveFileName = "IGV_MacApp_${archiveVersion}_WithJava.zip"
with copySpec { from jdkBundleMac into "IGV_${archiveVersion}.app/Contents/jdk-17" }
from("${buildDir}/IGV-MacApp-dist")

doLast {
Expand Down Expand Up @@ -382,7 +359,7 @@ task createWinDist(type: Copy, dependsOn: createDist) {
}

task createWinWithJavaDist(type: Copy, dependsOn: createWinDist) {
with copySpec { from jdkBundleWindows into "IGV_${version}/jdk-11" }
with copySpec { from jdkBundleWindows into "IGV_${version}/jdk-17" }
with copySpec {
from("${buildDir}/IGV-WinExe-dist/IGV_${version}") { exclude 'installer.nsi' }
into "IGV_${version}"
Expand Down Expand Up @@ -464,7 +441,8 @@ task fullJar(type: Jar, dependsOn: jar) {
"Application-Name": "IGV",
"Built-By": System.getProperty('user.name'),
"Main-Class": mainClassName,
"Class-Path": configurations.default.collect { it.getName() }.join(' ')

"Class-Path": configurations.runtimeClasspath.collect { it.getName() }.join(' ')
)
}
}
Expand All @@ -474,16 +452,3 @@ task fullJar(type: Jar, dependsOn: jar) {
//if (!makensisCommand == "" && !signcodeCommand == "") {
// dependsOn signWinExeDist
//}

// XXX: META-INF versions support (Java11) seem to clash with proguard at this point in time:
// https://sourceforge.net/p/proguard/bugs/665/
// https://sourceforge.net/p/proguard/discussion/182456/thread/8c56b22dc2/?limit=25
//task myproguard(type: ProGuardTask) {
//// configuration 'proguard.txt'
//
// injars "${buildDir}/IGV-dist/lib"
// outjars "${buildDir}/libs/igv-proguard.jar"
//
// //libraryjars "${buildDir}/IGV-dist/lib", jarfilter:"lib/**.jar(!META-INF/**)"
// //libraryjars "${System.getProperty('java.home')}/lib/rt.jar"
//}
23 changes: 11 additions & 12 deletions examples/oauth/oauth-config-amazon.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{
"client_id": "3f4ujenfmr77tg12idlkebpkoh",
"client_secret": "en1q6638m4dogrr6erhrmitim67sjilc6htjnfmf6ljk2q3j9og",
"apiKey": "",
"project_id": "igv",
"auth_provider": "Amazon",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"aws_region": "ap-southeast-2",
"aws_region": "us-east-1",
"scope": "email%20openid%20profile",
"redirect_uris": [
"http://localhost:60151/oauthCallback"
],
"authorization_endpoint": "https://igv-demo.auth.ap-southeast-2.amazoncognito.com/login",
"token_endpoint": "https://igv-demo.auth.ap-southeast-2.amazoncognito.com/token",
"aws_cognito_fed_pool_id": "ap-southeast-2:15b7bf93-18ca-40d5-99e9-38b4eb69363e",
"aws_cognito_pool_id": "ap-southeast-2_IYMvlZzmv",
"aws_cognito_role_arn": "arn:aws:iam::YOUR_AWS_ACCOUNT:role/YOUR_Cognito_igvAuth_Role"
}
"client_id": "eu7vd09a3dsfasdfd7r4kjomqg",
"client_secret": "s2416djkq5liigbrjdhktdsdgerefktsv04f9p810a3nc9",
"authorization_endpoint": "https://igv-demo.auth.us-east-1.amazoncognito.com/login",
"token_endpoint": "https://igv-demo.auth.us-east-1.amazoncognito.com/token",
"aws_cognito_fed_pool_id": "us-east-1:2926325e-0938-4dfc-840a-fa8a3e4f63f7",
"aws_cognito_pool_id": "us-east-1_v98erojsdkfj",
"aws_cognito_role_arn": "arn:aws:iam::3940820579:role/Cognito_igvAuth_Role"
}
10 changes: 3 additions & 7 deletions examples/oauth/oauth-config-google.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"client_id": "661332306814-gb4r480jnb6rres3iv8a5f48dms5ququu.apps.googleusercontent.com",
"client_secret": "MFqdc7apizmtb8n08Ze810V6",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"redirect_uris": [
"http://localhost:60151/oauthCallback"
],
"hosts": ["www.googleapis.com", "storage.cloud.google.com", "storage.googleapis.com"]
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs"
}
12 changes: 6 additions & 6 deletions examples/oauth/oauth-config-microsoft.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"client_id": "hbq82djj-qwer-7iub-j7zq-7i8nv72n48nq",
"client_secret": "cVAX64fXRikCLmtAow/cktrAtaHz/tmB3WHKhnbXN2Gq",
"authorization_endpoint": "https://login.microsoftonline.com/77nwe2q2-e53r-uq2p-7vdh-9z7px83zmtiv/oauth2/authorize",
"token_endpoint": "https://login.microsoftonline.com/77nwe2q2-e53r-wk32-7vdh-9z7px83zmtiv/oauth2/token",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"authorization_endpoint": "https://login.microsoftonline.com/.../oauth2/authorize",
"token_endpoint": "https://login.microsoftonline.com/.../oauth2/token",
"hosts": ["prod_host.mayo.edu", "dev_host.mayo.edu", "int_host.mayo.edu"],
"auth_provider": "Mayo Clinic",
"app_id_uri": "https://orgtools.onmicrosoft.com/6q9qk3mr-pu78-eu73-vx5a-nqw2aqidutm9",
"auth_provider": "YOUR PROVIDER",
"app_id_uri": "https://orgtools.onmicrosoft.com/...",
"scope": "openid"
}

Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit d4e1bfb

Please sign in to comment.