Skip to content

Bumping Gradle wrapper to version 8 #1662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
50 changes: 4 additions & 46 deletions marklogic-client-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

plugins {
id 'maven-publish'
id 'distribution'
}

group = 'com.marklogic'
Expand Down Expand Up @@ -81,7 +80,7 @@ jar {
)
}
task sourcesJar(type: Jar) {
classifier = 'sources'
archiveClassifier = 'sources'
exclude ('property', '*.xsd', '*.xjb')
from sourceSets.main.allSource
}
Expand Down Expand Up @@ -109,9 +108,9 @@ javadoc {
}
}

task javadocJar (type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}

Node pomCustomizations = new NodeBuilder(). project {
Expand Down Expand Up @@ -180,47 +179,6 @@ publishing {
}
}

distZip {
archiveFileName = "$project.name-$rootProject.version-with-dependencies.zip"
dependsOn javadoc
}

distributions {
main {
contents {
from("..") {
include("NOTICE.TXT")
}
from("src/main/resources") {
include ("Readme.txt")
include ("LICENSE.txt")
}
into ("example") {
from ("../examples/src/main/resources") {
include ("data/**")
include ("scripts/**")
include ("Example.properties")
}
from ("../examples/src/main/resources/example") {
include ("README.txt")
}
from ("../examples/src/main/java/") {
include ("com/marklogic/client/example/cookbook/*.java")
include ("com/marklogic/client/example/handle/*.java")
include ("com/marklogic/client/example/extension/*.java")
}
}
into ("doc/api") {
from ("build/docs/javadoc")
}
into("lib") {
from jar
from(project.configurations.runtimeClasspath)
}
}
}
}

task printClassPath() {
doLast {
println sourceSets.main.runtimeClasspath.asPath+':'+sourceSets.test.runtimeClasspath.asPath
Expand Down
63 changes: 30 additions & 33 deletions ml-development-tools/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright (c) 2022 MarkLogic Corporation

plugins {
id "groovy"
id 'maven-publish'
id 'com.gradle.plugin-publish' version '1.0.0'
id 'java-gradle-plugin'
id 'org.jetbrains.kotlin.jvm' version '1.8.22'
id "groovy"
id 'maven-publish'
id "com.gradle.plugin-publish" version "1.2.1"
id "java-gradle-plugin"
id 'org.jetbrains.kotlin.jvm' version '1.8.22'
}

dependencies {
Expand All @@ -27,39 +27,36 @@ dependencies {
// 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"
duplicatesStrategy = "exclude"
}

task mlDevelopmentToolsJar(type: Jar, dependsOn: classes) {
archivesBaseName = 'ml-development-tools'
}

pluginBundle {
website = 'https://github.com/marklogic/java-client-api'
vcsUrl = 'https://github.com/marklogic/java-client-api.git'
tags = ['marklogic']
archivesBaseName = 'ml-development-tools'
}

gradlePlugin {
plugins {
mlDevelopmentToolsPlugin {
id = 'com.marklogic.ml-development-tools'
implementationClass = 'com.marklogic.client.tools.gradle.ToolsPlugin'
displayName = 'ml-development-tools MarkLogic Data Service Tools'
description = 'ml-development-tools plugin for developing data services on MarkLogic'
}
}
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 {
publications {
main(MavenPublication) {
from components.java
}
}
repositories {
maven {
if(project.hasProperty("mavenUser")) {
if (project.hasProperty("mavenUser")) {
credentials {
username mavenUser
password mavenPassword
Expand All @@ -71,16 +68,16 @@ publishing {
}

compileKotlin {
kotlinOptions.jvmTarget = '1.8'
kotlinOptions.jvmTarget = '1.8'
}
compileTestKotlin {
kotlinOptions.jvmTarget = '1.8'
kotlinOptions.jvmTarget = '1.8'
}

task generateTests(type: JavaExec) {
classpath = sourceSets.test.runtimeClasspath
main = 'com.marklogic.client.test.dbfunction.FntestgenKt'
args = [ './src/test/', 'latest' ]
classpath = sourceSets.test.runtimeClasspath
main = 'com.marklogic.client.test.dbfunction.FntestgenKt'
args = ['./src/test/', 'latest']
}

// Allows running "./gradlew test" without having to remember to generate the tests first.
Expand Down
2 changes: 1 addition & 1 deletion test-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'com.marklogic.ml-gradle' version '4.6.1'
id 'com.marklogic.ml-gradle' version '4.7.0'
id 'java'
id "com.github.psxpaul.execfork" version "0.2.2"
}
Expand Down