Skip to content

Commit 6ec3796

Browse files
committed
MLE-24505 Modernizing all Gradle config
I think there's more to be done here - haven't chatted with Copilot yet - but this at least gets things looking very similar to our other repos that use maven-publish.
1 parent 9173770 commit 6ec3796

File tree

8 files changed

+128
-233
lines changed

8 files changed

+128
-233
lines changed

build.gradle

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
1-
// Copyright © 2024 MarkLogic Corporation. All Rights Reserved.
2-
3-
// We need the properties plugin to work on both marklogic-client-api and test-app. The 'plugins' Gradle syntax can't be
4-
// used for that. So we have to add the properties plugin to the buildscript classpath and then apply the properties
5-
// plugin via subprojects below.
6-
buildscript {
7-
repositories {
8-
maven {
9-
url = "https://plugins.gradle.org/m2/"
10-
}
11-
}
12-
dependencies {
13-
classpath "net.saliman:gradle-properties-plugin:1.5.2"
14-
}
15-
}
1+
/*
2+
* Copyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
3+
*/
164

175
subprojects {
18-
apply plugin: "net.saliman.properties"
19-
apply plugin: 'java'
6+
apply plugin: 'java-library'
207

218
tasks.withType(JavaCompile) {
229
options.encoding = 'UTF-8'
@@ -46,6 +33,7 @@ subprojects {
4633
}
4734

4835
test {
36+
useJUnitPlatform()
4937
systemProperty "file.encoding", "UTF-8"
5038
systemProperty "javax.xml.stream.XMLOutputFactory", "com.sun.xml.internal.stream.XMLOutputFactoryImpl"
5139
}

examples/build.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// Copyright © 2025 MarkLogic Corporation. All Rights Reserved.
2-
3-
plugins {
4-
id "java-library"
5-
}
1+
/*
2+
* Copyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
3+
*/
64

75
dependencies {
86
implementation project(':marklogic-client-api')

examples/src/main/java/com/marklogic/client/example/cookbook/README.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

marklogic-client-api-functionaltests/build.gradle

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
*/
44

55
test {
6-
useJUnitPlatform()
7-
testLogging{
8-
events 'started','passed', 'skipped'
9-
}
10-
// For use in testing TestDatabaseClientKerberosFromFile
11-
systemProperty "keytabFile", System.getProperty("keytabFile")
12-
systemProperty "principal", System.getProperty("principal")
6+
// For use in testing TestDatabaseClientKerberosFromFile
7+
systemProperty "keytabFile", System.getProperty("keytabFile")
8+
systemProperty "principal", System.getProperty("principal")
139

1410
systemProperty "TEST_USE_REVERSE_PROXY_SERVER", testUseReverseProxyServer
1511
}
@@ -43,34 +39,34 @@ dependencies {
4339

4440
tasks.register("runFragileTests", Test) {
4541
useJUnitPlatform()
46-
description = "These are called 'fragile' because they'll pass when run by themselves, but when run as part of the " +
47-
"full suite, there seem to be one or more other fast functional tests that run before them and cause some of " +
48-
"their test methods to break. The Jenkinsfile thus calls these first before running the other functional " +
49-
"tests."
50-
include "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
51-
include "com/marklogic/client/fastfunctest/TestRawCombinedQuery.class"
52-
include "com/marklogic/client/fastfunctest/TestRawStructuredQuery.class"
42+
description = "These are called 'fragile' because they'll pass when run by themselves, but when run as part of the " +
43+
"full suite, there seem to be one or more other fast functional tests that run before them and cause some of " +
44+
"their test methods to break. The Jenkinsfile thus calls these first before running the other functional " +
45+
"tests."
46+
include "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
47+
include "com/marklogic/client/fastfunctest/TestRawCombinedQuery.class"
48+
include "com/marklogic/client/fastfunctest/TestRawStructuredQuery.class"
5349
}
5450

5551
tasks.register("runFastFunctionalTests", Test) {
5652
useJUnitPlatform()
57-
description = "Run all fast functional tests that don't setup/teardown custom app servers / databases"
58-
include "com/marklogic/client/fastfunctest/**"
59-
// Exclude the "fragile" ones
60-
exclude "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
61-
exclude "com/marklogic/client/fastfunctest/TestRawCombinedQuery.class"
62-
exclude "com/marklogic/client/fastfunctest/TestRawStructuredQuery.class"
53+
description = "Run all fast functional tests that don't setup/teardown custom app servers / databases"
54+
include "com/marklogic/client/fastfunctest/**"
55+
// Exclude the "fragile" ones
56+
exclude "com/marklogic/client/fastfunctest/TestQueryOptionBuilder.class"
57+
exclude "com/marklogic/client/fastfunctest/TestRawCombinedQuery.class"
58+
exclude "com/marklogic/client/fastfunctest/TestRawStructuredQuery.class"
6359
}
6460

6561
tasks.register("runSlowFunctionalTests", Test) {
6662
useJUnitPlatform()
67-
description = "Run slow functional tests; i.e. those that setup/teardown custom app servers / databases"
68-
include "com/marklogic/client/datamovement/functionaltests/**"
69-
include "com/marklogic/client/functionaltest/**"
63+
description = "Run slow functional tests; i.e. those that setup/teardown custom app servers / databases"
64+
include "com/marklogic/client/datamovement/functionaltests/**"
65+
include "com/marklogic/client/functionaltest/**"
7066
}
7167

7268
tasks.register("runFunctionalTests") {
73-
dependsOn(runFragileTests, runFastFunctionalTests, runSlowFunctionalTests)
69+
dependsOn(runFragileTests, runFastFunctionalTests, runSlowFunctionalTests)
7470
}
7571
runFastFunctionalTests.mustRunAfter runFragileTests
7672
runSlowFunctionalTests.mustRunAfter runFastFunctionalTests

0 commit comments

Comments
 (0)