Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.

Commit abc83cc

Browse files
committed
#24 Upgraded dependencies and supporting Java 8 again
1 parent a031a99 commit abc83cc

File tree

3 files changed

+78
-60
lines changed

3 files changed

+78
-60
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
*.iml
44
build
55
out
6+
gradle-local.properties
7+
snyk

build.gradle

Lines changed: 72 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,110 @@
11
plugins {
2-
id "java"
3-
id "maven-publish"
4-
id "com.jfrog.bintray" version "1.8.4"
5-
id "com.github.jk1.dependency-license-report" version "1.3"
2+
id "java-library"
3+
id "maven-publish"
4+
id "com.jfrog.bintray" version "1.8.4"
5+
id "com.github.jk1.dependency-license-report" version "1.3"
6+
7+
id "net.saliman.properties" version "1.5.1"
8+
id "io.snyk.gradle.plugin.snykplugin" version "0.4"
69
}
710

8-
sourceCompatibility = "9"
9-
targetCompatibility = "9"
11+
sourceCompatibility = "8"
12+
targetCompatibility = "8"
1013

1114
ext {
12-
taskGroup = project.name
15+
taskGroup = project.name
1316
}
1417

1518
repositories {
16-
jcenter()
17-
mavenCentral()
18-
maven { url "http://developer.marklogic.com/maven2/" }
19+
jcenter()
20+
mavenCentral()
21+
maven { url "http://developer.marklogic.com/maven2/" }
22+
mavenLocal()
1923
}
2024

2125
dependencies {
22-
compile "com.marklogic:marklogic-client-api:5.2.0"
26+
api "com.marklogic:marklogic-client-api:5.3.0"
2327

24-
testCompile "junit:junit:4+"
25-
// Sticking with the latest 4.3.x for tests; including the latest 5.2.x release oddly resulted in the servlet package
26-
// being required
27-
testCompile "org.springframework:spring-test:4.3.28.RELEASE"
28-
testCompile "com.marklogic:ml-javaclient-util:4.0.0"
28+
testImplementation "junit:junit:4+"
29+
// Sticking with the latest 4.3.x for tests; including the latest 5.2.x release oddly resulted in the servlet package
30+
// being required
31+
testImplementation "org.springframework:spring-test:4.3.29.RELEASE"
32+
testImplementation "com.marklogic:ml-javaclient-util:4.1.0-SNAPSHOT"
2933

30-
// Forcing Spring to use logback instead of commons-logging
31-
testRuntime "ch.qos.logback:logback-classic:1.2.3"
32-
testRuntime group: "org.slf4j", name: "jcl-over-slf4j", version: "1.7.30"
33-
testRuntime group: "org.slf4j", name: "slf4j-api", version: "1.7.30"
34+
// Forcing Spring to use logback instead of commons-logging
35+
testImplementation "ch.qos.logback:logback-classic:1.2.3"
36+
testImplementation group: "org.slf4j", name: "jcl-over-slf4j", version: "1.7.30"
37+
testImplementation group: "org.slf4j", name: "slf4j-api", version: "1.7.30"
3438
}
3539

3640
task sourcesJar(type: Jar, dependsOn: classes) {
37-
classifier "sources"
38-
from sourceSets.main.allJava
41+
classifier "sources"
42+
from sourceSets.main.allJava
3943
}
4044

4145
task javadocJar(type: Jar, dependsOn: javadoc) {
42-
classifier "javadoc"
43-
from file(javadocsDir + "/" + project.name)
46+
classifier "javadoc"
47+
from file(javadocsDir + "/" + project.name)
4448
}
4549

4650
javadoc.destinationDir = file(javadocsDir + "/" + project.name)
4751
javadoc.failOnError = false
4852

4953
publishing {
50-
publications {
51-
mainJava(MavenPublication) {
52-
from components.java
53-
}
54-
sourcesJava(MavenPublication) {
55-
from components.java
56-
artifact sourcesJar
57-
}
58-
mavenJavadoc(MavenPublication) {
59-
artifact javadocJar
54+
publications {
55+
mainJava(MavenPublication) {
56+
from components.java
57+
}
58+
sourcesJava(MavenPublication) {
59+
from components.java
60+
artifact sourcesJar
61+
}
62+
mavenJavadoc(MavenPublication) {
63+
artifact javadocJar
64+
}
6065
}
61-
}
6266
}
6367

6468
if (project.hasProperty("myBintrayUser")) {
65-
bintray {
66-
user = myBintrayUser
67-
key = myBintrayKey
68-
publications = ["mainJava", "sourcesJava", "mavenJavadoc"]
69-
pkg {
70-
repo = "maven"
71-
name = project.name
72-
licenses = ["Apache-2.0"]
73-
vcsUrl = "https://github.com/marklogic-community/" + project.name + ".git"
74-
version {
75-
name = project.version
76-
released = new Date()
77-
}
69+
bintray {
70+
user = myBintrayUser
71+
key = myBintrayKey
72+
publications = ["mainJava", "sourcesJava", "mavenJavadoc"]
73+
pkg {
74+
repo = "maven"
75+
name = project.name
76+
licenses = ["Apache-2.0"]
77+
vcsUrl = "https://github.com/marklogic-community/" + project.name + ".git"
78+
version {
79+
name = project.version
80+
released = new Date()
81+
}
82+
}
7883
}
79-
}
8084
}
8185

8286
task copyTableauSourceFiles(type: Copy, group: taskGroup) {
83-
description = "Copy Tableau-dependent source files into the main source directory so they can be compiled and packaged into a jar for publishing. " +
84-
"You'll first need to add the Tableau jars to the 'dependencies' block as described in src/tableau/README.md ."
85-
from "src/tableau/main/java"
86-
into "src/main/java"
87+
description = "Copy Tableau-dependent source files into the main source directory so they can be compiled and packaged into a jar for publishing. " +
88+
"You'll first need to add the Tableau jars to the 'dependencies' block as described in src/tableau/README.md ."
89+
from "src/tableau/main/java"
90+
into "src/main/java"
8791
}
8892

8993
task createTableauPublication(group: taskGroup) {
90-
description = "Publish a version of ${project.name} that includes the Tableau-dependent source files under src/tableau/main/java"
91-
dependsOn = ["copyTableauSourceFiles", "publishToMavenLocal"]
92-
doLast {
93-
println "Version ${version} of ${project.name} has been published to your local Maven repository, which defaults to ~/.m2/repository."
94-
println "You can depend on this artifact in another Gradle project by adding mavenLocal() to your list of repositories."
95-
}
94+
description = "Publish a version of ${project.name} that includes the Tableau-dependent source files under src/tableau/main/java"
95+
dependsOn = ["copyTableauSourceFiles", "publishToMavenLocal"]
96+
doLast {
97+
println "Version ${version} of ${project.name} has been published to your local Maven repository, which defaults to ~/.m2/repository."
98+
println "You can depend on this artifact in another Gradle project by adding mavenLocal() to your list of repositories."
99+
}
96100
}
97101
publishToMavenLocal.mustRunAfter copyTableauSourceFiles
102+
103+
// See https://github.com/snyk/gradle-plugin for more information
104+
snyk {
105+
//arguments = '--all-sub-projects'
106+
severity = 'low'
107+
api = snykToken
108+
autoDownload = true
109+
autoUpdate = true
110+
}

gradle.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
group=com.marklogic
22
javadocsDir=../gh-pages-marklogic-java/javadocs
3-
version=2.1.0
3+
version=2.2.0
4+
5+
# Define this via gradle-local.properties or on the command line when running snyk-test
6+
snykToken=

0 commit comments

Comments
 (0)