-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ac5999
commit aa25cfd
Showing
7 changed files
with
411 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# These are explicitly windows files and should use crlf | ||
*.bat text eol=crlf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
* | ||
* This generated file contains a sample Java application project to get you started. | ||
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle | ||
* User Manual available at https://docs.gradle.org/7.4.2/userguide/building_java_projects.html | ||
*/ | ||
|
||
plugins { | ||
id 'java' | ||
id 'war' | ||
id 'jacoco' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
compileJava { | ||
if (JavaVersion.current() <= JavaVersion.VERSION_1_8) { | ||
// TODO BUILD remove when we no longer support java 8 | ||
java.sourceCompatibility = JavaVersion.VERSION_1_8 | ||
java.targetCompatibility = JavaVersion.VERSION_1_8 | ||
} else { | ||
options.release = 8 | ||
} | ||
// TODO NOW build in git commit | ||
// TODO NOW javadocs | ||
} | ||
|
||
test { | ||
/* | ||
* TODO TEST Figure out why tests fail without this and remove. Might have something to do | ||
* with the stfuLoggers() call in many of the tests, might kill logging for tests that | ||
* require it | ||
* Although it seems to make Mongo start up correctly as well which is odd | ||
*/ | ||
/* | ||
* TODO TEST split tests into mongo wrapper tests & all other tests (incl. integration). | ||
* Set up GHA to run the non-mongo tests with a single version of mongo and run the | ||
* mong tests with matrixed mongo versions. Combine coverage at the end somehow | ||
*/ | ||
forkEvery = 1 | ||
systemProperty "AUTH2_TEST_CONFIG", "./test.cfg" | ||
testLogging { | ||
exceptionFormat = 'full' | ||
showStandardStreams = true | ||
} | ||
// TODO NOW coverage working? | ||
} | ||
|
||
// TODO NOW make auth, test, and template jars | ||
// TODO NOW make script | ||
|
||
// Custom java project layout | ||
sourceSets { | ||
main { | ||
java { | ||
srcDirs = ["src"] | ||
exclude '**/test/**' | ||
} | ||
} | ||
test { | ||
java { | ||
srcDirs = ["src"] | ||
include '**/test/**' | ||
} | ||
resources { | ||
srcDirs = ["src"] | ||
include "**/*.testdata" | ||
include "**/authjars" | ||
} | ||
} | ||
} | ||
|
||
war { | ||
webXml = file('war/web.xml') | ||
// TODO NOW GRADLE probably needs updates | ||
} | ||
|
||
def fromURL = { url, name -> | ||
File file = new File("$buildDir/download/${name}.jar") | ||
file.parentFile.mkdirs() | ||
if (!file.exists()) { | ||
new URL(url).withInputStream { downloadStream -> | ||
file.withOutputStream { fileOut -> | ||
fileOut << downloadStream | ||
} | ||
} | ||
} | ||
files(file.absolutePath) | ||
} | ||
|
||
dependencies { | ||
|
||
// ### General application dependencies ### | ||
|
||
implementation 'commons-codec:commons-codec:1.8' | ||
implementation 'commons-validator:commons-validator:1.5.1' | ||
implementation 'com.google.guava:guava:18.0' | ||
implementation 'org.ini4j:ini4j:0.5.2' | ||
implementation 'com.beust:jcommander:1.48' | ||
implementation 'org.mongodb:mongodb-driver-core:4.11.1' | ||
implementation 'org.mongodb:mongodb-driver-sync:4.11.1' | ||
implementation 'org.mongodb:bson-record-codec:4.11.1' | ||
implementation 'org.mongodb:bson:4.11.1' | ||
implementation 'com.github.spullara.mustache.java:compiler:0.9.3' | ||
implementation 'com.nulab-inc:zxcvbn:1.2.2' | ||
implementation 'nl.basjes.parse.useragent:yauaa:1.3' | ||
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.5.4' | ||
implementation 'com.fasterxml.jackson.core:jackson-databind:2.5.4' | ||
implementation 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.5.4' | ||
implementation 'com.github.zafarkhaja:java-semver:0.9.0' | ||
implementation 'org.glassfish.jersey.containers:jersey-container-servlet:2.23.2' | ||
implementation 'org.glassfish.jersey.media:jersey-media-json-jackson:2.23.2' | ||
implementation 'org.glassfish.jersey.ext:jersey-mvc-mustache:2.23.2' | ||
implementation 'javax.persistence:persistence-api:1.0' | ||
implementation 'javax.servlet:javax.servlet-api:3.0.1' | ||
implementation 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359' | ||
|
||
|
||
// ### Logging dependencies ### | ||
implementation fromURL( | ||
'https://github.com/kbase/jars/raw/master/lib/jars/kbase/common/kbase-common-0.0.22.jar', | ||
'kbase-common-0.0.22' | ||
) | ||
implementation 'ch.qos.logback:logback-classic:1.1.2' | ||
implementation 'org.slf4j:slf4j-api:1.7.25' | ||
// Syslog4j 0.9.46 doesn't appear to be available on Maven. It apparently lives in | ||
// a JetBrains artifact server, but that's too much trouble and there's only one version there | ||
// anyway. | ||
// https://mvnrepository.com/artifact/org.jetbrains/syslog4j/0.9.46 | ||
// Need to rework the java common logger to not use syslog4j at all since it's abandonware | ||
// and has a ton of CVEs, even in the newer versions. | ||
implementation fromURL( | ||
'https://github.com/kbase/jars/raw/master/lib/jars/syslog4j/syslog4j-0.9.46.jar', | ||
'syslog4j-0.9.46' | ||
) | ||
// needed for syslog | ||
implementation 'net.java.dev.jna:jna:3.4.0' | ||
|
||
// ### Test ### | ||
|
||
testImplementation 'commons-io:commons-io:2.4' | ||
testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.1.10' | ||
testImplementation 'junit:junit:4.12' | ||
testImplementation 'org.mock-server:mockserver-netty:3.10.4' | ||
testImplementation 'org.eclipse.jetty:jetty-server:9.3.11.v20160721' | ||
testImplementation 'org.eclipse.jetty:jetty-servlet:9.3.11.v20160721' | ||
testImplementation 'io.github.java-diff-utils:java-diff-utils:2.2.0' | ||
testImplementation 'de.danielbechler:java-object-diff:0.94' | ||
testImplementation 'org.jsoup:jsoup:1.10.2' | ||
testImplementation 'org.mockito:mockito-core:3.0.0' | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.