-
Notifications
You must be signed in to change notification settings - Fork 17
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
182b08e
commit fb92cf9
Showing
27 changed files
with
510 additions
and
62 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
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 |
---|---|---|
|
@@ -26,5 +26,4 @@ comment: | |
require_changes: no | ||
|
||
ignore: | ||
- "build" | ||
- "deployment" |
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,239 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
*/ | ||
|
||
plugins { | ||
id 'java' | ||
id 'war' | ||
id 'jacoco' | ||
id 'org.ajoberstar.grgit' version '4.1.1' | ||
id 'com.github.johnrengelman.shadow' version '8.1.1' | ||
} | ||
|
||
// TODO NOW test_quick command - wtf thought I had this - commit 1 | ||
// TODO NOW test shadow jar works in groups - remove JNA - commit 2 | ||
// TODO NOW get docserver working in WAR and test in docker-compose <- edit to start test server - commit 3 | ||
// TODO NOW client jar - commit 4 | ||
// TODO NOW client jar javadoc - needs java_common source - commit 4 | ||
// TODO NOW schema updater script - commit 5 | ||
// TODO NOW sdk-compile all, java, and docs - commit 6 | ||
// TODO NOW handle the git commit the same way as auth does - commit 7 | ||
// TODO NOW delete build.xml, , and Makefile - commit 8 | ||
// TODO NOW run tests from Eclipse w/o specifying classpath manually & remove sourceSets & claspath - commit 9 | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
compileJava { | ||
options.release = 11 | ||
} | ||
|
||
tasks.withType(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 | ||
*/ | ||
forkEvery = 1 | ||
/* | ||
* 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 | ||
* mongo tests with matrixed mongo versions. Combine coverage at the end somehow | ||
*/ | ||
systemProperty "test.cfg", "./test.cfg" | ||
maxHeapSize = "3G" | ||
testLogging { | ||
exceptionFormat = 'full' | ||
showStandardStreams = true | ||
} | ||
filter { | ||
// gradle thinks that classes annotated with @RunWith are tests | ||
excludeTestsMatching "*Tester" | ||
} | ||
finalizedBy jacocoTestReport | ||
} | ||
|
||
jacocoTestReport { | ||
reports { | ||
xml.required = true | ||
csv.required = true | ||
} | ||
} | ||
|
||
test { | ||
// no special config needed | ||
} | ||
|
||
task testQuick(type: Test) { | ||
// for Gradle 9.0 compatibility | ||
testClassesDirs = testing.suites.test.sources.output.classesDirs | ||
classpath = testing.suites.test.sources.runtimeClasspath | ||
|
||
filter { | ||
excludeTestsMatching "*LongTest" | ||
} | ||
} | ||
|
||
// Custom java project layout | ||
sourceSets { | ||
main { | ||
java { | ||
srcDirs = ["src"] | ||
exclude '**/test/**' | ||
} | ||
} | ||
test { | ||
java { | ||
srcDirs = ["src"] | ||
include '**/test/**' | ||
} | ||
resources { | ||
srcDirs = ["src"] | ||
include "**/*.properties" | ||
include '**/*.spec' | ||
include '**/*instance.*' | ||
include '**/*.instance*' | ||
include '**/*.html' | ||
include '**/*.css' | ||
include '**/*.gif' | ||
include '**/*.js' | ||
include '**/*.png' | ||
include '**/*.txt' | ||
include '**/*.weirdsuffix' | ||
} | ||
} | ||
} | ||
|
||
javadoc { | ||
options { | ||
links "https://docs.oracle.com/en/java/javase/11/docs/api/" | ||
links "https://www.javadoc.io/doc/com.fasterxml.jackson.core/jackson-core/2.9.9/" | ||
links "https://www.javadoc.io/doc/com.fasterxml.jackson.core/jackson-databind/2.9.9/" | ||
} | ||
} | ||
|
||
war { | ||
webXml = file('war/web.xml') | ||
} | ||
|
||
configurations { | ||
// can't directly access testImplementation, so extend and access | ||
testimpl.extendsFrom testImplementation | ||
} | ||
|
||
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 fromURL( | ||
'https://github.com/kbase/jars/raw/master/lib/jars/kbase/auth/kbase-auth-0.4.4.jar', | ||
'kbase-auth-0.4.4' | ||
) | ||
implementation fromURL( | ||
'https://github.com/kbase/jars/raw/master/lib/jars/kbase/kidl/kbase-kidl-parser-1409261812-7863aef.jar', | ||
'kbase-kidl-parser-1409261812-7863aef' | ||
) | ||
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.9' | ||
implementation 'com.fasterxml.jackson.core:jackson-core:2.9.9' | ||
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.9' | ||
implementation 'org.ini4j:ini4j:0.5.2' | ||
implementation 'commons-io:commons-io:2.4' | ||
implementation 'org.apache.commons:commons-lang3:3.1' | ||
implementation 'commons-codec:commons-codec:1.8' | ||
implementation 'info.picocli:picocli:4.6.1' | ||
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 'org.slf4j:slf4j-api:1.7.30' | ||
implementation 'ch.qos.logback:logback-classic:1.1.2' | ||
implementation 'com.google.guava:guava:14.0.1' | ||
implementation 'com.github.ben-manes.caffeine:caffeine:2.9.3' | ||
implementation 'org.apache.kafka:kafka-clients:2.1.0' | ||
implementation fromURL( | ||
'https://github.com/kbase/jars/raw/master/lib/jars/kbase/handle/AbstractHandleClient-1.0.0.jar', | ||
'AbstractHandleClient-1.0.0' | ||
) | ||
implementation fromURL( | ||
'https://github.com/kbase/jars/raw/master/lib/jars/kbase/sample/SampleServiceClient-0.1.1.jar', | ||
'SampleServiceClient-0.1.1' | ||
) | ||
|
||
// ### Server dependencies, specifically for java_common JsonServerServlet ### | ||
|
||
implementation fromURL( | ||
'https://github.com/kbase/jars/raw/master/lib/jars/kbase/common/kbase-common-0.2.0.jar', | ||
'kbase-common-0.2.0' | ||
) | ||
// joda-time is required for kbase-common and syslog4j | ||
implementation 'joda-time:joda-time:2.2' | ||
// this is OOOOOOLD. But that probably means updating java_common | ||
implementation 'org.eclipse.jetty.aggregate:jetty-all:7.0.0.v20091005' | ||
implementation 'javax.servlet:servlet-api:2.5' | ||
implementation 'javax.annotation:javax.annotation-api:1.3.2' | ||
// 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 syslog4j | ||
implementation 'net.java.dev.jna:jna:3.4.0' | ||
|
||
// ### Blobstore / Shock client and dependencies ### | ||
|
||
implementation fromURL( | ||
'https://github.com/kbase/jars/raw/master/lib/jars/kbase/shock/shock-client-0.1.0.jar', | ||
'shock-client-0.1.0' | ||
) | ||
implementation 'org.apache.httpcomponents:httpclient:4.5.9' | ||
implementation 'org.apache.httpcomponents:httpmime:4.5.8' | ||
|
||
// ### Amazon S3 ### | ||
|
||
implementation('software.amazon.awssdk:s3:2.17.214') { | ||
exclude module: 'apache-client' | ||
exclude module: 'netty-nio-client' | ||
} | ||
implementation 'software.amazon.awssdk:url-connection-client:2.17.214' | ||
|
||
// ### Test ### | ||
|
||
testImplementation 'junit:junit:4.12' | ||
testImplementation 'org.hamcrest:hamcrest-core:1.3' | ||
testImplementation 'com.github.zafarkhaja:java-semver:0.9.0' | ||
testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.1.10' | ||
testImplementation 'com.arangodb:arangodb-java-driver:6.7.2' | ||
testImplementation 'org.mockito:mockito-core:3.0.0' | ||
|
||
testImplementation 'commons-lang:commons-lang:2.4' | ||
testImplementation fromURL( | ||
'https://github.com/kbase/jars/raw/master/lib/jars/kbase/auth2/kbase-auth2-test-shadow-all-0.7.0.jar', | ||
'kbase-auth2-test-shadow-all-0.7.0' | ||
) | ||
} | ||
|
||
task showTestClassPath { | ||
doLast { | ||
configurations.testimpl.each { println it } | ||
} | ||
} | ||
|
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
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.6-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.