-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathbuild.gradle
More file actions
93 lines (81 loc) · 2.61 KB
/
build.gradle
File metadata and controls
93 lines (81 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
* Copyright (c) 2010-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
*/
plugins {
id "groovy"
id 'maven-publish'
id "com.gradle.plugin-publish" version "1.2.1"
id "java-gradle-plugin"
id 'org.jetbrains.kotlin.jvm' version '2.1.0'
}
dependencies {
compileOnly gradleApi()
implementation project(':marklogic-client-api')
implementation 'org.jetbrains.kotlin:kotlin-stdlib:2.1.0'
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:${jacksonVersion}"
implementation 'com.networknt:json-schema-validator:1.0.88'
// Not yet migrating this project to JUnit 5. Will reconsider it once we have a reason to enhance
// this project.
testImplementation 'junit:junit:4.13.2'
testImplementation 'xmlunit:xmlunit:1.6'
testCompileOnly gradleTestKit()
testImplementation 'com.squareup.okhttp3:okhttp:4.12.0'
}
// Added to avoid problem where processResources fails because - somehow - the plugin properties file is getting
// copied twice. This started occurring with the upgrade of Gradle from 6.x to 7.x.
tasks.processResources {
duplicatesStrategy = "exclude"
}
tasks.register("mlDevelopmentToolsJar", Jar) {
dependsOn classes
archiveBaseName = 'ml-development-tools'
}
gradlePlugin {
website = 'https://www.marklogic.com/'
vcsUrl = 'https://github.com/marklogic/java-client-api.git'
plugins {
mlDevelopmentToolsPlugin {
id = 'com.marklogic.ml-development-tools'
displayName = 'ml-development-tools MarkLogic Data Service Tools'
description = 'ml-development-tools plugin for developing data services on MarkLogic'
tags.set(['marklogic', 'progress'])
implementationClass = 'com.marklogic.client.tools.gradle.ToolsPlugin'
}
}
}
publishing {
publications {
main(MavenPublication) {
from components.java
}
}
repositories {
maven {
if (project.hasProperty("mavenUser")) {
credentials {
username mavenUser
password mavenPassword
}
}
url = publishUrl
}
}
}
compileKotlin {
kotlinOptions.jvmTarget = '17'
}
compileTestKotlin {
kotlinOptions.jvmTarget = '17'
}
tasks.register("generateTests", JavaExec) {
classpath = sourceSets.test.runtimeClasspath
mainClass = 'com.marklogic.client.test.dbfunction.FntestgenKt'
args = ['./src/test/', 'latest']
}
tasks.register("fixMjsModulesForMarkLogic12", JavaExec) {
classpath = sourceSets.test.runtimeClasspath
mainClass = 'com.marklogic.client.test.FixMjsModulesForMarkLogic12'
}
// Allows running "./gradlew test" without having to remember to generate the tests first.
test.dependsOn generateTests, fixMjsModulesForMarkLogic12
fixMjsModulesForMarkLogic12.mustRunAfter generateTests